aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Database/MySQLConnection.cpp
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2011-12-13 13:55:06 +0100
committerMachiavelli <machiavelli.trinity@gmail.com>2011-12-13 13:59:00 +0100
commit589f06710187713796f220f0a874b4447aaa6829 (patch)
tree9e64db0dc50d2524643c502bc547b36b4a37469e /src/server/shared/Database/MySQLConnection.cpp
parentef519bd31345b16388f7b38e46eca66a29547f8c (diff)
Core/DBLayer: Terminate process if table/database structure is not compatible with the core. This will significantly reduce the amount of PEBCAK help and support threads on our forums.
Also added a 10 second window to WPFatal for users who never heard of command line before to read the error prior to process termination.
Diffstat (limited to 'src/server/shared/Database/MySQLConnection.cpp')
-rwxr-xr-xsrc/server/shared/Database/MySQLConnection.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp
index 70a8beb3d70..9ce924127ba 100755
--- a/src/server/shared/Database/MySQLConnection.cpp
+++ b/src/server/shared/Database/MySQLConnection.cpp
@@ -527,7 +527,12 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo)
// Query related errors - skip query
case 1058: // "Column count doesn't match value count"
case 1062: // "Duplicate entry '%s' for key '%d'"
- case 1054: // "Unknown column '%s' in 'order clause'"
+ return false;
+
+ // Outdated table or database structure - terminate core
+ case 1054: // "Unknown column '%s' in '%s'"
+ case 1146: // "Table '%s' doesn't exist"
+ WPFatal(!errNo, "Your database structure is not up to date. Please make sure you've executed all queries in the sql/updates folders.");
return false;
default: