summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorunknown <aelkin/andrei@mysql1000.(none)>2008-03-29 15:00:12 +0200
committerunknown <aelkin/andrei@mysql1000.(none)>2008-03-29 15:00:12 +0200
commit6630d2e18ca89fb35fa87aea09784dad55822d29 (patch)
treeb69f6a865d08077895e9ab32d8392e140da59380 /sql/sql_class.cc
parentcfc420976ec6739ebea4e09518dac4f79c693104 (diff)
parent4020e6a2d7910be74c0f22e884c6f4ee8ba7865b (diff)
downloadmariadb-git-6630d2e18ca89fb35fa87aea09784dad55822d29.tar.gz
Merge mysql1000.(none):/home/andrei/MySQL/MERGE/5.0-main2rpl
into mysql1000.(none):/home/andrei/MySQL/MERGE/5.1-main2rpl BitKeeper/deleted/.del-binlog_killed_simulate.result: Auto merged BitKeeper/deleted/.del-show_binlog_events.inc: Auto merged mysql-test/suite/rpl/r/rpl_user.result: Auto merged storage/blackhole/ha_blackhole.cc: Auto merged BitKeeper/deleted/.del-show_binary_logs.inc: Delete: mysql-test/include/show_binary_logs.inc mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: manual merge ul. mysql-test/extra/binlog_tests/blackhole.test: manual merge mysql-test/suite/binlog/r/binlog_stm_blackhole.result: manual merge sql/log.cc: manual merge sql/share/errmsg.txt: manual merge sql/sql_class.cc: manual merge
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 48ab3ea64c1..247cccfa838 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1069,6 +1069,19 @@ bool THD::store_globals()
void THD::cleanup_after_query()
{
+ last_insert_id_used= FALSE;
+ if (clear_next_insert_id)
+ {
+ clear_next_insert_id= 0;
+ next_insert_id= 0;
+
+ /*
+ BUG#33029, if one statement in a SP set this member to 1, all
+ statment after this statement in the SP would be considered used
+ INSERT_ID value, reset this member after each query to fix this.
+ */
+ insert_id_used= 0;
+ }
/*
Reset rand_used so that detection of calls to rand() will save random
seeds if needed by the slave.