MyBB Community Forums

Full Version: [SOLVED] Database Update Problem when performing Upgrade to 1.4.5
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I get the following error when I try to exec the upgrade.php:
Quote:Performing Queries

Performing necessary upgrade queries..

Fatal error: [SQL] [1292] Truncated incorrect DOUBLE value: 'yes'
UPDATE mybb_settinggroups SET isdefault='1' WHERE isdefault='yes' in [path]\mybb\inc\db_mysqli.php on line 554
How can I fix this?
IIRC this is caused by MySQL being in strict mode so see if you can disable that.
I would suggest a complete db backup first.

Open install/resources/upgade15.php
In line 37, find:
$db->update_query("settinggroups", array('isdefault' => '1'), "isdefault='yes'");
$db->update_query("settinggroups", array('isdefault' => '0'), "isdefault='no'");

Comment out the two lines by adding // at the beginning of both.

EDIT - Unapproved.
Yes, that worked. I included the following line after $db->type = $config['database']['type']; in upgrade.php:
$db->write_query("SET sql_mode='';");
This disabled the Strict Mode and Upgrade succeeded.