SET @@SESSION.gtid_domain_id=0;
|
CREATE TABLE t (a INT);
|
SET @@SESSION.gtid_domain_id=11;
|
SET @@SESSION.server_id=111;
|
SET @@SESSION.gtid_seq_no=1;
|
INSERT INTO t SET a=1;
|
FLUSH BINARY LOGS DELETE_DOMAIN_ID=(11);
|
ERROR HY000: Could not delete gtid domain. Reason: binlog files may contain gtids from the domain ('11') being deleted. Make sure to first purge those files.
|
show binlog events in 'master-bin.000001';
|
Log_name Pos Event_type Server_id End_log_pos Info
|
master-bin.000001 4 Format_desc 1 256 Server ver: 10.2.34-MariaDB-debug-log, Binlog ver: 4
|
master-bin.000001 256 Gtid_list 1 285 []
|
master-bin.000001 285 Binlog_checkpoint 1 329 master-bin.000001
|
master-bin.000001 329 Gtid 1 371 GTID 0-1-1
|
master-bin.000001 371 Query 1 460 use `test`; CREATE TABLE t (a INT)
|
master-bin.000001 460 Gtid 111 502 BEGIN GTID 11-111-1
|
master-bin.000001 502 Query 111 590 use `test`; INSERT INTO t SET a=1
|
master-bin.000001 590 Query 111 663 COMMIT
|
FLUSH BINARY LOGS;
|
show binlog events in 'master-bin.000002';
|
Log_name Pos Event_type Server_id End_log_pos Info
|
master-bin.000002 4 Format_desc 1 256 Server ver: 10.2.34-MariaDB-debug-log, Binlog ver: 4
|
master-bin.000002 256 Gtid_list 1 315 [11-111-1,0-1-1]
|
master-bin.000002 315 Binlog_checkpoint 1 359 master-bin.000001
|
master-bin.000002 359 Binlog_checkpoint 1 403 master-bin.000002
|
FLUSH BINARY LOGS DELETE_DOMAIN_ID=(11);
|
ERROR HY000: Could not delete gtid domain. Reason: binlog files may contain gtids from the domain ('11') being deleted. Make sure to first purge those files.
|
PURGE BINARY LOGS TO 'master-bin.000002';;
|
FLUSH BINARY LOGS DELETE_DOMAIN_ID=(11);
|
SELECT @@global.gtid_binlog_pos, @@global.gtid_binlog_state;
|
@@global.gtid_binlog_pos @@global.gtid_binlog_state
|
0-1-1 0-1-1
|
INSERT INTO t SET a=1;
|
show binlog events in 'master-bin.000003';
|
Log_name Pos Event_type Server_id End_log_pos Info
|
master-bin.000003 4 Format_desc 1 256 Server ver: 10.2.34-MariaDB-debug-log, Binlog ver: 4
|
master-bin.000003 256 Gtid_list 1 299 [0-1-1]
|
master-bin.000003 299 Binlog_checkpoint 1 343 master-bin.000002
|
master-bin.000003 343 Binlog_checkpoint 1 387 master-bin.000003
|
master-bin.000003 387 Gtid 111 429 BEGIN GTID 11-111-1
|
master-bin.000003 429 Query 111 517 use `test`; INSERT INTO t SET a=1
|
master-bin.000003 517 Query 111 590 COMMIT
|
SELECT @@global.gtid_binlog_pos, @@global.gtid_binlog_state;
|
@@global.gtid_binlog_pos @@global.gtid_binlog_state
|
0-1-1,11-111-1 0-1-1,11-111-1
|
FLUSH BINARY LOGS DELETE_DOMAIN_ID=(11);
|
show master status;
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
master-bin.000004 387
|
show binlog events in 'master-bin.000004';
|
Log_name Pos Event_type Server_id End_log_pos Info
|
master-bin.000004 4 Format_desc 1 256 Server ver: 10.2.34-MariaDB-debug-log, Binlog ver: 4
|
master-bin.000004 256 Gtid_list 1 299 [0-1-1]
|
master-bin.000004 299 Binlog_checkpoint 1 343 master-bin.000003
|
master-bin.000004 343 Binlog_checkpoint 1 387 master-bin.000004
|
INSERT INTO t SET a=1;
|
INSERT INTO t SET a=1;
|
show binlog events in 'master-bin.000004';
|
Log_name Pos Event_type Server_id End_log_pos Info
|
master-bin.000004 4 Format_desc 1 256 Server ver: 10.2.34-MariaDB-debug-log, Binlog ver: 4
|
master-bin.000004 256 Gtid_list 1 299 [0-1-1]
|
master-bin.000004 299 Binlog_checkpoint 1 343 master-bin.000003
|
master-bin.000004 343 Binlog_checkpoint 1 387 master-bin.000004
|
master-bin.000004 387 Gtid 111 429 BEGIN GTID 11-111-1
|
master-bin.000004 429 Query 111 517 use `test`; INSERT INTO t SET a=1
|
master-bin.000004 517 Query 111 590 COMMIT
|
master-bin.000004 590 Gtid 111 632 BEGIN GTID 11-111-2
|
master-bin.000004 632 Query 111 720 use `test`; INSERT INTO t SET a=1
|
master-bin.000004 720 Query 111 793 COMMIT
|
FLUSH BINARY LOGS DELETE_DOMAIN_ID=(11);
|
ERROR HY000: Could not delete gtid domain. Reason: binlog files may contain gtids from the domain ('11') being deleted. Make sure to first purge those files.
|
|