mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
Merge MWL#234: @@skip_replication, into latest MariaDB 5.5 for push
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
source include/not_embedded.inc;
|
||||
|
||||
--echo #
|
||||
--echo # Basic testing of replicate_events_marked_for_skip.
|
||||
--echo #
|
||||
|
||||
SET @save_replicate_events_marked_for_skip = @@GLOBAL.replicate_events_marked_for_skip;
|
||||
SELECT @save_replicate_events_marked_for_skip;
|
||||
|
||||
--echo # Scope.
|
||||
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET @@SESSION.replicate_events_marked_for_skip = "";
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@SESSION.replicate_events_marked_for_skip;
|
||||
|
||||
--echo # Argument syntax.
|
||||
|
||||
SET @@GLOBAL.replicate_events_marked_for_skip=filter_on_master;
|
||||
SELECT @@GLOBAL.replicate_events_marked_for_skip;
|
||||
SET @@GLOBAL.replicate_events_marked_for_skip=filter_on_slave;
|
||||
SELECT @@GLOBAL.replicate_events_marked_for_skip;
|
||||
SET @@GLOBAL.replicate_events_marked_for_skip=replicate;
|
||||
SELECT @@GLOBAL.replicate_events_marked_for_skip;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@GLOBAL.replicate_events_marked_for_skip=filter;
|
||||
SELECT @@GLOBAL.replicate_events_marked_for_skip;
|
||||
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='replicate_events_marked_for_skip';
|
||||
|
||||
--echo # Cleanup.
|
||||
SET @@GLOBAL.replicate_events_marked_for_skip = @save_replicate_events_marked_for_skip;
|
||||
30
mysql-test/suite/sys_vars/t/skip_replication_basic.test
Normal file
30
mysql-test/suite/sys_vars/t/skip_replication_basic.test
Normal file
@@ -0,0 +1,30 @@
|
||||
# exists as a session only
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@global.skip_replication;
|
||||
|
||||
# Check the variable has a valid numeric value (assumed to be less then 10000)
|
||||
select @@session.skip_replication between 1 and 10000;
|
||||
|
||||
--echo should be empty
|
||||
show global variables like 'skip_replication';
|
||||
show session variables like 'skip_replication';
|
||||
|
||||
# Global I_S variable is empty
|
||||
--echo should be empty
|
||||
select * from information_schema.global_variables where variable_name='skip_replication';
|
||||
|
||||
# Check that I_S value is same as variable
|
||||
select @@session.skip_replication = variable_value from information_schema.session_variables where variable_name='skip_replication';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set session skip_replication=0;
|
||||
select @@session.skip_replication;
|
||||
set session skip_replication=1;
|
||||
select @@session.skip_replication;
|
||||
select * from information_schema.global_variables where variable_name='skip_replication';
|
||||
select variable_value from information_schema.session_variables where variable_name='skip_replication';
|
||||
--error ER_LOCAL_VARIABLE
|
||||
set global skip_replication=1;
|
||||
Reference in New Issue
Block a user