From 56150a206c8b5babe2ba63f9d1ac8294803fb773 Mon Sep 17 00:00:00 2001 From: diosmosis Date: Tue, 17 Mar 2015 17:34:29 -0700 Subject: Fixes #7462, optimize InnoDB tables if MariaDB v10.1.1 or greater is used. --- tests/PHPUnit/Unit/DbTest.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/PHPUnit/Unit/DbTest.php (limited to 'tests') diff --git a/tests/PHPUnit/Unit/DbTest.php b/tests/PHPUnit/Unit/DbTest.php new file mode 100644 index 0000000000..acd6f1f497 --- /dev/null +++ b/tests/PHPUnit/Unit/DbTest.php @@ -0,0 +1,32 @@ +assertEquals($expectedResult, $result); + } + + public function getIsOptimizeInnoDBTestData() + { + return array( + array("10.0.17-MariaDB-1~trusty", false), + array("10.1.1-MariaDB-1~trusty", true), + array("10.2.0-MariaDB-1~trusty", true), + array("10.6.19-0ubuntu0.14.04.1", false) + ); + } +} \ No newline at end of file -- cgit v1.2.3 From 9347d34ade2d368689998dc198b33727db4c4def Mon Sep 17 00:00:00 2001 From: diosmosis Date: Tue, 17 Mar 2015 17:46:41 -0700 Subject: Adding more tests to DbTest::test_isOptimizeInnoDBSupported_ReturnsCorrectResult. --- tests/PHPUnit/Unit/DbTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/PHPUnit/Unit/DbTest.php b/tests/PHPUnit/Unit/DbTest.php index acd6f1f497..70b4338866 100644 --- a/tests/PHPUnit/Unit/DbTest.php +++ b/tests/PHPUnit/Unit/DbTest.php @@ -26,7 +26,14 @@ class DbTest extends \PHPUnit_Framework_TestCase array("10.0.17-MariaDB-1~trusty", false), array("10.1.1-MariaDB-1~trusty", true), array("10.2.0-MariaDB-1~trusty", true), - array("10.6.19-0ubuntu0.14.04.1", false) + array("10.6.19-0ubuntu0.14.04.1", false), + + // for sanity. maybe not ours. + array("", false), + array(0, false), + array(false, false), + array("slkdf(@*#lkesjfMariaDB", false), + array("slkdfjq3rujlkv", false), ); } } \ No newline at end of file -- cgit v1.2.3