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).
parent 831a6124
Branches unavailable
Tags unavailable
No related merge requests found
......@@ -2041,7 +2041,9 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
close_thread_tables(thd);
TABLE_LIST *save_next= table->next;
table->next= 0;
tmp_disable_binlog(thd); // binlogging is done by caller if wanted
result_code= mysql_recreate_table(thd, table, 0);
reenable_binlog(thd);
close_thread_tables(thd);
if (!result_code) // recreation went ok
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment