summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/r/replicate_wild_do_table_basic.result
diff options
context:
space:
mode:
authorDavi Arnaut <davi@twitter.com>2012-03-19 15:00:23 -0700
committerunknown <knielsen@knielsen-hq.org>2012-03-19 15:00:23 -0700
commit9584cbe7fcc4ea98598087848f96c5e28c15d1d8 (patch)
tree57c734af5b99a03e1bdc8fb02ac4de1e7a72fc02 /mysql-test/suite/sys_vars/r/replicate_wild_do_table_basic.result
parent7789f3d56738c581d8e805650f83b626381075ea (diff)
downloadmariadb-git-9584cbe7fcc4ea98598087848f96c5e28c15d1d8.tar.gz
Make Replication filter settings dynamic.
Make the slave options --replicate-* dynamic variables so that these options can be changed dynamically while the server is running, which enables users to modify replication filtering rules without having to stop and restart the server. This is accomplished by just requiring that the slave threads are stopped when these options are set dynamically. Since filtering rules are only used by the SQL slave thread, setting them while the thread is not running avoids the need for locking.
Diffstat (limited to 'mysql-test/suite/sys_vars/r/replicate_wild_do_table_basic.result')
-rw-r--r--mysql-test/suite/sys_vars/r/replicate_wild_do_table_basic.result44
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/suite/sys_vars/r/replicate_wild_do_table_basic.result b/mysql-test/suite/sys_vars/r/replicate_wild_do_table_basic.result
new file mode 100644
index 00000000000..5647cc964fb
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/replicate_wild_do_table_basic.result
@@ -0,0 +1,44 @@
+#
+# Basic testing of replicate_wild_do_table.
+#
+SET @save_replicate_wild_do_table = @@GLOBAL.replicate_wild_do_table;
+SELECT @save_replicate_wild_do_table;
+@save_replicate_wild_do_table
+
+# Scope.
+SET @@SESSION.replicate_wild_do_table = "";
+ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@SESSION.replicate_wild_do_table;
+ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable
+# Incorrect type.
+SET @@GLOBAL.replicate_wild_do_table=1;
+ERROR 42000: Incorrect argument type to variable 'replicate_wild_do_table'
+SET @@GLOBAL.replicate_wild_do_table=1.1;
+ERROR 42000: Incorrect argument type to variable 'replicate_wild_do_table'
+SET @@GLOBAL.replicate_wild_do_table=1e1;
+ERROR 42000: Incorrect argument type to variable 'replicate_wild_do_table'
+# Incorrect arguments.
+SET @@GLOBAL.replicate_wild_do_table="t1";
+ERROR HY000: Incorrect arguments to SET
+SET @@GLOBAL.replicate_wild_do_table="test.t, t2";
+ERROR HY000: Incorrect arguments to SET
+SET @@GLOBAL.replicate_wild_do_table="test.,t1";
+ERROR HY000: Incorrect arguments to SET
+# Argument syntax.
+SET @@GLOBAL.replicate_wild_do_table="test.%,,,,,test.t3";
+SELECT @@GLOBAL.replicate_wild_do_table;
+@@GLOBAL.replicate_wild_do_table
+test.%,test.t3
+SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='replicate_wild_do_table';
+VARIABLE_NAME VARIABLE_VALUE
+REPLICATE_WILD_DO_TABLE test.%,test.t3
+SET @@GLOBAL.replicate_wild_do_table="test.t1,,,test2.%,,,test.t3";
+SELECT @@GLOBAL.replicate_wild_do_table;
+@@GLOBAL.replicate_wild_do_table
+test.t1,test2.%,test.t3
+SET @@GLOBAL.replicate_wild_do_table="";
+SELECT @@GLOBAL.replicate_wild_do_table;
+@@GLOBAL.replicate_wild_do_table
+
+# Cleanup.
+SET @@GLOBAL.replicate_wild_do_table = @save_replicate_wild_do_table;