1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

BUG#39934: Slave stops for engine that only support row-based logging

This is a post-push fix addressing review requests and
problems with extra warnings.

Problem 1: The sub-statement where an unsafe warning was detected was
printed as part of the warning. This was ok for statements that
were unsafe due to, e.g., calls to UUID(), but did not make
sense for statements that were unsafe because there was more than
one autoincrement column (unsafeness in this case comes from the
combination of several sub-statements).
Fix 1: Instead of printing the sub-statement, print an explanation
of why the statement is unsafe.

Problem 2:
When a recursive construct (i.e., stored proceure, stored
function, trigger, view, prepared statement) contained several
sub-statements, and at least one of them was unsafe, there would be
one unsafeness warning per sub-statement - even for safe
sub-statements.
Fix 2:
Ensure that each type of warning is printed at most once, by
remembering throughout the execution of the statement which types
of warnings have been printed.
This commit is contained in:
Sven Sandberg
2009-07-22 18:16:17 +02:00
parent a14adb8773
commit 931ac1d781
25 changed files with 1674 additions and 968 deletions

View File

@ -5609,19 +5609,18 @@ 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();
@ -5674,7 +5673,7 @@ void THD::reset_for_next_command()
thd->sent_row_count= thd->examined_row_count= 0;
thd->reset_current_stmt_binlog_row_based();
thd->binlog_warning_flags= 0;
thd->binlog_unsafe_warning_flags= 0;
DBUG_PRINT("debug",
("current_stmt_binlog_row_based: %d",