p; | interval_start | interval_end |
+--------------------------------------+----------------+--------------+
| 4160e9b3-58d9-11e8-b174-005056af6f24 | 1 | 26 |
+--------------------------------------+----------------+--------------+
1 row in set (0.01 sec)
2.插入准备数据:
insert into ztest.zstudent(stu_name,sex) values('hrd30','M');
insert into ztest.zstudent(stu_name,sex) values('hrd31','M');
commit;
3.插入数据后的gtid_executed表的情况:
(root@localhost) [mysql]> select * from gtid_executed;
+--------------------------------------+----------------+--------------+
| source_uuid | interval_start | interval_end |
+--------------------------------------+----------------+--------------+
| 4160e9b3-58d9-11e8-b174-005056af6f24 | 1 | 26 |
+--------------------------------------+----------------+--------------+
1 row in set (0.00 sec)
如上情况,没有任何改变,Binlog rotate后,查看gtid_executed表的情况
(root@localhost) [mysql]> flush logs;
Query OK, 0 rows affected (0.01 sec)
(root@localhost) [mysql]> select * from gtid_executed;
+--------------------------------------+----------------+--------------+
| source_uuid | interval_start | interval_end |
+--------------------------------------+----------------+--------------+
| 4160e9b3-58d9-11e8-b174-005056af6f24 | 1 | 28 |
+--------------------------------------+----------------+--------------+
1 row in set (0.00 sec)
可以看到,上述提交的两个事务,在binlog刷新之后,写入到了gitd_executed表中。
知识点备注:
RESET MASTER会清空gitd_executed表。