summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/include/rpl_set_statement.inc
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl/include/rpl_set_statement.inc')
-rw-r--r--mysql-test/suite/rpl/include/rpl_set_statement.inc26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/include/rpl_set_statement.inc b/mysql-test/suite/rpl/include/rpl_set_statement.inc
new file mode 100644
index 00000000..d1a1a6c0
--- /dev/null
+++ b/mysql-test/suite/rpl/include/rpl_set_statement.inc
@@ -0,0 +1,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;
+