mirror of
https://github.com/MariaDB/server.git
synced 2025-05-07 04:01:59 +03:00
Change of user interface to be more logical and more in line with expectations to work similar to old-style replication. User can now explicitly choose in CHANGE MASTER whether binlog position is taken into account (master_gtid_pos=current_pos) or not (master_gtid_pos= slave_pos) when slave connects to master. @@gtid_pos is replaced by three separate variables @@gtid_slave_pos (can be set by user, replicated GTIDs only), @@gtid_binlog_pos (read only), and @@gtid_current_pos (a combination of the two, most recent GTID within each domain). mysql.rpl_slave_state is renamed to mysql.gtid_slave_pos to match. This fixes MDEV-4474.
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
--source include/not_embedded.inc
|
|
|
|
SET @old_gtid_slave_pos= @@gtid_slave_pos;
|
|
|
|
SET GLOBAL gtid_slave_pos= '';
|
|
SELECT @@gtid_slave_pos;
|
|
SET GLOBAL gtid_slave_pos= '1-2-3';
|
|
SELECT variable_value FROM information_schema.global_variables
|
|
WHERE variable_name='gtid_slave_pos';
|
|
SET @@global.gtid_slave_pos= '1-2-4';
|
|
SELECT @@gtid_slave_pos;
|
|
|
|
SET GLOBAL gtid_slave_pos= ' 1-2-3';
|
|
SELECT @@gtid_slave_pos;
|
|
SET GLOBAL gtid_slave_pos= '1-2-3, 2-4-6';
|
|
SELECT @@gtid_slave_pos;
|
|
|
|
--error ER_INCORRECT_GTID_STATE
|
|
SET GLOBAL gtid_slave_pos= '-1-2-3';
|
|
--error ER_INCORRECT_GTID_STATE
|
|
SET GLOBAL gtid_slave_pos= '1-2 -3';
|
|
--error ER_INCORRECT_GTID_STATE
|
|
SET GLOBAL gtid_slave_pos= '1-2-3 ';
|
|
--error ER_INCORRECT_GTID_STATE
|
|
SET GLOBAL gtid_slave_pos= '1-2-3,2-4';
|
|
|
|
--error ER_DUPLICATE_GTID_DOMAIN
|
|
SET GLOBAL gtid_slave_pos= '0-1-10,0-2-20';
|
|
--error ER_DUPLICATE_GTID_DOMAIN
|
|
SET GLOBAL gtid_slave_pos= '0-1-10,1-2-20,2-3-30,1-20-200,3-4-1';
|
|
|
|
--error ER_GLOBAL_VARIABLE
|
|
SET gtid_slave_pos= '';
|
|
--error ER_GLOBAL_VARIABLE
|
|
SET SESSION gtid_slave_pos= '';
|
|
|
|
SET GLOBAL gtid_slave_pos= '1-2-3,2-4-6';
|
|
SELECT @@gtid_slave_pos;
|
|
|
|
--error ER_NO_DEFAULT
|
|
SET GLOBAL gtid_slave_pos= DEFAULT;
|
|
|
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
|
SELECT @@session.gtid_slave_pos;
|
|
|
|
SET GLOBAL gtid_slave_pos= @old_gtid_slave_pos;
|