mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 22:25:32 +02:00
MDEV-11412 Ensure that table is truly dropped when using DROP TABLE
don't do table discovery on DROP. DROP falls back to "force" approach when a table isn't found and will try to drop in all engines anyway. That is, trying to discover in all engines before the drop is redundant and may be expensive.
This commit is contained in:
parent
79a3f96166
commit
7c2ba9e9d7
6 changed files with 85 additions and 73 deletions
|
|
@ -497,19 +497,27 @@ int ha_seq_group_by_handler::next_row()
|
|||
Initialize the interface between the sequence engine and MariaDB
|
||||
*****************************************************************************/
|
||||
|
||||
static int drop_table(handlerton *hton, const char *path)
|
||||
{
|
||||
const char *name= strrchr(path, FN_LIBCHAR)+1;
|
||||
ulonglong from, to, step;
|
||||
if (parse_table_name(name, strlen(name), &from, &to, &step))
|
||||
return ENOENT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int init(void *p)
|
||||
{
|
||||
handlerton *hton= (handlerton *)p;
|
||||
sequence_hton= hton;
|
||||
hton->create= create_handler;
|
||||
hton->drop_table= [](handlerton *, const char*) { return 0; };
|
||||
hton->drop_table= drop_table;
|
||||
hton->discover_table= discover_table;
|
||||
hton->discover_table_existence= discover_table_existence;
|
||||
hton->commit= hton->rollback= dummy_commit_rollback;
|
||||
hton->savepoint_set= hton->savepoint_rollback= hton->savepoint_release=
|
||||
dummy_savepoint;
|
||||
hton->create_group_by= create_group_by_handler;
|
||||
hton->flags= HTON_AUTOMATIC_DELETE_TABLE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue