Removed NO_AUTO_CREATE_USER from mysql strict to support MySQL 8 (#9668)

* Removed NO_AUTO_CREATE_USER from mysql strict

* Fixed tests
This commit is contained in:
Neil Lathwood
2019-01-15 07:21:00 +00:00
committed by Tony Murray
parent 394c40e541
commit f8cf6a93b3
2 changed files with 2 additions and 2 deletions

View File

@@ -95,7 +95,7 @@ class Eloquent
{ {
if (self::isConnected()) { if (self::isConnected()) {
if ($strict) { if ($strict) {
self::DB()->getPdo()->exec("SET sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"); self::DB()->getPdo()->exec("SET sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'");
} else { } else {
self::DB()->getPdo()->exec("SET sql_mode=''"); self::DB()->getPdo()->exec("SET sql_mode=''");
} }

View File

@@ -115,7 +115,7 @@ class DBSetupTest extends DBTestCase
public function testSqlMode() public function testSqlMode()
{ {
$this->assertEquals( $this->assertEquals(
'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION', 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION',
dbFetchCell("SELECT @@sql_mode") dbFetchCell("SELECT @@sql_mode")
); );
} }