mysql索引损坏,Record in index `log_time` of table `lts`.`lts_job_log_po` was not found on update
【1】错误信息
[ERROR] [MY-012869] [InnoDB] Record in index `log_time` of table `lts`.`lts_job_log_po` was not found on update: TUPLE (info_bits=0, 2 n_cmp=2, fields) 2023-05-29T23:03:05.146242Z 193 [ERROR] [MY-013183] [InnoDB] Assertion failure: row0upd.cc:2358:0 thread 140238624069376 InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html InnoDB: about forcing recovery. 23:03:05 UTC - mysqld got signal 6 ; Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
【2】处理办法
初步确定为因为名为 t_idx 的索引损坏导致的大量报错,并在处理 update 语句时导致 crash。
(1)确认表有错误
CHECK TABLE `$db_name`.`$tb_name`;
(2)修复
方式1:optimize table `$db_name`.`$tb_name`;
方式2:alter table `$db_name`.`$tb_name` engine=innodb;
分类:
mysql 故障处理
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2019-05-30 (4.31)sql server中的xml数据操作
2018-05-30 (1.5)DML增强功能-try catch及事务控制
2018-05-30 sql server CLR
2018-05-30 sqlserver 操作xml