summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/t/replicate_ignore_db_basic.test
blob: 3a0bc88109aae18078ebcf6219c0ca1dd055789f (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
--source include/not_embedded.inc

--echo #
--echo # Basic testing of replicate_ignore_db.
--echo #

SET @save_replicate_ignore_db = @@GLOBAL.replicate_ignore_db;
SELECT @save_replicate_ignore_db;

--echo # Scope.

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

--echo # Incorrect type.

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

--echo # Argument syntax.

SET @@GLOBAL.replicate_ignore_db="db1,,,,,db3";
SELECT @@GLOBAL.replicate_ignore_db;
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='replicate_ignore_db';

SET @@GLOBAL.replicate_ignore_db="db1,,,db2,,,db3";
SELECT @@GLOBAL.replicate_ignore_db;

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

--echo # Cleanup.
SET @@GLOBAL.replicate_ignore_db = @save_replicate_ignore_db;