1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for BUG#9149 "OPTIMIZE TABLE statement on InnoDB table is logged twice in the binary log"

if we fall back to mysql_alter_table() (for InnoDB), don't do binlogging in mysql_alter_table(), as mysql_admin_table()
is not supposed to do any binlogging (it is done by the caller).


sql/sql_table.cc:
  When optimizing a table, if we fall back to mysql_alter_table()
  (for InnoDB), don't do binlogging in mysql_alter_table(), as mysql_admin_table()
  is not supposed to do any binlogging (it is done by the caller).
This commit is contained in:
unknown
2005-04-11 16:46:03 +02:00
parent 93b4fbea92
commit 30a82dfb7d

View File

@ -2041,7 +2041,9 @@ send_result_message:
close_thread_tables(thd); close_thread_tables(thd);
TABLE_LIST *save_next= table->next; TABLE_LIST *save_next= table->next;
table->next= 0; table->next= 0;
tmp_disable_binlog(thd); // binlogging is done by caller if wanted
result_code= mysql_recreate_table(thd, table, 0); result_code= mysql_recreate_table(thd, table, 0);
reenable_binlog(thd);
close_thread_tables(thd); close_thread_tables(thd);
if (!result_code) // recreation went ok if (!result_code) // recreation went ok
{ {