1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

merged fixes for BUG#39934 to 5.1-rpl+3

Also renamed current_stmt_binlog_row_based to
current_stmt_binlog_format_row for consistency
This commit is contained in:
Sven Sandberg
2009-09-30 18:00:22 +02:00
123 changed files with 6016 additions and 6594 deletions

View File

@@ -5608,21 +5608,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);
@@ -5666,15 +5671,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;
}