Recent Topics

[2.3.0] Cannot debug, set sql_mode = "TRADITIONAL"

started by on Jan 30, 2008 – Last touched: Jan 30, 2008

Jan 30, 2008 14:39    

I enabled debugging by setting $debug = 1 in conf/_advanced.php and then I received the following fatal error:

Additional information about this error:

MySQL error!

Variable 'sql_mode' can't be set to the value of 'TRADITIONAL'(Errno=1231)

Your query:

SET sql_mode = "TRADITIONAL"

Backtrace:

1. debug_die( "<p class="error">MySQL error!</p><div><p><strong>Variable 'sql_..." )
File: /home/libenie2/public_html/blog/inc/_core/model/db/_db.class.php on line 567
2. db->print_error( "", "", "" )
File: /home/libenie2/public_html/blog/inc/_core/model/db/_db.class.php on line 732
3. db->query( "SET sql_mode = "TRADITIONAL"" )
File: /home/libenie2/public_html/blog/inc/_core/model/db/_db.class.php on line 415
4. db->db( Array(10) )
File: /home/libenie2/public_html/blog/inc/_connect_db.inc.php on line 29
5. require_once( "/home/libenie2/public_html/blog/inc/_connect_db.inc.php" )
File: /home/libenie2/public_html/blog/inc/_main.inc.php on line 182
6. require_once( "/home/libenie2/public_html/blog/inc/_main.inc.php" )
File: /home/libenie2/public_html/blog/index.php on line 27

Ignored last: 1

Funny thing is: this a bug only if you try to debug. Otherwise no problem.

Feb 05, 2008 19:12

Have you been able to duplicate this in 2.4.0-RC1?

* Yeah a bug that shows up in debug mode only is funny :lol:

Feb 05, 2008 22:35

Haven't upgraded yet. But as soon as I do, I'll report.

Feb 07, 2008 10:39

I've just upgraded to 2.4.0-RC1. The debugging bug still persists.

Feb 07, 2008 10:49

Additional info: My MySQL server is version 4.1.22 and TRADITIONAL mode was implemented in version 5.0.2:

The following special modes are provided as shorthand for combinations of mode values from the preceding list. All are available in MySQL 5.0 beginning with version 5.0.0, except for TRADITIONAL, which was implemented in MySQL 5.0.2.

So, we now know the source of the error. The solution would be to test versions before attempting to set sql_mode, but I don't know if that mode is required later. I'll leave it here to the experts to decide.

Feb 07, 2008 11:51

/inc/_core/model/db/_db.class.php lines 414-417:

PHP

if( $debug )
// Force MySQL strict mode
    $this->query'SET sql_mode = "TRADITIONAL"' );
}

If you want to change something, that's up to you ;)

Good luck

Feb 20, 2008 14:25

Well I did it and can now debug. I'm running 2.4.0rc2.

One thing I noted, tough, is that XML-RPC calls are not show in detail anymore. en 1.9.x I used to see the full XML sent when pinging services or sending trackbacks, that kind of stuff. Not anymore. IS this controled by any configuration variable I'm unaware of?

Mar 13, 2008 15:25

$debug_xmlrpc_logging (in conf/_advanced.php) should do the trick.


Form is loading...

powered by b2evolution free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.