-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When we receive an error while reading a result set, we should assume that no more result sets are available. libmysqlclient implements the same behavior.
- Loading branch information
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--TEST-- | ||
Bug #76815: PDOStatement cannot be GCed/closeCursor-ed when a PROCEDURE resultset SIGNAL | ||
--SKIPIF-- | ||
<?php | ||
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); | ||
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); | ||
MySQLPDOTest::skip(); | ||
?> | ||
--FILE-- | ||
<?php | ||
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); | ||
|
||
$pdo = MySQLPDOTest::factory(); | ||
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | ||
|
||
$pdo->query('DROP FUNCTION IF EXISTS tst'); | ||
$pdo->query('DROP PROCEDURE IF EXISTS tst2'); | ||
$pdo->query('CREATE FUNCTION tst() RETURNS VARCHAR(5) DETERMINISTIC BEGIN RETURN \'x12345\'; END'); | ||
$pdo->query('CREATE PROCEDURE tst2() BEGIN SELECT tst(); END'); | ||
|
||
$st = $pdo->prepare('CALL tst2()'); | ||
try { | ||
$st->execute(); | ||
} catch (PDOException $ex) { | ||
echo $ex->getMessage(), "\n"; | ||
} | ||
unset($st); | ||
echo "Ok.\n"; | ||
|
||
?> | ||
--EXPECT-- | ||
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'tst()' at row 1 | ||
Ok. |