mysql ocp 1z0-888 每日一题(10)

10月10日

Which two statements describe how InnoDB recovery works?


A. There will in general be lost committed transactions after a crash using the default settings.
B. It is required to enable binlog_gtid_simple_recovery to perform a crash recovery.
C. It is always required to enable innodb_force_recovery to perform a crash recovery.
D. InnoDB blocks some operations when innodb_force_recovery is set to greater than 0.
E. InnoDB handles most crash recoveries automatically.
F. It is recommended to set innodb_force_recovery = 1 as part of normal operations.

解析:参考文献

https://dev.mysql.com/doc/refman/5.7/en/innodb-recovery.html

没有commit的会被回滚掉,但是已经commit的会恢复的A错

binlog_gtid_simple_recovery改变的是搜索日志的顺序,不需要特意打开也能恢复,但是速度有差异(这个参数在5.7各个小版本不同)B错误

innodb_force_recovery参数的含义

0正常恢复所有的操作

扫描二维码关注公众号,回复: 4546263 查看本文章

1(SRV_FORCE_IGNORE_CORRUPT):忽略检查到的corrupt页。
2(SRV_FORCE_NO_BACKGROUND):阻止主线程的运行,如主线程需要执行full purge操作,会导致crash。
3(SRV_FORCE_NO_TRX_UNDO):不执行事务回滚操作。
4(SRV_FORCE_NO_IBUF_MERGE):不执行插入缓冲的合并操作。
5(SRV_FORCE_NO_UNDO_LOG_SCAN):不查看重做日志,InnoDB存储引擎会将未提交的事务视为已提交。
6(SRV_FORCE_NO_LOG_REDO):不执行前滚的操作。

可见,对于无法启动的恢复必须要设置的,c对

如果>0需要阻止某些恢复的,所以D对

如果发生故障,mysql是无法自动恢复的E错

innodb_force_recovery>0是紧急的设置,所以除了紧急情况一般不能设置为>0F错误


 


Answer: C,D

猜你喜欢

转载自blog.csdn.net/AkiFreeman/article/details/85029458
今日推荐