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

Fixed bug mdev-485.

RBR should be turned off when statistical tables are modified 
in the result of the execution of a DDL statement.
Revised the fix for bug mdev-463. Ensured suppression of RBR
for the modifications of the statistical tables triggered
by the execution of any analyze operation.
This commit is contained in:
Igor Babaev
2012-09-10 22:22:57 -07:00
parent 8c131f1262
commit ff36e9fc51
6 changed files with 169 additions and 10 deletions

View File

@ -323,7 +323,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
int result_code;
int compl_result_code;
bool need_repair_or_alter= 0;
bool save_binlog_row_based= 0;
DBUG_ENTER("mysql_admin_table");
DBUG_PRINT("enter", ("extra_open_options: %u", extra_open_options));
@ -418,11 +417,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
*/
open_error= open_and_lock_tables(thd, table, TRUE, 0);
if (lex->sql_command == SQLCOM_ANALYZE)
{
if ((save_binlog_row_based= thd->is_current_stmt_binlog_format_row()))
thd->clear_current_stmt_binlog_format_row();
}
}
thd->prepare_derived_at_open= FALSE;
@ -962,8 +956,6 @@ send_result_message:
trans_commit_stmt(thd);
trans_commit_implicit(thd);
close_thread_tables(thd);
if (save_binlog_row_based)
thd->set_current_stmt_binlog_format_row();
thd->mdl_context.release_transactional_locks();
/*
@ -996,8 +988,6 @@ err:
trans_rollback_stmt(thd);
trans_rollback(thd);
close_thread_tables(thd); // Shouldn't be needed
if (save_binlog_row_based)
thd->set_current_stmt_binlog_format_row();
thd->mdl_context.release_transactional_locks();
if (table)
table->table=0;