Author: uwendel
Date: 2008-04-02 15:01:46 +0200 (Wed, 02 Apr 2008)
New Revision: 1366
Added:
trunk/tests/ext/pdo_mysql/pdo_mysql_mantis_360.phpt
Log:
See Mantis #360, crash during second execution of PS
Added: trunk/tests/ext/pdo_mysql/pdo_mysql_mantis_360.phpt
===================================================================
--- trunk/tests/ext/pdo_mysql/pdo_mysql_mantis_360.phpt (rev 0)
+++ trunk/tests/ext/pdo_mysql/pdo_mysql_mantis_360.phpt 2008-04-02 13:01:46 UTC (rev 1366)
@@ -0,0 +1,42 @@
+--TEST--
+Mantis #360 - remove test after fix!
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('mysql_pdo_test.inc');
+MySQLPDOTest::skip();
+$db = MySQLPDOTest::factory();
+?>
+--FILE--
+<?php
+ require_once('mysql_pdo_test.inc');
+
+ $db = MySQLPDOTest::factory();
+ $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
+
+ if (!($stmt = $db->prepare('SELECT 1 AS col1')) || !$stmt->execute())
+ printf("[001] [%d] %s\n", $db->errorCode(), var_export($db->errorInfo(), true));
+
+ var_dump($stmt->fetch(PDO::FETCH_ASSOC));
+
+ if ($stmt->execute())
+ printf("[002] Second execution should have failed\n");
+ else
+ printf("[003] [%d] %s\n", $stmt->errorCode(), var_export($stmt->errorInfo(),
true));
+
+ var_dump($stmt->fetch(PDO::FETCH_ASSOC));
+
+ print "done!";
+--EXPECTF--
+array(1) {
+ ["col1"]=>
+ string(1) "1"
+}
+[003] [0] array (
+ 0 => '00000',
+)
+array(1) {
+ ["col1"]=>
+ string(1) "1"
+}
+done!
\ No newline at end of file
| Thread |
|---|
| • PHP mysqlnd svn commit: r1366 - trunk/tests/ext/pdo_mysql | uwendel | 2 Apr |