aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/unit/includes/dba/DbaPdoTest.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/unit/includes/dba/DbaPdoTest.php b/tests/unit/includes/dba/DbaPdoTest.php
index 39fdbe3e5..7eb66b791 100644
--- a/tests/unit/includes/dba/DbaPdoTest.php
+++ b/tests/unit/includes/dba/DbaPdoTest.php
@@ -21,7 +21,11 @@ class DbaPdoTest extends UnitTestCase
public function testInsertingRowWithRturningClauseReturnsInsertedRow(): void
{
$driver = DBA::$dba->db->getAttribute(PDO::ATTR_DRIVER_NAME);
- if ($driver === 'mysql') {
+ $version = DBA::$dba->db->getAttribute(PDO::ATTR_SERVER_VERSION);
+
+ // MySQL does not support the `returning` clause, so we skip the test
+ // for that DB backend.
+ if ($driver === 'mysql' && stripos($version, 'mariadb') === false) {
$this->markTestSkipped("RETURNING clause not supported for {$driver}");
}