问题描述
研究MySQL源代码,调试并压测MySQL源代码时,MySQL崩溃了!问题是它竟然崩溃了!而且还损坏了InnoDB文件!!还好是在调试环境下发生的,赶紧看看如何解决这个问题,经过一系列的查阅资料、验证、对比、MySQL源码调试跟踪、修复损坏的InnoDB文件、总结等流程,整理成此文,如果以后真的发生在线上的生产坏境,也不用担心是不是要跑路的问题了,可以分分钟搞定MySQL的崩溃问题了!!查看错误日志,如下:
-----------------------------------------
161108 23:36:45 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
2022-08-25 23:36:46 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-08-25 23:36:46 5497 [Note] Plugin 'FEDERATED' is disabled.
2022-08-25 23:36:46 7f11c48e1720 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2022-08-25 23:36:46 5497 [Note] InnoDB: Using atomics to ref count buffer pool pages
2022-08-25 23:36:46 5497 [Note] InnoDB: The InnoDB memory heap is disabled
2022-08-25 23:36:46 5497 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-08-25 23:36:46 5497 [Note] InnoDB: Memory barrier is not used
2022-08-25 23:36:46 5497 [Note] InnoDB: Compressed tables use zlib 1.2.3
2022-08-25 23:36:46 5497 [Note] InnoDB: Using CPU crc32 instructions
2022-08-25 23:36:46 5497 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2022-08-25 23:36:46 5497 [Note] InnoDB: Completed initialization of buffer pool
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 5.
InnoDB: You may have to recover from a backup.
2022-08-25 23:36:46 7f11c48e1720 InnoDB: Page dump in ascii and hex (16384 bytes):
len 16384; hex 7478d0780000