mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Implement MarkM optimization request to avoid redundnat packet exchange
in cursors.
This commit is contained in:
@ -4907,13 +4907,12 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
|
||||
{
|
||||
MYSQL *mysql= stmt->mysql;
|
||||
MYSQL_DATA *result= &stmt->result;
|
||||
my_bool has_cursor= stmt->read_row_func == stmt_read_row_from_cursor;
|
||||
|
||||
/*
|
||||
Reset stored result set if so was requested or it's a part
|
||||
of cursor fetch.
|
||||
*/
|
||||
if (result->data && (has_cursor || (flags & RESET_STORE_RESULT)))
|
||||
if (result->data && (flags & RESET_STORE_RESULT))
|
||||
{
|
||||
/* Result buffered */
|
||||
free_root(&result->alloc, MYF(MY_KEEP_PREALLOC));
|
||||
@ -4944,7 +4943,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
|
||||
mysql->status= MYSQL_STATUS_READY;
|
||||
}
|
||||
}
|
||||
if (has_cursor || (flags & RESET_SERVER_SIDE))
|
||||
if (flags & RESET_SERVER_SIDE)
|
||||
{
|
||||
/*
|
||||
Reset the server side statement and close the server side
|
||||
|
Reference in New Issue
Block a user