4 ms·
At SoundCloud we developed Large Hadron Migrator [1] to work around the problem of locked tables with ALTER and MySQL. It creates a table with the new schema, c
by lgierth 15y ago
At SoundCloud we developed Large Hadron Migrator [1] to work around the problem of locked tables with ALTER and MySQL. It creates a table with the new schema, copies the data from the "old" table to the new one in chunks (utilizing INSERT IGNORE and triggers) and then switches the two tables. The switching is not yet atomic, as there was a bug with RENAME TABLE.
[1] https://github.com/soundcloud/large-hadron-migrator https://github.com/soundcloud/large-hadron-migrator
Edit: URL