mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge branch '5.5' into 10.0
This commit is contained in:
@ -3858,6 +3858,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
|
||||
Statement stmt_backup;
|
||||
Query_arena *old_stmt_arena;
|
||||
bool error= TRUE;
|
||||
bool qc_executed= FALSE;
|
||||
|
||||
char saved_cur_db_name_buf[SAFE_NAME_LEN+1];
|
||||
LEX_STRING saved_cur_db_name=
|
||||
@ -3980,6 +3981,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
|
||||
thd->lex->sql_command= SQLCOM_SELECT;
|
||||
status_var_increment(thd->status_var.com_stat[SQLCOM_SELECT]);
|
||||
thd->update_stats();
|
||||
qc_executed= TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4018,7 +4020,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
|
||||
thd->set_statement(&stmt_backup);
|
||||
thd->stmt_arena= old_stmt_arena;
|
||||
|
||||
if (state == Query_arena::STMT_PREPARED)
|
||||
if (state == Query_arena::STMT_PREPARED && !qc_executed)
|
||||
state= Query_arena::STMT_EXECUTED;
|
||||
|
||||
if (error == 0 && this->lex->sql_command == SQLCOM_CALL)
|
||||
|
Reference in New Issue
Block a user