Table locks can be a real pain. You know you need to do the change, but the system is constantly running queries towards it. Now days it’s a bit easier with algorithm=inplace and lock=none, but in the good old days you were on your own. Your only friend was luck. Large migrations like that still gives me shivers
UPDATE ON articles SET status = 0 WHERE body LIKE ‘%…%’
On master production server, running myisam, against a text column, millions of rows.
This causes queries to stack because table locks
Rather than waiting for the query to finish. a slave was promoted to master.
Lesson: don’t trust mysqladmin to not do something bad.
Table locks can be a real pain. You know you need to do the change, but the system is constantly running queries towards it. Now days it’s a bit easier with
algorithm=inplace
andlock=none
, but in the good old days you were on your own. Your only friend was luck. Large migrations like that still gives me shivers