Categories
MySQL

Hacking FRM files to switch data types

The solution was to change the datatype from TINYINT to TINYINT UNSIGNED.  The problem is that this is a very large dataset, ~14TB across a bunch of systems.  We could use our online schema change tool (OSC) to do this change, but it would still take a week or two to run.

via Hacking FRM files to switch data types:

Basically a metadata change that needn’t affect the underlying data.

In Rdb data (re)write causes new datatype to be used. No need to update the entire table when this kind of change is made. Versioned metadata is such a fine thing.