mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge mysql-5.1-rep+3 --> mysql-5.1-rep+2-delivery1
This commit is contained in:
@ -5487,21 +5487,26 @@ bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, ulong *yystacksize)
|
||||
|
||||
|
||||
/**
|
||||
Reset THD part responsible for command processing state.
|
||||
Reset the part of THD responsible for the state of command
|
||||
processing.
|
||||
|
||||
This needs to be called before execution of every statement
|
||||
(prepared or conventional).
|
||||
It is not called by substatements of routines.
|
||||
This needs to be called before execution of every statement
|
||||
(prepared or conventional). It is not called by substatements of
|
||||
routines.
|
||||
|
||||
@todo
|
||||
Make it a method of THD and align its name with the rest of
|
||||
reset/end/start/init methods.
|
||||
@todo
|
||||
Call it after we use THD for queries, not before.
|
||||
@todo Remove mysql_reset_thd_for_next_command and only use the
|
||||
member function.
|
||||
|
||||
@todo Call it after we use THD for queries, not before.
|
||||
*/
|
||||
|
||||
void mysql_reset_thd_for_next_command(THD *thd)
|
||||
{
|
||||
thd->reset_for_next_command();
|
||||
}
|
||||
|
||||
void THD::reset_for_next_command()
|
||||
{
|
||||
THD *thd= this;
|
||||
DBUG_ENTER("mysql_reset_thd_for_next_command");
|
||||
DBUG_ASSERT(!thd->spcont); /* not for substatements of routines */
|
||||
DBUG_ASSERT(! thd->in_sub_stmt);
|
||||
@ -5545,15 +5550,12 @@ void mysql_reset_thd_for_next_command(THD *thd)
|
||||
thd->rand_used= 0;
|
||||
thd->sent_row_count= thd->examined_row_count= 0;
|
||||
|
||||
/*
|
||||
Because we come here only for start of top-statements, binlog format is
|
||||
constant inside a complex statement (using stored functions) etc.
|
||||
*/
|
||||
thd->reset_current_stmt_binlog_row_based();
|
||||
thd->reset_current_stmt_binlog_format_row();
|
||||
thd->binlog_unsafe_warning_flags= 0;
|
||||
|
||||
DBUG_PRINT("debug",
|
||||
("current_stmt_binlog_row_based: %d",
|
||||
thd->current_stmt_binlog_row_based));
|
||||
("is_current_stmt_binlog_format_row(): %d",
|
||||
thd->is_current_stmt_binlog_format_row()));
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
Reference in New Issue
Block a user