Commit 6dd6f607 authored by unknown's avatar unknown

Fix "jump to label crosses initialization" compile error.

parent dd918a71
...@@ -41,6 +41,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ...@@ -41,6 +41,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
uint usable_index= MAX_KEY; uint usable_index= MAX_KEY;
SELECT_LEX *select_lex= &thd->lex->select_lex; SELECT_LEX *select_lex= &thd->lex->select_lex;
bool ha_delete_all_rows= 0; bool ha_delete_all_rows= 0;
ulonglong const saved_options= thd->options;
DBUG_ENTER("mysql_delete"); DBUG_ENTER("mysql_delete");
if (open_and_lock_tables(thd, table_list)) if (open_and_lock_tables(thd, table_list))
...@@ -205,11 +206,10 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ...@@ -205,11 +206,10 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
will_batch= !table->file->start_bulk_delete(); will_batch= !table->file->start_bulk_delete();
/* /*
Save the thread options before clearing the OPTION_BIN_LOG, We saved the thread options above before clearing the
effectively disabling the binary log (unless it was already OPTION_BIN_LOG, and will restore below, effectively disabling the
disabled, of course). binary log (unless it was already disabled, of course).
*/ */
ulonglong const saved_options= thd->options;
if (ha_delete_all_rows) if (ha_delete_all_rows)
thd->options&= ~static_cast<ulonglong>(OPTION_BIN_LOG); thd->options&= ~static_cast<ulonglong>(OPTION_BIN_LOG);
......
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