summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index ddb5e2744cb..ed7cb1f4bd8 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -4792,7 +4792,8 @@ end_with_restore_list:
if (lock_tables_precheck(thd, all_tables))
goto error;
- thd->variables.option_bits|= OPTION_TABLE_LOCK;
+ thd->variables.option_bits|= OPTION_TABLE_LOCK | OPTION_NOT_AUTOCOMMIT;
+ thd->server_status&= ~SERVER_STATUS_AUTOCOMMIT;
res= lock_tables_open_and_lock_tables(thd, all_tables);