summaryrefslogtreecommitdiff
path: root/sql/sql_do.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_do.cc')
-rw-r--r--sql/sql_do.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_do.cc b/sql/sql_do.cc
index 79e488ac2a5..085473c24b8 100644
--- a/sql/sql_do.cc
+++ b/sql/sql_do.cc
@@ -39,9 +39,10 @@ bool mysql_do(THD *thd, List<Item> &values)
/*
Rollback the effect of the statement, since next instruction
will clear the error and the rollback in the end of
- dispatch_command() won't work.
+ mysql_execute_command() won't work.
*/
- trans_rollback_stmt(thd);
+ if (! thd->in_sub_stmt)
+ trans_rollback_stmt(thd);
thd->clear_error(); // DO always is OK
}
my_ok(thd);