| 1521 | */ |
| 1522 | |
| 1523 | void 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 | /** |
no test coverage detected