--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;

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

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