From 7bbec60c75f9ec5ed3421b14e6cd5a8ae1cbaff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEuris?= Date: Thu, 4 May 2023 02:22:57 +0300 Subject: [PATCH 1/5] Support TDS 7.3 & 7.4 in PDO_DBLIB tests --- ext/pdo_dblib/tests/types.phpt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/pdo_dblib/tests/types.phpt b/ext/pdo_dblib/tests/types.phpt index 951e3b3e59afc..ef47385b45895 100644 --- a/ext/pdo_dblib/tests/types.phpt +++ b/ext/pdo_dblib/tests/types.phpt @@ -19,6 +19,8 @@ function get_expected_float_string() { case '7.0': case '7.1': case '7.2': + case '7.3': + case '7.4': case '8.0': return '10.500'; default: From dd949cddaccc8a556c4a4afe0eeff22806e6d77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEuris?= Date: Thu, 4 May 2023 04:34:52 +0300 Subject: [PATCH 2/5] Use correct Firebird SQL in tests --- ext/pdo/tests/pdo_039.phpt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/pdo/tests/pdo_039.phpt b/ext/pdo/tests/pdo_039.phpt index 655d51c13be52..f50719ca1d367 100644 --- a/ext/pdo/tests/pdo_039.phpt +++ b/ext/pdo/tests/pdo_039.phpt @@ -6,7 +6,6 @@ pdo @@ -35,6 +34,9 @@ $query = 'SELECT 1'; if ($conn->getAttribute(PDO::ATTR_DRIVER_NAME) === 'oci') { $query .= ' FROM DUAL'; } +if ($conn->getAttribute(PDO::ATTR_DRIVER_NAME) === 'firebird') { + $query .= ' FROM FROM RDB$DATABASE'; +} var_dump($conn->errorCode()); var_dump($conn->errorCode()); From d93364ee6e302d97b6cb63d28d10d32e99e6fa8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEuris?= Date: Thu, 4 May 2023 04:47:14 +0300 Subject: [PATCH 3/5] Make PDO_ODBC test compatible with MySQL --- ext/pdo/tests/bug_65946.phpt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/pdo/tests/bug_65946.phpt b/ext/pdo/tests/bug_65946.phpt index ea73835502d89..9d0eeb156ef49 100644 --- a/ext/pdo/tests/bug_65946.phpt +++ b/ext/pdo/tests/bug_65946.phpt @@ -17,7 +17,12 @@ $db = PDOTest::factory(); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); $db->exec('CREATE TABLE test(id int)'); $db->exec('INSERT INTO test VALUES(1)'); -switch ($db->getAttribute(PDO::ATTR_DRIVER_NAME)) { + +$database = $db->getAttribute(PDO::ATTR_DRIVER_NAME); +if ('odbc' === $database && 'MySQL' === $db->getAttribute(PDO::ATTR_SERVER_INFO)) + $database = 'mysql'; + +switch ($database) { case 'dblib': $sql = 'SELECT TOP :limit * FROM test'; break; From 1577d6c59937dd864b92f28e7d03843fa65f446d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEuris?= Date: Thu, 4 May 2023 12:26:23 +0300 Subject: [PATCH 4/5] Revert "Use correct Firebird SQL in tests" This reverts commit dd949cddaccc8a556c4a4afe0eeff22806e6d77b. --- ext/pdo/tests/pdo_039.phpt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/pdo/tests/pdo_039.phpt b/ext/pdo/tests/pdo_039.phpt index f50719ca1d367..655d51c13be52 100644 --- a/ext/pdo/tests/pdo_039.phpt +++ b/ext/pdo/tests/pdo_039.phpt @@ -6,6 +6,7 @@ pdo @@ -34,9 +35,6 @@ $query = 'SELECT 1'; if ($conn->getAttribute(PDO::ATTR_DRIVER_NAME) === 'oci') { $query .= ' FROM DUAL'; } -if ($conn->getAttribute(PDO::ATTR_DRIVER_NAME) === 'firebird') { - $query .= ' FROM FROM RDB$DATABASE'; -} var_dump($conn->errorCode()); var_dump($conn->errorCode()); From 0e24cb15b2ce6efa77ca0d6f2c01595f681fc1cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEuris?= Date: Thu, 4 May 2023 12:27:17 +0300 Subject: [PATCH 5/5] Make xfail more explanatory --- ext/pdo/tests/pdo_039.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pdo/tests/pdo_039.phpt b/ext/pdo/tests/pdo_039.phpt index 655d51c13be52..809697a6ff3f0 100644 --- a/ext/pdo/tests/pdo_039.phpt +++ b/ext/pdo/tests/pdo_039.phpt @@ -6,7 +6,7 @@ pdo