diff options
author | Joey3000 <Joey3000@users.noreply.github.com> | 2015-11-01 02:55:46 +0300 |
---|---|---|
committer | Joey3000 <Joey3000@users.noreply.github.com> | 2015-11-01 02:55:46 +0300 |
commit | a13652b5e94c3c17cafa908465d1dd7a4a90f12b (patch) | |
tree | 7729b9ae12fcc355dd26aa82326f4e19bde619a1 | |
parent | d8c790d9e9929bbd0d893ba71254e98cdbc72165 (diff) |
Make sql_mode compatibile with MySQL 4.1
See https://github.com/piwik/piwik/issues/9088
-rw-r--r-- | core/Db.php | 2 | ||||
-rw-r--r-- | tests/PHPUnit/Integration/DbTest.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/Db.php b/core/Db.php index 12798d2ff5..f7eae8c8b2 100644 --- a/core/Db.php +++ b/core/Db.php @@ -33,7 +33,7 @@ use Piwik\Db\Adapter; */ class Db { - const SQL_MODE = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE'; + const SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO'; private static $connection = null; diff --git a/tests/PHPUnit/Integration/DbTest.php b/tests/PHPUnit/Integration/DbTest.php index c21a277061..9a5595e29a 100644 --- a/tests/PHPUnit/Integration/DbTest.php +++ b/tests/PHPUnit/Integration/DbTest.php @@ -52,7 +52,7 @@ class DbTest extends IntegrationTestCase $this->assertInstanceOf($expectedClass, $db); $result = $db->fetchOne('SELECT @@SESSION.sql_mode'); - $expected = 'NO_AUTO_VALUE_ON_ZERO,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER'; + $expected = 'NO_AUTO_VALUE_ON_ZERO'; $this->assertSame($expected, $result); } |