千家信息网

MySQL第五课 Table has no partition for value

发表于:2025-02-06 作者:千家信息网编辑
千家信息网最后更新 2025年02月06日,场景MySQL由于安全性要求,版本升级之后,执行插入数据出现Table has no partition for value 错误已有版本5.7.20-log升级到5.7.26-log说明建表过程中,
千家信息网最后更新 2025年02月06日MySQL第五课 Table has no partition for value

场景

MySQL由于安全性要求,版本升级之后,执行插入数据出现Table has no partition for value 错误

已有版本5.7.20-log升级到5.7.26-log


说明

建表过程中,指定时间identify_date(datetime类型)为主键


解决方案

ALTER TABLE `cs_oth_face_capture` PARTITION BY RANGE (to_days(identify_date))
(
PARTITION p_Dec VALUES LESS THAN MAXVALUE
);

分区是为了更好的查询,当然建表的时候,不指定分区就可以了


引用
https://blog.csdn.net/qq_35946990/article/details/75041672
https://www.cnblogs.com/chenmh/p/5627912.html
https://www.cnblogs.com/zmxmumu/p/4450857.html
https://blog.csdn.net/qq_35946990/article/details/75041672



0