aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/check_updates.sh44
-rw-r--r--contrib/valgrind/helgrind.supp8
2 files changed, 52 insertions, 0 deletions
diff --git a/contrib/check_updates.sh b/contrib/check_updates.sh
new file mode 100644
index 00000000000..017542eb807
--- /dev/null
+++ b/contrib/check_updates.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+name=$1
+database=$2
+
+echo "Database Updater check script:"
+echo " Checking database '${name}' for missing filenames in tables..."
+echo
+
+# Select all entries which are in the updates table
+entries=$(mysql -uroot ${database} -e "SELECT name FROM updates" | grep ".sql")
+
+cd sql/updates/${name}
+
+error=0
+updates=0
+
+for file in *.sql
+do
+ # Check if the given update is in the `updates` table.
+ if echo "${entries}" | grep -q "^${file}"; then
+ # File is ok
+ updates=$((updates+1))
+ else
+ # The update isn't listed in the updates table of the given database.
+ echo "- \"sql/updates/${name}/${file}\" is missing in the '${name}'.'updates' table."
+ error=1
+ fi
+done
+
+if [ ${error} -ne 0 ]
+ then
+ echo
+ echo "Fatal error:"
+ echo " The Database Updater is broken for the '${name}' database,"
+ echo " because the applied update is missing in the '${name}'.'updates' table."
+ echo
+ echo "How to fix:"
+ echo " Insert the missing names of the already applied sql updates"
+ echo " to the 'updates' table of the '${name}' base dump ('sql/base/${name}_database.sql')."
+ exit 1
+ else
+ echo " Everything is OK, finished checking ${updates} updates."
+ exit 0
+fi
diff --git a/contrib/valgrind/helgrind.supp b/contrib/valgrind/helgrind.supp
index fca5d82c2aa..d25696ad197 100644
--- a/contrib/valgrind/helgrind.supp
+++ b/contrib/valgrind/helgrind.supp
@@ -134,3 +134,11 @@
Helgrind:Race
fun:_ZNK3Log9ShouldLogERKSs8LogLevel
}
+{
+ [5] ignored static variables
+ Helgrind:Race
+ fun:_ZN3G3D7Vector3aSERKS0_
+ fun:_ZN3G3D18CollisionDetection41collisionLocationForMovingPointFixedAABoxERKNS_7Vector3ES3_RKNS_5AABoxERS1_RbS7_
+ fun:_ZN3G3D18CollisionDetection37collisionTimeForMovingPointFixedAABoxERKNS_7Vector3ES3_RKNS_5AABoxERS1_RbS7_
+ fun:_ZNK3G3D3Ray16intersectionTimeERKNS_5AABoxE
+}