mirror of
https://github.com/MariaDB/server.git
synced 2025-07-05 12:42:17 +03:00
Replace CHANGE MASTER TO ... master_gtid_pos='xxx' with a new system variable @@global.gtid_pos. This is more logical; @@gtid_pos is global, not per-master, and it is not affected by RESET SLAVE. Also rename master_gtid_pos=AUTO to master_use_gtid=1, which again is more logical.
48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
SET @old_gtid_pos= @@gtid_pos;
|
|
SET GLOBAL gtid_pos= '';
|
|
SELECT @@gtid_pos;
|
|
@@gtid_pos
|
|
|
|
SET GLOBAL gtid_pos= '1-2-3';
|
|
SELECT variable_value FROM information_schema.global_variables
|
|
WHERE variable_name='gtid_pos';
|
|
variable_value
|
|
1-2-3
|
|
SET @@global.gtid_pos= '1-2-4';
|
|
SELECT @@gtid_pos;
|
|
@@gtid_pos
|
|
1-2-4
|
|
SET GLOBAL gtid_pos= ' 1-2-3';
|
|
SELECT @@gtid_pos;
|
|
@@gtid_pos
|
|
1-2-3
|
|
SET GLOBAL gtid_pos= '1-2-3, 2-4-6';
|
|
SELECT @@gtid_pos;
|
|
@@gtid_pos
|
|
1-2-3,2-4-6
|
|
SET GLOBAL gtid_pos= '-1-2-3';
|
|
ERROR HY000: Could not parse GTID list for GTID_POS
|
|
SET GLOBAL gtid_pos= '1-2 -3';
|
|
ERROR HY000: Could not parse GTID list for GTID_POS
|
|
SET GLOBAL gtid_pos= '1-2-3 ';
|
|
ERROR HY000: Could not parse GTID list for GTID_POS
|
|
SET GLOBAL gtid_pos= '1-2-3,2-4';
|
|
ERROR HY000: Could not parse GTID list for GTID_POS
|
|
SET GLOBAL gtid_pos= '0-1-10,0-2-20';
|
|
ERROR HY000: GTID 0-2-20 and 0-1-10 conflict (duplicate domain id 0)
|
|
SET GLOBAL gtid_pos= '0-1-10,1-2-20,2-3-30,1-20-200,3-4-1';
|
|
ERROR HY000: GTID 1-20-200 and 1-2-20 conflict (duplicate domain id 1)
|
|
SET gtid_pos= '';
|
|
ERROR HY000: Variable 'gtid_pos' is a GLOBAL variable and should be set with SET GLOBAL
|
|
SET SESSION gtid_pos= '';
|
|
ERROR HY000: Variable 'gtid_pos' is a GLOBAL variable and should be set with SET GLOBAL
|
|
SET GLOBAL gtid_pos= '1-2-3,2-4-6';
|
|
SELECT @@gtid_pos;
|
|
@@gtid_pos
|
|
1-2-3,2-4-6
|
|
SET GLOBAL gtid_pos= DEFAULT;
|
|
ERROR 42000: Variable 'gtid_pos' doesn't have a default value
|
|
SELECT @@session.gtid_pos;
|
|
ERROR HY000: Variable 'gtid_pos' is a GLOBAL variable
|
|
SET GLOBAL gtid_pos= @old_gtid_pos;
|