Issuing FLUSH commands on a node will create a local transaction on GTID-configured clusters
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Undecided
|
Raghavendra D Prabhu |
Bug Description
On a GTID configured cluster:
mysql> show variables like '%gtid%';
+------
| Variable_name | Value |
+------
| enforce_
| gtid_executed | |
| gtid_mode | ON |
| gtid_next | AUTOMATIC |
| gtid_owned | |
| gtid_purged | |
| simplified_
+------
Where the "cluster UUID" is 00a389be-
mysql> select @@global.
*******
@@global.
And the server_uuid is:
+------
| @@server_uuid |
+------
| ff90853d-
+------
The issuing of "FLUSH PRIVILEGES" will create a local transaction, one that is registered under a GTID set having the node's server_uuid as source_id, as we usually have on regular MySQL GTID replication:
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> select @@global.
*******
@@global.
ff90853d-
Here's some additional info on configuration and versions:
mysql> show variables like 'wsrep%myisam%';
+------
| Variable_name | Value |
+------
| wsrep_replicate
+------
mysql> show variables like '%version%';
+------
| Variable_name | Value |
+------
| innodb_version | 5.6.21-70.1 |
| protocol_version | 10 |
| slave_type_
| version | 5.6.21-70.1-56-log |
| version_comment | Percona XtraDB Cluster (GPL), Release rel70.1, Revision 938, WSREP version 25.8, wsrep_25.8.r4150 |
| version_
| version_compile_os | Linux |
+------
summary: |
- Issuing FLUS PRIVILEGES on a node will create a local transaction on + Issuing FLUSH PRIVILEGES on a node will create a local transaction on GTID-configured clusters |
summary: |
- Issuing FLUSH PRIVILEGES on a node will create a local transaction on + Issuing FLUSH commands on a node will create a local transaction on GTID-configured clusters |
tags: | added: i50564 |
I can confirm many "flush" commands are not replicated within Galera cluster, but written to the binary log with GTID of local
percona33 mysql> select @@version, @@version_comment; ------- ------- +------ ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+ ------- ------- +------ ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+ ------- ------- +------ ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+
+------
| @@version | @@version_comment |
+------
| 5.6.22-72.0-56-log | Percona XtraDB Cluster (GPL), Release rel72.0, Revision 964, WSREP version 25.8, wsrep_25.8.r4150 |
+------
1 row in set (0.00 sec)
percona33 mysql> select @@server_uuid; ------- ------- ------- ------- ----+ ------- ------- ------- ------- ----+ bb42-11e4- a3ff-080027079e 3d | ------- ------- ------- ------- ----+
+------
| @@server_uuid |
+------
| 18febdb4-
+------
1 row in set (0.00 sec)
percona33 mysql> show binlog events in 'percona33- bin.000002' ; ------- ------- --+---- -+----- ------- ----+-- ------- --+---- ------- --+---- ------- ------- ------- ------- ------- ------- -+ ------- ------- --+---- -+----- ------- ----+-- ------- --+---- ------- --+---- ------- ------- ------- ------- ------- ------- -+ bin.000002 | 4 | Format_desc | 33 | 120 | Server ver: 5.6.22-72.0-56-log, Binlog ver: 4 | bin.000002 | 120 | Previous_gtids | 33 | 191 | bfa44ec0- 55bd-ee1b- 6916-25822fb946 22:1-5 | ------- ------- --+---- -+----- ------- ----+-- ------- --+---- ------- --+---- ------- ------- ------- ------- ------- ------- -+
+------
| Log_name | Pos | Event_type | Server_id | End_log_pos | Info |
+------
| percona33-
| percona33-
+------
2 rows in set (0.00 sec)
percona33 mysql> insert into test.t1 values (null);
Query OK, 1 row affected (0.07 sec)
percona33 mysql> show binlog events in 'percona33- bin.000002' ; ------- ------- --+---- -+----- ------- ----+-- ------- --+---- ------- --+---- ------- ------- ------- ------- ------- ------- ------- ------- ------- + ------- ------- --+---- -+----- ------- ----+-- ------- --+---- ------- --+---- ------- ------- ------- ------- ------- ------- ------- ------- ------- + bin.000002 | 4 | Format_desc | 33 | 120 | Server ver: 5.6.22-72.0-56-log, Binlog ver: 4 | bin.000002 | 120 | Previous_gtids | 33 | 191 | bfa44ec0- 55bd-ee1b- 6916-25822fb946 22:1-5 | bin.000002 | 191 | Gtid | 33 | 239 | SET @@SESSION. GTID_NEXT= 'bfa44ec0- 55bd-ee1b- 6916-25822fb946 22:6' | bin.000002 | 239 | Query | 33 | 312 | BEGIN | bin.000002 | 312 | Table_map | 33 | 357 | table_id: 70 (test.t1) ...
+------
| Log_name | Pos | Event_type | Server_id | End_log_pos | Info |
+------
| percona33-
| percona33-
| percona33-
| percona33-
| percona33-