mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Fix #41997: SP call yields additional empty result set
When stored procedures are called, the "final result set is a status result that includes no result set". Calling `::nextRowset()` on the actual last result set should return FALSE, since there is actually no further result set to be processed.
This commit is contained in:
parent
9c3b7ccda5
commit
41a4379cb4
5 changed files with 5 additions and 8 deletions
3
NEWS
3
NEWS
|
@ -18,6 +18,9 @@ PHP NEWS
|
||||||
- ODBC:
|
- ODBC:
|
||||||
. Fixed bug #78473 (odbc_close() closes arbitrary resources). (cmb)
|
. Fixed bug #78473 (odbc_close() closes arbitrary resources). (cmb)
|
||||||
|
|
||||||
|
- PDO_MySQL:
|
||||||
|
. Fixed bug #41997 (SP call yields additional empty result set). (cmb)
|
||||||
|
|
||||||
29 Aug 2019, PHP 7.2.22
|
29 Aug 2019, PHP 7.2.22
|
||||||
|
|
||||||
- Core:
|
- Core:
|
||||||
|
|
|
@ -425,14 +425,14 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt) /* {{{ */
|
||||||
pdo_mysql_error_stmt(stmt);
|
pdo_mysql_error_stmt(stmt);
|
||||||
PDO_DBG_RETURN(0);
|
PDO_DBG_RETURN(0);
|
||||||
} else {
|
} else {
|
||||||
PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt));
|
PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt) && stmt->row_count);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (mysql_next_result(H->server) > 0) {
|
if (mysql_next_result(H->server) > 0) {
|
||||||
pdo_mysql_error_stmt(stmt);
|
pdo_mysql_error_stmt(stmt);
|
||||||
PDO_DBG_RETURN(0);
|
PDO_DBG_RETURN(0);
|
||||||
} else {
|
} else {
|
||||||
PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt));
|
PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt) && stmt->row_count);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,6 @@ if ($version < 50000)
|
||||||
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
|
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
|
||||||
$matches[0], $matches[1], $matches[2], $version));
|
$matches[0], $matches[1], $matches[2], $version));
|
||||||
?>
|
?>
|
||||||
--XFAIL--
|
|
||||||
nextRowset() problem with stored proc & emulation mode & mysqlnd
|
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
|
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
PDO MySQL Bug #41997 (stored procedure call returning single rowset blocks future queries)
|
PDO MySQL Bug #41997 (stored procedure call returning single rowset blocks future queries)
|
||||||
--XFAIL--
|
|
||||||
nextRowset() problem with stored proc & emulation mode & mysqlnd
|
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php
|
<?php
|
||||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
|
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
MySQL Prepared Statements and different column counts
|
MySQL Prepared Statements and different column counts
|
||||||
--XFAIL--
|
|
||||||
nextRowset() problem with stored proc & emulation mode & mysqlnd
|
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php
|
<?php
|
||||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
|
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue