Error On Upgrade

Brent W

Well-known member
Trying to get XMG upgraded to latest version and getting this:

Code:
Server Error

Mysqli prepare error: Unknown column 'rating_weighted' in 'field list'

Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 632
Zend_Db_Adapter_Abstract->update() in XenForo/DataWriter.php at line 1640
XenForo_DataWriter->_update() in XenForo/DataWriter.php at line 1609
XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1405
XenForo_DataWriter->save() in XenGallery/Deferred/MediaRating.php at line 29
XenGallery_Deferred_MediaRating->execute() in XenForo/Model/Deferred.php at line 256
XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 390
XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 335
XenForo_Model_Deferred->run() in XenForo/ControllerAdmin/Tools.php at line 159
XenForo_ControllerAdmin_Tools->actionRunDeferred() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /home/nginx/domains/yabucket.com/public/admin.php at line 13
 
Weird.

The only vague explanation I can give is that the following query failed to run during upgrade:

Code:
ALTER TABLE xengallery_media ADD COLUMN rating_weighted float DEFAULT '0' NOT NULL AFTER rating_avg

Run that query and for good measure re-run the upgrade with the XML file.
 
Running that returns this:

Code:
[SQL]ALTER TABLE xengallery_media ADD COLUMN rating_weighted float DEFAULT '0' NOT NULL AFTER rating_avg;
[Err] 1050 - Table 'yabucket/#sql-ib292' already exists
 
Well, that would probably explain why it didn't run in the first place. That error doesn't make any sense, though. The query is adding a column to a table. The error is stating that some other table already exists.

I can't see much info about it other than people describing similar effects after MySQL has crashed. There doesn't seem to be any concrete solutions in those cases, though. One solution seemed to be dropping the entire database, but that seems somewhat extreme :)

I should add, that the obvious solution is to try and drop the 'yabucket/#sql-ib292' table, but most people have said that doing that didn't work or that table could not be found (even though the error states it's available).
 
That's an error relating to a MySQL temporary table. I'd check your MySQL error log to see if it has any errors. This may be an indication of a disk space problem (where MySQL is creating temporary tables).
 
Back
Top Bottom