mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
commit
d63aedd173
3 changed files with 42 additions and 0 deletions
2
NEWS
2
NEWS
|
@ -49,6 +49,8 @@ PHP NEWS
|
||||||
queries"). (Nikita)
|
queries"). (Nikita)
|
||||||
. Fixed bug #71145 (Multiple statements in init command triggers unbuffered
|
. Fixed bug #71145 (Multiple statements in init command triggers unbuffered
|
||||||
query error). (Nikita)
|
query error). (Nikita)
|
||||||
|
. Fixed bug #76815 (PDOStatement cannot be GCed/closeCursor-ed when a
|
||||||
|
PROCEDURE resultset SIGNAL). (Nikita)
|
||||||
|
|
||||||
- Phar:
|
- Phar:
|
||||||
. Fixed bug #73809 (Phar Zip parse crash - mmap fail). (cmb)
|
. Fixed bug #73809 (Phar Zip parse crash - mmap fail). (cmb)
|
||||||
|
|
|
@ -1357,6 +1357,13 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const c
|
||||||
UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet.server_status);
|
UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet.server_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ret == FAIL) {
|
||||||
|
/* Error packets do not contain server status information. However, we know that after
|
||||||
|
* an error there will be no further result sets. */
|
||||||
|
UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status,
|
||||||
|
UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & ~SERVER_MORE_RESULTS_EXISTS);
|
||||||
|
}
|
||||||
|
|
||||||
/* save some memory */
|
/* save some memory */
|
||||||
if (free_rows) {
|
if (free_rows) {
|
||||||
/* don't try to allocate more than possible - mnd_XXalloc expects size_t, and it can have narrower range than uint64_t */
|
/* don't try to allocate more than possible - mnd_XXalloc expects size_t, and it can have narrower range than uint64_t */
|
||||||
|
|
33
ext/pdo_mysql/tests/bug76815.phpt
Normal file
33
ext/pdo_mysql/tests/bug76815.phpt
Normal file
|
@ -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.
|
Loading…
Add table
Add a link
Reference in a new issue