mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Fix a bug that a statement that is reset doesn't clean
the wire properly (as it is done when the statement is closed). If there is more that one result sets returned from the PS (like a call to SP that returns at least one RSet next to the status rset) then the line was blocked. PS Multi-Res is not supported in any libmysql from a GA-ed MySQL.
This commit is contained in:
parent
3ff193c05e
commit
4941b23bcd
@ -1120,16 +1120,18 @@ MYSQLND_METHOD(mysqlnd_stmt, reset)(MYSQLND_STMT * const s TSRMLS_DC)
|
||||
We have to call the appropriate use_result() or store_result() and
|
||||
clean.
|
||||
*/
|
||||
if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) {
|
||||
DBG_INF("fetching result set header");
|
||||
stmt->default_rset_handler(s TSRMLS_CC);
|
||||
stmt->state = MYSQLND_STMT_USER_FETCHING;
|
||||
}
|
||||
do {
|
||||
if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) {
|
||||
DBG_INF("fetching result set header");
|
||||
stmt->default_rset_handler(s TSRMLS_CC);
|
||||
stmt->state = MYSQLND_STMT_USER_FETCHING;
|
||||
}
|
||||
|
||||
if (stmt->result) {
|
||||
DBG_INF("skipping result");
|
||||
stmt->result->m.skip_result(stmt->result TSRMLS_CC);
|
||||
}
|
||||
if (stmt->result) {
|
||||
DBG_INF("skipping result");
|
||||
stmt->result->m.skip_result(stmt->result TSRMLS_CC);
|
||||
}
|
||||
} while (mysqlnd_stmt_more_results(s) && mysqlnd_stmt_next_result(s) == PASS);
|
||||
|
||||
/*
|
||||
Don't free now, let the result be usable. When the stmt will again be
|
||||
|
Loading…
Reference in New Issue
Block a user