[ERROR] Table gym_api_utf8/membership_students contains 2 indexes inside InnoDB, which is different
来源:互联网 发布:wow数据库 编辑:程序博客网 时间:2024/05/24 00:30
1. 问题描述
alter table add index(xxx);时出现此问题,mysql服务版本5.5。
新特性“Fast index creation in Innodb”未出现以前,Innodb中创建索引的流程如下: 通过创建一个新的空的带有要创建索引的表,然后拷贝存在的行到新表中,同时更新索引,当此时key没有排序时插入条目极慢。在所有的行都被拷贝完成以后,旧表被删除,新表被改名。
所以“Fast index creation in Innodb”不存在数据的Copy(如果表的数据量太大的话, 那么这个过程非常耗费时间),所以创建索引的时间大大减少。
我们可以简单认为是MySQL新特性“Fast index creation in Innodb”所导致的问题,也就是说索引正在创建的过程中,Innodb和MySQL(.frm记录的)的数据字典可能是不一致的。
2. 问题解决
flush tables(该命令的作用是关闭所有打开的表,待下次使用该表的时候,重新加载表的字典信息)然后观察错误是否继续被抛出可以确认这种不一致是否还存在,如果还存在的话可以
ALTER TABLE table_name ENGINE=Innodb;
参考文章:《Innodb vs MySQL index counts》
阅读全文
0 0
- [ERROR] Table gym_api_utf8/membership_students contains 2 indexes inside InnoDB, which is different
- On data dictionary synchronization errors:show which table is error
- Fixing “InnoDB: Error: log file ./ib_logfile0 is of different size” Error
- Mysql启动中 InnoDB: Error: log file ./ib_logfile0 is of different size 0
- InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes
- InnoDB: Error: log file /home/mysqldata/ib_logfile0 is of different size
- Mysql启动中 InnoDB: Error: log file ./ib_logfile0 is of different size 0
- InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
- InnoDB: Error: log file ./ib_logfile0 is of different size 50331648 bytes
- xtrabackup 恢复出现错误InnoDB: Error: log file ./ib_logfile2 is of different size 0 0 bytes
- [ERROR] InnoDB: Data file /data/mysql/3310/data/ibdata1 is of a different size 1536 pages
- query which table is locked
- InfoPath error : "a dataset that contains a table name that is defined more than once"
- ORA-14404: partitioned table contains partitions in a different tablespace
- 32.Which CREATE TABLE statement is valid?
- Wrong number of indexes `1' inside [], expected `2'
- Understanding InnoDB clustered indexes
- ERROR 1286 (42000): Unknown table engine 'InnoDB'
- 关于python文件操作
- 登陆成功5s后倒计时跳转(http响应头refresh,location)
- Redis之与redis关联使用的脚本lua的基本语法
- Eventbus3.0入(踩)门(坑)之旅
- 猜数字小game
- [ERROR] Table gym_api_utf8/membership_students contains 2 indexes inside InnoDB, which is different
- AVOutputDeviceDiscoverySession (FigRouteDiscoverer) >>>> -[AVFigRouteDiscovererOutputDeviceDiscovery
- mongo group后统计总数
- 色彩表示与编码
- 编程思想的理解(POP,OOP,SOA,AOP)
- 洛谷 P3102 [USACO14FEB]秘密代码Secret Code 【区间dp】
- Vue 表单验证插件的写作过程
- JDK1.8的Java.util.concurrent.atomic包小结
- spring boot框架学习2-spring boot核心(1)