summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2005-09-07 19:39:47 +0400
committerunknown <sergefp@mysql.com>2005-09-07 19:39:47 +0400
commiteb769e54b8ab429cb86502866d438a44fcee7473 (patch)
treeba7b8bc9c0f63f3e1ee4affcb7925908a091e707 /sql/sql_parse.cc
parent59be84d3cb7cc3aafad83484d425f0e25f03dd43 (diff)
downloadmariadb-git-eb769e54b8ab429cb86502866d438a44fcee7473.tar.gz
Fix for BUG#12637: Make SPs+user variables replication work:
* Allocate thd->user_var_events elements on appropriate mem_root * If several SP statements are binlogged as a single statement, collect all user var accesses they make (grep for StoredRoutinesBinlogging for details) mysql-test/r/rpl_sp_effects.result: Testcase for BUG#12637 mysql-test/r/sp.result: re-enabled test case for BUG#12297 mysql-test/t/rpl_sp_effects.test: Testcase for BUG#12637 mysql-test/t/sp.test: re-enabled test case for BUG#12297 sql/item_func.cc: Fix for BUG#12637: Make SPs+user variables replication work: * Allocate thd->user_var_events elements on appropriate mem_root * If several SP statements are binlogged as a single statement, collect all user var accesses they make. sql/log.cc: Fix for BUG#12637: Make SPs+user variables replication work: * Allocate thd->user_var_events elements on appropriate mem_root * If several SP statements are binlogged as a single statement, collect all user var accesses they make. sql/sp_head.cc: Fix for BUG#12637: Make SPs+user variables replication work: * Allocate thd->user_var_events elements on appropriate mem_root * If several SP statements are binlogged as a single statement, collect all user var accesses they make. sql/sp_head.h: Remove compiler warning. sql/sql_class.h: Fix for BUG#12637: Make SPs+user variables replication work. sql/sql_parse.cc: Fix for BUG#12637: Make SPs+user variables replication work.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index e3f9c0dc148..31582e7b2f4 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -5162,7 +5162,10 @@ void mysql_reset_thd_for_next_command(THD *thd)
if (!thd->in_sub_stmt)
{
if (opt_bin_log)
+ {
reset_dynamic(&thd->user_var_events);
+ thd->user_var_events_alloc= thd->mem_root;
+ }
thd->clear_error();
thd->total_warn_count=0; // Warnings for this query
thd->rand_used= 0;