SHOW PLUGINS;
sql 可以查看partition
的Status
是否是ACTIVE
的
使用mydatetime
进行水平分区案例:
1 | CREATE TABLE test_users ( |
1 | [Err]1503 - A UNIQUE INDEX must include all columns in the table's partitioning function |
尝试1:
1 | [Err] 1503 - A PRIMARY KEY must include all columns in the table's partitioning function |
主键需要包含分区的字段
尝试了将原来的主键删除掉,然后再重新创建一个组合主键
1 | [Err]1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key |
删除主键失败
依次执行下列的sql
1 | ALTER TABLE test_table CHANGE COLUMN `id` `id` int(10) unsigned NOT NULL ; |
¶References
- 故障案例–mysql5.5分区表的一个坑
- mysql 自动分区实践
- MySQL 分区表探索
- MySQL 表分区 A PRIMARY KEY must include all columns in the table’s partitioning function
- A primary must include all columns in the table’s partitioning location error? 需要和主键,分区的字段作为一个unique keyi进行处理
- [MySQL] AUTO_INCREMENTカラム変更がめんどくさい・・
mysql [err] 1075
- MySQL添加/删除主键、外键、唯一键、索引、自增
- 错误代码:1503 A UNIQUE INDEX must include all columns in the table’s partitioning function