I have a MySQL dev database, and discovered one of my columns is too small (it’s a tinyint; needs to be an int). Since it’s the dev database I emptied out the table before altering it. I’d then expect the alter statement to return nearly instantaneously, since it doesn’t have to change any records. My assumptions here are clearly wrong – the query takes so long that I have to cancel it. What am I missing here? What is being changed beyond just the table?
Share
Solved. It turns out an SQLAlchemy object was holding open some kind of lock on this table. Interestingly, the command
Did not show a lock. However, killing the other script allowed the table to be modified.