Skip to content

Commit 9dc7d61

Browse files
kobi97krowinski
authored andcommitted
support testcase for mariadb-10.0, mariadb-10.1 (#56)
1 parent 8170ffe commit 9dc7d61

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.travis.yml

+12
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ matrix:
1717
- env:
1818
- DB=mariadb:5.5
1919
php: "7.1"
20+
- env:
21+
- DB=mariadb:10.0
22+
php: "7.1"
23+
- env:
24+
- DB=mariadb:10.1
25+
php: "7.1"
2026
- env:
2127
- DB=mysql:5.5
2228
php: "7.1"
@@ -33,6 +39,12 @@ matrix:
3339
- env:
3440
- DB=mariadb:5.5
3541
php: "7.2"
42+
- env:
43+
- DB=mariadb:10.0
44+
php: "7.2"
45+
- env:
46+
- DB=mariadb:10.1
47+
php: "7.2"
3648
- env:
3749
- DB=mysql:5.5
3850
php: "7.2"

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ Compatibility (based on integration tests)
3535
- mysql 5.7
3636
- mysql 8.0 (ONLY with mysql_native_password)
3737
- mariadb 5.5
38-
- mariadb 10.0 (partaily, problem with some cases of TIMESTAMP)
38+
- mariadb 10.0
39+
- mariadb 10.1
3940
- probably percona versions as is based on native mysql
4041

4142
MySQL server settings

tests/Integration/TypesTest.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,14 @@ public function shouldBeTimestamp(): void
268268
*/
269269
public function shouldBeTimestampMySQL56(): void
270270
{
271-
if ($this->checkForVersion(5.6)) {
271+
/*
272+
* https://mariadb.com/kb/en/library/microseconds-in-mariadb/
273+
* MySQL 5.6 introduced microseconds using a slightly different implementation to MariaDB 5.3.
274+
* Since MariaDB 10.1, MariaDB has defaulted to the MySQL format ...
275+
*/
276+
if (BinLogServerInfo::isMariaDb() && $this->checkForVersion(10.1)) {
277+
$this->markTestIncomplete('Only for mariadb 10.1 or higher');
278+
} elseif ($this->checkForVersion(5.6)) {
272279
$this->markTestIncomplete('Only for mysql 5.6 or higher');
273280
}
274281

0 commit comments

Comments
 (0)