alter table test PARTITION BY RANGE(id) (PARTITION p1 VALUES LESS THAN (101),PARTITION p2 VALUES LESS THAN (201) )
提示错误:
Table has no partition for value 201
原因是分区没有包含所有数据,改成:
alter table test PARTITION BY RANGE(id) (PARTITION p1 VALUES LESS THAN (1001),PARTITION p2 VALUES LESS THAN (2001) )
就好了(id最大1655 比 2001 小)