[MDEV-13175] Adding a new enum value at the end of a list triggers a table rebuild Created: 2017-06-26 Updated: 2017-07-20 Resolved: 2017-07-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Affects Version/s: | 10.0.22, 10.0.23, 10.0.28, 10.0.30, 10.0.31 |
| Fix Version/s: | 10.0.32 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Manuel Arostegui | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | alter | ||
| Environment: |
debian |
||
| Description |
|
As per: https://mariadb.com/kb/en/mariadb/alter-table/#when-does-alter-table-copy-all-data :
However that looks broken at least on: Table definition
ALTER to run:
We can see that on 10.0.31 and 10.0.22 it fails when forcing it to do it INPLACE:
Without forcing it, it goes thru, but rebuilds the table
Same thing does not happens on 10.1.24 and works as expected, without rebuilding the table:
Without forcing it, it also goes thru finely. |
| Comments |
| Comment by Alice Sherepa [ 2017-06-27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I repeated on 10.0.31 and got error (ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Manuel Arostegui [ 2017-06-28 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I have just tried the same thing on MySQL 5.6 and it works fine.
I have changed the priority to Critical as this triggers unexpected rebuilds and it can cause serious outages if not expected and ran on big tables, specially if using replication. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-06-28 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
marostegui, alice, thanks for the report and provided information. The problem was fixed in 10.1 long time ago: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Manuel Arostegui [ 2017-06-28 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I do believe it should be backported, it is critical enough to be done or at least specified in the documentation. This can cause serious outages. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-06-28 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Assigning to serg to decide whether it should indeed be backported. Also ATTN bar. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2017-07-20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
backported |