mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +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:
@@ -313,6 +313,7 @@ public:
|
||||
|
||||
void start_union_events(THD *thd);
|
||||
void stop_union_events(THD *thd);
|
||||
bool is_query_in_union(THD *thd, query_id_t query_id_param);
|
||||
|
||||
/*
|
||||
v stands for vector
|
||||
@@ -1303,8 +1304,9 @@ public:
|
||||
/* variables.transaction_isolation is reset to this after each commit */
|
||||
enum_tx_isolation session_tx_isolation;
|
||||
enum_check_fields count_cuted_fields;
|
||||
/* for user variables replication*/
|
||||
DYNAMIC_ARRAY user_var_events;
|
||||
|
||||
DYNAMIC_ARRAY user_var_events; /* For user variables replication */
|
||||
MEM_ROOT *user_var_events_alloc; /* Allocate above array elements here */
|
||||
|
||||
enum killed_state { NOT_KILLED=0, KILL_BAD_DATA=1, KILL_CONNECTION=ER_SERVER_SHUTDOWN, KILL_QUERY=ER_QUERY_INTERRUPTED };
|
||||
killed_state volatile killed;
|
||||
@@ -1366,6 +1368,12 @@ public:
|
||||
mysql_bin_log.start_union_events() call.
|
||||
*/
|
||||
bool unioned_events_trans;
|
||||
|
||||
/*
|
||||
'queries' (actually SP statements) that run under inside this binlog
|
||||
union have thd->query_id >= first_query_id.
|
||||
*/
|
||||
query_id_t first_query_id;
|
||||
} binlog_evt_union;
|
||||
|
||||
THD();
|
||||
|
||||
Reference in New Issue
Block a user