2023-10-10 mysql-{mysql_create_db}-失败后回滚-记录
-
- /**
- Create a database
- @param thd Thread handler
- @param db Name of database to create
- Function assumes that this is already validated.
- @param create_info Database create options (like character set)
- SIDE-EFFECTS
- 1. Report back to client that command succeeded (my_ok)
- 2. Report errors to client
- 3. Log event to binary log
- @retval false ok
- @retval true Error
- */
-
- bool mysql_create_db(THD *thd, const char *db, HA_CREATE_INFO *create_info) {
- DBUG_TRACE;
-
- /*
- Use Auto_releaser to keep uncommitted object for database until
- trans_commit() call.
- */
- dd::cache::Dictionary_client::Auto_releaser releaser(thd->dd_client());
-
- // Reject creation of the system schema except for system threads.
- if (!thd->is_dd_system_thread() &&a