2304 2017-09-13 15:05:11 35556 [Note] InnoDB: 128 rollback segment(s) are active. InnoDB: Starting in background the rollback of uncommitted transactions 2017-09-13 15:05:11 7f5ccc3d1700 InnoDB: Rolling back trx with id 1806, 3 rows to undo 2017-09-13 15:05:11 35556 [Note] InnoDB: Rollback of trx with id 1806 completed 2017-09-13 15:05:11 7f5ccc3d1700 InnoDB: Rollback of non-prepared transactions completed 2017-09-13 15:05:11 35556 [Note] InnoDB: Waiting for purge to start 2017-09-13 15:05:11 35556 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.14-rel62.0 started; log sequence number 1640654 2017-09-13 15:05:11 35556 [Note] Recovering after a crash using binlog 2017-09-13 15:05:11 35556 [Note] Starting crash recovery... 2017-09-13 15:05:11 35556 [Note] Crash recovery finished. 可以看到后台检测到了前次的异常宕机,然后开启崩溃恢复,InnoDB检测到日记LSN是1625987 而体系数据文件ibd的LSN为1625987 ,和ib_logfiles琅绫擎的LSN不匹配。后面就是一系列的恢复,前滚,恢复,回滚。最后表里的数据为空,证实之前的事务都已经回滚了。
所以基于膳绫擎的情况,我们明白开启了事务,根本情况下这个问题是不会出现的,什么时刻会抛出开端的缺点呢。
我们持续测试,开启一个显式事务,不提交。
- begin;
-
- insert into test values(1,'a');
-
- insert into test values(2,'b');
-
- insert into test values(3,'c');
然后杀掉落mysql的办事过程,找到mysql的数据目次下,删除redo文件。完成后我们重启数据库。
这个时刻就抛出了和截图类似的缺点。
- 2017-09-13 16:05:14 36896 [Note] InnoDB: Highest supported file format is Barracuda.
-
- 2017-09-13 16:05:14 7f73450a97e0 InnoDB: Error: page 7 log sequence number 1627722
-
- InnoDB: is in the future! Current
推荐阅读
颤抖吧,程序员!微软又推出了量子计算编程语言!
在Ignite大年夜会上,微软列出了将改变科技家当的3项关键技巧,分别是混淆实际、人工智能和量子计算。微软在移动时代错掉了影响力,这是毋庸置疑的,然则它正在尽力弥补。如不雅大年夜家日常平凡比较存>>>详细阅读
本文标题:MySQL断电恢复的一点简单分析
地址:http://www.17bianji.com/lsqh/37624.html
1/2 1