mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user