> #At file:///home/daogangqu/mysql/bzrwork/bug49137/mysql-5.0-bugteam/ based on
> 2835 Dao-Gang.Qu@stripped 2010-01-06
> Bug #49137 Replication failure on SBR/MBR + multi-table DROP TEMPORARY TABLE
> Fixed valgrind failure on PB2.
> @ sql/log_event.cc
> Added code to fix valgrind failure on PB2.
> === modified file 'sql/log_event.cc'
> --- a/sql/log_event.cc 2009-12-31 03:33:10 +0000
> +++ b/sql/log_event.cc 2010-01-06 02:36:29 +0000
> @@ -2110,8 +2110,8 @@ compare_errors:
> has already been dropped. To ignore such irrelevant "table does
> not exist errors", we silently clear the error if TEMPORARY was used.
> - if (thd->lex->drop_temporary &&
> - thd->net.last_errno == ER_BAD_TABLE_ERROR && !expected_error)
> + if (thd->net.last_errno == ER_BAD_TABLE_ERROR &&
> + !expected_error && thd->lex->drop_temporary)
This patch is not correct, thd->lex->drop_temporary will only be
initialized for DROP command, so I think you have to check that
thd->lex->sql_command == SQLCOM_DROP_TABLE before check for
Something like this:
if (thd->lex->sql_command == SQLCOM_DROP_TABLE &&
thd->lex->drop_temporary && ....)
> If we expected a non-zero error code, and we don't get the same error