| 1 |
include/gtid_utils.inc |
| 2 |
RESET MASTER; |
| 3 |
SET @start_global_value = @@global.gtid_purged; |
| 4 |
SELECT @start_global_value; |
| 5 |
@start_global_value |
| 6 |
|
| 7 |
SET @sql_log_bin_start_value = @@session.sql_log_bin; |
| 8 |
select @@global.gtid_purged; |
| 9 |
@@global.gtid_purged |
| 10 |
|
| 11 |
select @@session.gtid_purged; |
| 12 |
ERROR HY000: Variable 'gtid_purged' is a GLOBAL variable |
| 13 |
show global variables like 'gtid_purged'; |
| 14 |
Variable_name Value |
| 15 |
gtid_purged |
| 16 |
show session variables like 'gtid_purged'; |
| 17 |
Variable_name Value |
| 18 |
gtid_purged |
| 19 |
select * from performance_schema.global_variables where variable_name='gtid_purged'; |
| 20 |
VARIABLE_NAME VARIABLE_VALUE |
| 21 |
gtid_purged |
| 22 |
select * from performance_schema.session_variables where variable_name='gtid_purged'; |
| 23 |
VARIABLE_NAME VARIABLE_VALUE |
| 24 |
gtid_purged |
| 25 |
set @@global.gtid_purged = NULL; |
| 26 |
ERROR 42000: Variable 'gtid_purged' can't be set to the value of 'NULL' |
| 27 |
select @@global.gtid_purged; |
| 28 |
@@global.gtid_purged |
| 29 |
|
| 30 |
set @@global.gtid_purged = default; |
| 31 |
ERROR 42000: Variable 'gtid_purged' doesn't have a default value |
| 32 |
select @@global.gtid_purged; |
| 33 |
@@global.gtid_purged |
| 34 |
|
| 35 |
SET @@global.gtid_purged= '11111111-1111-1111-1111-111111111111:1-2'; |
| 36 |
SELECT @@global.gtid_purged; |
| 37 |
@@global.gtid_purged |
| 38 |
11111111-1111-1111-1111-111111111111:1-2 |
| 39 |
SET @@global.gtid_purged= '11111111-1111-1111-1111-111111111111:3'; |
| 40 |
ERROR HY000: @@GLOBAL.GTID_PURGED cannot be changed: the new value must be a superset of the old value |
| 41 |
SELECT @@global.gtid_purged; |
| 42 |
@@global.gtid_purged |
| 43 |
11111111-1111-1111-1111-111111111111:1-2 |
| 44 |
SET @gtid_purged_new='11111111-1111-1111-1111-111111111111:1-2:4-5'; |
| 45 |
SET @gtid_executed_old= @@GLOBAL.GTID_EXECUTED; |
| 46 |
SET @@global.gtid_purged= @gtid_purged_new; |
| 47 |
SELECT @@global.gtid_purged; |
| 48 |
@@global.gtid_purged |
| 49 |
11111111-1111-1111-1111-111111111111:1-2:4-5 |
| 50 |
include/assert.inc [New value of GTID_EXECUTED must be union of the old one an new purged] |
| 51 |
RESET MASTER; |
| 52 |
SET AUTOCOMMIT= OFF; |
| 53 |
SET @@session.sql_log_bin= @sql_log_bin_start_value; |
| 54 |
SET AUTOCOMMIT= ON; |
| 55 |
SET @gtid_purged_init= '11111111-1111-1111-1111-111111111111:4-5'; |
| 56 |
SET @@global.gtid_purged= @gtid_purged_init; |
| 57 |
SET @@global.gtid_purged= '+11111111-1111-1111-1111-111111111111:5'; |
| 58 |
ERROR HY000: @@GLOBAL.GTID_PURGED cannot be changed: the added gtid set must not overlap with @@GLOBAL.GTID_EXECUTED |
| 59 |
SET @gtid_executed_old= @@GLOBAL.GTID_EXECUTED; |
| 60 |
SET @gtid_purged_incr="11111111-1111-1111-1111-111111111111:6-6"; |
| 61 |
SET @@global.gtid_purged= CONCAT("+",@gtid_purged_incr); |
| 62 |
include/assert.inc [New value of GTID_PURGED must be union of the old one and the increment] |
| 63 |
include/assert.inc [New value of GTID_EXECUTED must be union of the old one and the purged increment] |
| 64 |
SET @@global.gtid_purged= '+ 11111111-1111-1111-1111-111111111111:7'; |
| 65 |
SET @@global.gtid_purged= ' +11111111-1111-1111-1111-111111111111:8'; |
| 66 |
SET @@global.gtid_purged= ' -+11111111-1111-1111-1111-111111111111:9'; |
| 67 |
ERROR 42000: Variable 'gtid_purged' can't be set to the value of ' -+11111111-1111-1111-1111-111111111111:9' |
| 68 |
SET @@global.gtid_purged= ' +-11111111-1111-1111-1111-111111111111:9'; |
| 69 |
ERROR 42000: Variable 'gtid_purged' can't be set to the value of ' +-11111111-1111-1111-1111-111111111111:9' |
| 70 |
SET @@global.gtid_purged= ' +,11111111-1111-1111-1111-111111111111:9'; |
| 71 |
include/assert.inc [Computed purged set is not the same as of the global var] |
| 72 |
RESET MASTER; |
| 73 |
SELECT @@global.gtid_purged; |
| 74 |
@@global.gtid_purged |
| 75 |
|
| 76 |
include/gtid_utils_end.inc |