| Bug #42822 | optimize partition recreates full table instead just partition | ||
|---|---|---|---|
| Submitted: | 13 Feb 11:24 | ||
| Reporter: | Bogdan Kecman | ||
| Status: | Verified | ||
| Category: | Server: Partition | Severity: | S3 (Non-critical) |
| Version: | 5.1.30 | OS: | Any |
| Assigned to: | Mattias Jonsson | Target Version: | |
| Triage: | Triaged: D3 (Medium) / R3 (Medium) / E3 (Medium) | ||
[13 Feb 11:24]
Bogdan Kecman
[20 Feb 18:54]
Mattias Jonsson
The workaround is to do: ALTER TABLE t REBUILD PARTITION <list of partitions> ALTER TABLE t ANALYZE PARTITION <list of partitions> Which is the way it is done for innodb. Since innodb does not support optimize and suggest ALTER instead, mysql recreates the table and then doing analyze on it afterwards, so this workaround is just to be explicit about it. See also bug#20129
[21 Sep 10:58]
Cyril SCETBON
not fixed in 5.1.39 (from mysql labs)
