From 589f06710187713796f220f0a874b4447aaa6829 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Tue, 13 Dec 2011 13:55:06 +0100 Subject: 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. --- src/server/shared/Database/MySQLConnection.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/server/shared/Database/MySQLConnection.cpp') 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: -- cgit v1.2.3