Always skip style check for dev:check ci (#12654)

* Always skip style check for dev:check ci

* fix names and mysql 8 was barely being tested

* fix sql mode test

* safer vendor check

* flubbed the regex

* ...

* Mysql 8 fixes

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
This commit is contained in:
Tony Murray
2021-03-28 16:55:41 -05:00
committed by GitHub
parent c0e144295b
commit 1695f86af8
4 changed files with 17 additions and 13 deletions

View File

@@ -106,10 +106,18 @@ class DBSetupTest extends DBTestCase
public function testSqlMode()
{
$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',
DB::connection($this->connection)->select(DB::raw('SELECT @@sql_mode AS mode'))[0]->mode
);
$result = DB::connection($this->connection)->selectOne(DB::raw('SELECT @@version AS version, @@sql_mode AS mode'));
preg_match('/([0-9.]+)(?:-(\w+))?/', $result->version, $matches);
$version = $matches[1] ?? null;
$vendor = $matches[2] ?? null;
$mode = $result->mode;
// NO_AUTO_CREATE_USER is removed in mysql 8
$expected = ($vendor !== 'MariaDB' && version_compare($version, '8.0.0') >= 0)
? 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
: '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';
$this->assertEquals($expected, $mode);
}
public function testValidateSchema()