MySQL在MyISAM表中DML生成: “ERROR 144 (HY000): Table ???? is marked as crashed and last (automatic?) repair failed”

适用于:

MySQL服务器版本5.0及以上

本文信息适用于所有平台。

 

症状

MyISAM表使用DML (inserts, deletes, selects,),以下错误可能发生:

 

101001 14:57:57 [ERROR] ./bin/mysqld: Table './test/t2' 
is marked as crashed and last (automatic?) repair failed

 

 

原因

 

Bug 11764345 –SHOW TABLE STATUS + SMALL MYISAM_SORT_BUFFER_SIZE IN REPAIR, TABLE CRASHE

当小的myisam_sort_buffer_sizerepair by sort发生,且有人运行 ‘show table status’ 或引用表selects from information_schema tables,错误在日志中出现。

check table在运行时,表不显示损坏。

 

解决方案

变通方案

 

1. 在错误表中运行REPAIR TABLE来修复表

2. 增加变量myisam_sort_buffer_size的值来防止bug的发生

 

永久解决方案

 

参考 Bug 11764345。要监控问题,按照Doc

ID 1298390.1 How to Monitor a Code or Enhancement Request (ER) Bug from My Oracle Support 的指导。

参考

BUG:11764345 SHOW TABLE STATUS + SMALL MYISAM_SORT_BUFFER_SIZE IN REPAIR, TABLE CRASHE

https://dev.mysql.com/doc/en/repairtable.html

https://dev.mysql.com/doc/en/serversystemvariables.html#sysvar_myisam_sort_buffer_size

NOTE:1023264.1 What can Cause Corrupted MyISAM Tables in MySQL Server?


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *