Recently, somebody requested some help as he was trying to modify the structure of a large table. The requested modification was related in changing a fixed length string to a variable length string column.
If you don’t know it yet, MySQL supports multiple algorithms when altering a table (DDL):
- COPY: operations are performed on a copy
- INPLACE: operations may rebuild the table inplace (no copy)
- INSTANT: operations only change the metadata in the data dictionnary
The operation that interests us today needs to copy the full table. And this was the problem for the user as the MySQL Datadir could not store twice the amount of that large table.
In this blog post I will explain a method that can be used to solve this problem. There are also others method like a logical dump …
[Read more]