diff options
author | Igor Babaev <igor@askmonty.org> | 2012-08-20 12:05:37 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-08-20 12:05:37 -0700 |
commit | fb69d6426563db40e1558391cecb84ee2eaef8bb (patch) | |
tree | 1f3c7adcd22cd27d1e1790ad4beab765a54ff4dc /sql | |
parent | fd7059d20859863a146cd306b88ac6e9817622fd (diff) | |
download | mariadb-git-fb69d6426563db40e1558391cecb84ee2eaef8bb.tar.gz |
Fixed bug mdev-463.
RBR should be turned off when an ANALYZE TABLE command is executed.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_admin.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 047b8bac94e..e00b35a19db 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -322,6 +322,8 @@ 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)); @@ -415,6 +417,11 @@ 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; @@ -954,6 +961,8 @@ 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(); /* @@ -986,6 +995,8 @@ 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; |