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.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 98199ed22f1..cb2fa0f7014 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1978,6 +1978,12 @@ mysql_execute_command(THD *thd)
DBUG_ENTER("mysql_execute_command");
/*
+ Remember first generated insert id value of the previous
+ statement.
+ */
+ thd->current_insert_id= thd->last_insert_id;
+
+ /*
Reset warning count for each query that uses tables
A better approach would be to reset this for any commands
that is not a SHOW command or a select that only access local