设为首页 加入收藏

TOP

深入理解MySQL GTID(二)
2018-07-13 06:07:05 】 浏览:135
Tags:深入 理解 MySQL GTID
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表。


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇用备份事务日志尾部来还原MSSQL数.. 下一篇MySQL基于GTID的replication

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目