Disable MySQL strict mode so that errors do not occur if the server has it set. Fixes...
authorRobert Sesek <rsesek@bluestatic.org>
Tue, 3 Feb 2009 00:14:35 +0000 (19:14 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Tue, 3 Feb 2009 00:14:35 +0000 (19:14 -0500)
* includes/init.php
* install/global.php

Cherry pick 2c8c00e

docs/changes.txt
includes/init.php
install/global.php

index 20dc002f1f3634b84ba88b4adf96f139ef2b11b5..1e03dcd26a7a4b58a691eab2592aff35cba827b5 100644 (file)
@@ -10,6 +10,7 @@
 - Change: Required custom select fields will no longer show the empty option (these fields could not be saved as empty, though, because they wouldn't validate -- this is purely an interface change)
 - Change: The description (first comment) is now stored in a separate variable from the rest of the comments, allowing for one to move its placement in templates/showreport.tpl
 - Fixed: #148: The permission mask fields were smallint, when they should be int to hold larger int values that permission masks have
+- Fixed: #67: MySQL's strict mode would cause installation to fail
 
 1.2.2
 ===============================
index 0753791d4329b7630c4f32fa3c9a775d5b27104d..bde3c5e2b4758eaad1d99e0decfa548ce54975ab 100755 (executable)
@@ -59,6 +59,9 @@ if ($utf8)
        $db->query("SET NAMES utf8");
 }
 
+// don't use sql strict mode
+$db->query("SET sql_mode = ''");
+
 define('DEVDEBUG', $debug);
 define('TABLE_PREFIX', $tableprefix);
 define('COOKIE_PREFIX', $cookieprefix);
index 3db62d4552cf622b95de02d18728a3161d32e47d..1c9b969220f3a2eb85eb0c8a8669bac4890bf53c 100644 (file)
@@ -56,6 +56,9 @@ if ($utf8)
        $db->query("SET NAMES utf8");
 }
 
+// don't use sql strict mode
+$db->query("SET sql_mode = ''");
+
 // needed for API validation
 $bugsys->load('functions', 'funct');