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

Function drop_open_table

sql/sql_base.cc:1523–1541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1521*/
1522
1523void drop_open_table(THD *thd, TABLE *table, const LEX_CSTRING *db_name,
1524 const LEX_CSTRING *table_name)
1525{
1526 DBUG_ENTER("drop_open_table");
1527 if (table->s->tmp_table)
1528 thd->drop_temporary_table(table, NULL, true);
1529 else
1530 {
1531 DBUG_ASSERT(table == thd->open_tables);
1532
1533 handlerton *table_type= table->s->db_type();
1534 table->file->extra(HA_EXTRA_PREPARE_FOR_DROP);
1535 table->s->tdc->flush(thd, true);
1536 close_thread_table(thd, &thd->open_tables);
1537 /* Remove the table from the storage engine and rm the .frm. */
1538 quick_rm_table(thd, table_type, db_name, table_name, QRMT_DEFAULT);
1539 }
1540 DBUG_VOID_RETURN;
1541}
1542
1543
1544/**

Callers 2

abort_result_setMethod · 0.85

Calls 6

close_thread_tableFunction · 0.85
quick_rm_tableFunction · 0.85
drop_temporary_tableMethod · 0.80
db_typeMethod · 0.80
extraMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected