2023-10-10 mysql-{mysql_rm_db}-失败后回滚-记录
-
- /**
- Drop all tables, routines and events in a database and the database itself.
- @param thd Thread handle
- @param db Database name in the case given by user
- It's already validated and set to lower case
- (if needed) when we come here
- @param if_exists Don't give error if database doesn't exists
- @note We do a "best effort" - try to drop as much as possible.
- If dropping the database itself fails, we try to binlog
- the drop of the tables we managed to do.
- @retval false OK (Database dropped)
- @retval true Error
- */
-
- bool mysql_rm_db(THD *thd, const LEX_CSTRING &db, bool if_exists) {
- ulong deleted_tables = 0;
- bool error = false;
- char path[2 * FN_REFLEN + 1