Skip to content
Permalink
Browse files

Use TRADITIONAL sql_mode always

Some servers are configured all weird...
  • Loading branch information...
fplanque committed Sep 23, 2015
1 parent 0f4f4a4 commit a694c0bb4f0fd52bcb435510e171bfeb758db287
Showing with 2 additions and 9 deletions.
  1. +2 −9 inc/_core/model/db/_db.class.php
@@ -434,15 +434,8 @@ function __construct( $params )
// echo count($this->dbaliases);
}
if( $debug )
{ // Force MySQL strict mode
// TRADITIONAL mode is only available to mysql > 5.0.2
$mysql_version = $this->get_version( 'we do this in DEBUG mode only' );
if( version_compare( $mysql_version, '5.0.2' ) > 0 )
{
$this->query( 'SET sql_mode = "TRADITIONAL"', 'we do this in DEBUG mode only' );
}
}
// Force MySQL strict mode
$this->query( 'SET sql_mode = "TRADITIONAL"', 'Force MySQL "strict" mode (and make sure server is not configured with a weird incompatible mode)' );
if( $this->debug_profile_queries )
{

0 comments on commit a694c0b

Please sign in to comment.
You can’t perform that action at this time.