summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/include/rpl_set_statement.inc
blob: d1a1a6c03453490f833407d0b7b352316b92e60f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#Check if the variable is replicated correctly with "SET STATEMENT"
# Usage:
# $rpl_ssvt_var_name - the name of tested variable;
# $rpl_ssvt_var_value - the value to set; 
# $rpl_ssvt_table - the table name to insert values.

--connection master
eval SELECT @@$rpl_ssvt_var_name;

--connection slave
eval SELECT @@$rpl_ssvt_var_name;

--connection master
--disable_result_log
eval SET STATEMENT $rpl_ssvt_var_name=$rpl_ssvt_var_value FOR
       INSERT INTO $rpl_ssvt_table VALUES(@@$rpl_ssvt_var_name);
--enable_result_log
eval SELECT @@$rpl_ssvt_var_name;

--sync_slave_with_master
eval SELECT * FROM $rpl_ssvt_table;
eval SELECT @@$rpl_ssvt_var_name;

--connection master
eval DELETE FROM $rpl_ssvt_table;