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.
This commit is contained in:
Machiavelli
2011-12-13 13:55:06 +01:00
parent ef519bd313
commit 589f067101
2 changed files with 8 additions and 2 deletions

View File

@@ -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: