mirror of
https://github.com/MariaDB/server.git
synced 2025-05-08 15:01:49 +03:00
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.
49 lines
1.3 KiB
Plaintext
49 lines
1.3 KiB
Plaintext
--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;
|
|
|
|
--echo # Cleanup.
|
|
SET @@GLOBAL.replicate_do_table = @save_replicate_do_table;
|