Skip to content

Commit e4e88bd

Browse files
committed
PDO MySQL: Unskip bug_41125.phpt
This test was always skipped (leftover debug statement?) Contrary to the comments in the test and the test expectation, this actually works fine.
1 parent ad8eb11 commit e4e88bd

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

ext/pdo_mysql/tests/bug_41125.phpt

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
1313
die(sprintf("skip Cannot determine MySQL Server version\n"));
1414

1515
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
16-
die("skip $version");
1716
if ($version < 40100)
1817
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
1918
$matches[1], $matches[2], $matches[3], $version));
@@ -27,10 +26,6 @@ $db->exec("DROP TABLE IF EXISTS test");
2726
// And now allow the evil to do his work
2827
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
2928
$sql = "CREATE TABLE IF NOT EXISTS test(id INT); INSERT INTO test(id) VALUES (1); SELECT * FROM test; INSERT INTO test(id) VALUES (2); SELECT * FROM test;";
30-
// NOTE: This will fail, it is OK to fail - you must not mix DML/DDL and SELECT
31-
// The PDO API does not support multiple queries properly!
32-
// Read http://blog.ulf-wendel.de/?p=192
33-
// Compare MySQL C-API documentation
3429
$stmt = $db->query($sql);
3530
do {
3631
var_dump($stmt->fetchAll());
@@ -44,8 +39,36 @@ require __DIR__ . '/mysql_pdo_test.inc';
4439
$db = MySQLPDOTest::factory();
4540
$db->exec("DROP TABLE IF EXISTS test");
4641
?>
47-
--EXPECTF--
48-
Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d
42+
--EXPECT--
4943
array(0) {
5044
}
45+
array(0) {
46+
}
47+
array(1) {
48+
[0]=>
49+
array(2) {
50+
["id"]=>
51+
string(1) "1"
52+
[0]=>
53+
string(1) "1"
54+
}
55+
}
56+
array(0) {
57+
}
58+
array(2) {
59+
[0]=>
60+
array(2) {
61+
["id"]=>
62+
string(1) "1"
63+
[0]=>
64+
string(1) "1"
65+
}
66+
[1]=>
67+
array(2) {
68+
["id"]=>
69+
string(1) "2"
70+
[0]=>
71+
string(1) "2"
72+
}
73+
}
5174
done!

0 commit comments

Comments
 (0)