MCPcopy Create free account
hub / github.com/MariaDB/server / dd_recreate_table

Function dd_recreate_table

sql/datadict.cc:198–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196*/
197
198bool 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

Callers 2

truncate_tableMethod · 0.85
prepare_for_repairFunction · 0.85

Calls 4

build_table_filenameFunction · 0.85
ha_create_tableFunction · 0.85
is_lock_ownerMethod · 0.80
initMethod · 0.45

Tested by

no test coverage detected