diff options
author | olav%bkor.dhs.org <> | 2006-11-17 08:18:26 +0000 |
---|---|---|
committer | olav%bkor.dhs.org <> | 2006-11-17 08:18:26 +0000 |
commit | be6d336e3774a82c11dba2b80a7bb98ca70cc891 (patch) | |
tree | e94c883f301576957a8965347e178bbcbac694c0 /Bugzilla/DB | |
parent | 74235ea97048fc85ff7f354e9f9a8ce2b1fa2127 (diff) | |
download | bugs-be6d336e3774a82c11dba2b80a7bb98ca70cc891.tar bugs-be6d336e3774a82c11dba2b80a7bb98ca70cc891.tar.gz bugs-be6d336e3774a82c11dba2b80a7bb98ca70cc891.tar.bz2 bugs-be6d336e3774a82c11dba2b80a7bb98ca70cc891.tar.xz bugs-be6d336e3774a82c11dba2b80a7bb98ca70cc891.zip |
Bug 321645: [MySQL 5] MySql Error on insert... "DBD::mysql::st execute failed: Field 'status_whiteboard' "....
Patch by Olav Vitters <olav@bkor.dhs.org> r=gavins a=justdave
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r-- | Bugzilla/DB/Mysql.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index d9e6a2510..3bcd74389 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -66,9 +66,11 @@ sub new { bless ($self, $class); # Bug 321645 - disable MySQL strict mode, if set - my $sql_mode = $self->selectrow_array('SELECT @@sql_mode'); + my ($var, $sql_mode) = $self->selectrow_array( + "SHOW VARIABLES LIKE 'sql\\_mode'"); + if ($sql_mode) { - # STRICT_TRANS_TABLE or STICT_ALL_TABLES enable MySQL strict mode, + # STRICT_TRANS_TABLE or STRICT_ALL_TABLES enable MySQL strict mode, # causing bug 321645. TRADITIONAL sets these modes (among others) as # well, so it has to be stipped as well my $new_sql_mode = |