summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/sys_vars/t/replicate_do_table_basic.test
blob: 346bdf3b038aa3607a476fc9ce7183087396269b (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--source include/not_embedded.inc

--echo #
--echo # Basic testing of replicate_do_table.
--echo #

SET @save_replicate_do_table = @@GLOBAL.replicate_do_table;
SELECT @save_replicate_do_table;

--echo # Scope.

--error ER_GLOBAL_VARIABLE
SET @@SESSION.replicate_do_table = "";
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@SESSION.replicate_do_table;

--echo # Incorrect type.

--error ER_WRONG_TYPE_FOR_VAR
SET @@GLOBAL.replicate_do_table=1;
--error ER_WRONG_TYPE_FOR_VAR
SET @@GLOBAL.replicate_do_table=1.1;
--error ER_WRONG_TYPE_FOR_VAR
SET @@GLOBAL.replicate_do_table=1e1;

--echo # Incorrect arguments.

--error ER_WRONG_ARGUMENTS
SET @@GLOBAL.replicate_do_table="t1";
--error ER_WRONG_ARGUMENTS
SET @@GLOBAL.replicate_do_table="test.t1, t2";
--error ER_WRONG_ARGUMENTS
SET @@GLOBAL.replicate_do_table="test.,t1";

--echo # Argument syntax.

SET @@GLOBAL.replicate_do_table="test.t1,,,,,test.t3";
SELECT @@GLOBAL.replicate_do_table;
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='replicate_do_table';

SET @@GLOBAL.replicate_do_table="test.t1,,,test2.t2,,,test.t3";
SELECT @@GLOBAL.replicate_do_table;

SET @@GLOBAL.replicate_do_table="";
SELECT @@GLOBAL.replicate_do_table;

SET @@GLOBAL.replicate_do_table=null;
SELECT @@GLOBAL.replicate_do_table;

--echo # Cleanup.
SET @@GLOBAL.replicate_do_table = @save_replicate_do_table;