Get Instant Solutions for Kubernetes, Databases, Docker and more
When you encounter the error `1231: Cannot update partition` in MySQL, it likely indicates an issue with the partitioning scheme or constraints on the partition that prevent an update operation. Here are actionable steps you can take immediately to investigate and possibly resolve the issue:
SHOW CREATE TABLE your
table
name;
CHECK TABLE your
table
name FOR UPGRADE PARTITION;
SELECT partition
name, table
rows, data
length, index
length, data_free
FROM information_schema.partitions
WHERE tableschema = 'your
database
name' AND table
name = 'your
table
name';
SELECT partition
name, table
name, partition
ordinal
position, partition
method, partition
expression, table
rows, partition
description
FROM information_schema.partitions
WHERE tableschema = 'your
database
name' AND table
name = 'your
table
name' AND partition
name = 'your
partition_name';
ALTER TABLE your
table
name REORGANIZE PARTITION partition
to
reorganize INTO (
PARTITION newpartition
name VALUES LESS THAN (your_value),
PARTITION otherpartition
name VALUES LESS THAN MAXVALUE
);
tail -f /path/to/mysql/log/error.log
Proceed with the investigation in the order that best aligns with your recent activities or changes to the database that could have led to this error.
(Perfect for DevOps & SREs)
(Perfect for DevOps & SREs)
Get Instant Solutions for Kubernetes, Databases, Docker and more
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Block quote
Ordered list
Unordered list
Bold text
Emphasis
Superscript
Subscript
(Perfect for DevOps & SREs)
(Perfect for DevOps & SREs)