From: olav%bkor.dhs.org <> Date: Fri, 17 Nov 2006 08:18:46 +0000 (+0000) Subject: Bug 321645: [MySQL 5] MySql Error on insert... "DBD::mysql::st execute failed: Field... X-Git-Tag: bugzilla-2.22.2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=952415c1890c80ea46d0ab63dc9ed58ab7d389f6;p=thirdparty%2Fbugzilla.git Bug 321645: [MySQL 5] MySql Error on insert... "DBD::mysql::st execute failed: Field 'status_whiteboard' ".... Patch by Olav Vitters r=gavins a=justdave --- diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index 34504b24ba..116e663530 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -71,9 +71,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 =