PDO_DBG_RETURN(0);
}
- if (!mysqlnd_stmt_more_results(S->stmt)) {
- /*
- MySQL gives us n + 1 result sets for
- CALL proc() and n result sets returned by the proc itself.
- Result set n + 1 is about the procedure call itself.
- As the PDO emulation does not return it, we skip it as well
- */
- PDO_DBG_RETURN(0);
- }
-
/* TODO - this code is stolen from execute() - see above */
if (S->result) {
mysql_free_result(S->result);
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
$matches[1], $matches[2], $matches[3], $version));
?>
---XFAIL--
-nextRowset() problem with stored proc & emulation mode & mysqlnd
--FILE--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
string(1) "4"
}
}
+array(0) {
+}
array(1) {
[0]=>
array(1) {
string(1) "4"
}
}
+array(0) {
+}
Native Prepared Statements...
array(1) {
[0]=>
string(1) "4"
}
}
+array(0) {
+}
array(1) {
[0]=>
array(1) {
string(1) "4"
}
}
+array(0) {
+}
done!
--TEST--
PDO MySQL Bug #41997 (stored procedure call returning single rowset blocks future queries)
---XFAIL--
-nextRowset() problem with stored proc & emulation mode & mysqlnd
--SKIPIF--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc');
string(1) "1"
}
}
+array(0) {
+}
array(3) {
[0]=>
string(5) "00000"
// requires MySQL 5+
$stmt = $db->prepare('CALL p()');
$stmt->execute();
- $expected = array(
- array(
- "z" => NULL,
- "a" => NULL,
- "b" => " ",
- "c" => NULL,
- "d" => " d",
- "e" => " e",
- ),
- );
do {
- $tmp = $stmt->fetchAll(PDO::FETCH_ASSOC);
- if ($tmp != $expected) {
- printf("[004] Expecting %s got %s\n",
- var_export($expected, true), var_export($tmp, true));
- }
+ var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
} while ($stmt->nextRowset());
$stmt->execute();
do {
- $tmp = $stmt->fetchAll(PDO::FETCH_ASSOC);
- if ($tmp != $expected) {
- printf("[005] Expecting %s got %s\n",
- var_export($expected, true), var_export($tmp, true));
- }
+ var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
} while ($stmt->nextRowset());
}
string(3) "%se"
}
}
+array(1) {
+ [0]=>
+ array(6) {
+ ["z"]=>
+ NULL
+ ["a"]=>
+ string(0) ""
+ ["b"]=>
+ string(1) " "
+ ["c"]=>
+ string(0) ""
+ ["d"]=>
+ string(2) " d"
+ ["e"]=>
+ string(2) " e"
+ }
+}
+array(0) {
+}
+array(1) {
+ [0]=>
+ array(6) {
+ ["z"]=>
+ NULL
+ ["a"]=>
+ string(0) ""
+ ["b"]=>
+ string(1) " "
+ ["c"]=>
+ string(0) ""
+ ["d"]=>
+ string(2) " d"
+ ["e"]=>
+ string(2) " e"
+ }
+}
+array(0) {
+}
done!
string(1) "a"
}
}
+array(0) {
+}
bool(false)
array(3) {
[0]=>
string(1) "a"
}
}
+array(0) {
+}
bool(false)
Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'INSERT INTO test (id, label) VALUES (99, 'x')' at line 1 in %s on line %d
string(1) "a"
}
}
+array(0) {
+}
bool(false)
array(3) {
[0]=>
string(1) "a"
}
}
+array(0) {
+}
bool(false)
string(5) "00000"
done!
--TEST--
MySQL PDOStatement->nextRowSet()
---XFAIL--
-nextRowset() problem with stored proc & emulation mode & mysqlnd
--SKIPIF--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc');
string(1) "a"
}
}
+array(0) {
+}
bool(false)
array(1) {
[0]=>
string(1) "a"
}
}
+array(0) {
+}
bool(false)
Native PS...
array(1) {
string(1) "a"
}
}
+array(0) {
+}
bool(false)
array(1) {
[0]=>
string(1) "a"
}
}
+array(0) {
+}
bool(false)
done!