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

Function delete_table_force

sql/handler.cc:6155–6176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6153*/
6154
6155static my_bool delete_table_force(THD *thd, plugin_ref plugin, void *arg)
6156{
6157 handlerton *hton = plugin_hton(plugin);
6158 st_force_drop_table_params *param = (st_force_drop_table_params *)arg;
6159
6160 if (param->discovering == (hton->discover_table != NULL) &&
6161 !(thd->slave_thread && (hton->flags & HTON_IGNORE_UPDATES)))
6162 {
6163 int error;
6164 error= ha_delete_table(thd, hton, param->path, param->db, param->alias, 0);
6165 if (error > 0 && !non_existing_table_error(error))
6166 param->error= error;
6167 if (error == 0)
6168 {
6169 if (hton && hton->flags & HTON_TABLE_MAY_NOT_EXIST_ON_SLAVE)
6170 thd->replication_flags |= OPTION_IF_EXISTS;
6171 param->error= 0;
6172 return TRUE; // Table was deleted
6173 }
6174 }
6175 return FALSE;
6176}
6177
6178/**
6179 @brief

Callers

nothing calls this directly

Calls 3

plugin_htonFunction · 0.85
ha_delete_tableFunction · 0.85
non_existing_table_errorFunction · 0.85

Tested by

no test coverage detected