How to rename two tables in one atomic operation in MySQL
问题 I need to rename two tables in one atomic operation so that user will never be able to see the database in its intermediate state. I'm using MySQL and noticed that this case is perfectly described in the documentation: 13.3.3 Statements That Cause an Implicit Commit The statements listed in this section (and any synonyms for them) implicitly end any transaction active in the current session, as if you had done a COMMIT before executing the statement [...] Data definition language (DDL)