after consulting mysql manual [1,2], seems performing rename of table needs global table lock. quick experiments confirm this. means if select statements executing against table, rename operation block until select statements finish executing.
i wondering whether possible innodb or other database engine (postgresql maybe?) read-only operations not block database performing rename table.
i imagine select continues read new table name if 2 operations happen concurrently.
[1] https://dev.mysql.com/doc/refman/5.0/en/rename-table.html
Comments
Post a Comment