| 196 | */ |
| 197 | |
| 198 | bool dd_recreate_table(THD *thd, const char *db, const char *table_name) |
| 199 | { |
| 200 | HA_CREATE_INFO create_info; |
| 201 | char path_buf[FN_REFLEN + 1]; |
| 202 | DBUG_ENTER("dd_recreate_table"); |
| 203 | |
| 204 | /* There should be a exclusive metadata lock on the table. */ |
| 205 | DBUG_ASSERT(thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name, |
| 206 | MDL_EXCLUSIVE)); |
| 207 | create_info.init(); |
| 208 | build_table_filename(path_buf, sizeof(path_buf) - 1, |
| 209 | db, table_name, "", 0); |
| 210 | /* Attempt to reconstruct the table. */ |
| 211 | DBUG_RETURN(ha_create_table(thd, path_buf, db, table_name, &create_info, 0, 0)); |
| 212 | } |
| 213 |
no test coverage detected