maria:10.2-force_drop

Last commit made on 2022-03-18
Get this branch:
git clone -b 10.2-force_drop https://git.launchpad.net/maria

Branch merges

Branch information

Name:
10.2-force_drop
Repository:
lp:maria

Recent commits

a240eb9... by Monty <email address hidden>

Last sync of functions for drop table between 10.2 and 10.7

Functions checked / synced between 10.2 and 10.7:

handler.cc
ha_delete_table()
int handler::delete_table(const char *name)
static my_bool delete_table_force(THD *thd, plugin_ref plugin, void *arg);
int ha_delete_table_force(THD *thd, const char *path, const LEX_CSTRING *db,
                          const LEX_CSTRING *alias);

sql_table.cc
mysql_rm_table_no_locks()
- Things related to drop force synced

Usage of ha_delete_table()

df01249... by Sergei Golubchik

optimize ha_delete_table_force

first try discovering engines, then the rest.
otherwise every DROP TABLE non_existent; will do
lots of i/o trying to remove .MYI/.MYD/.MAI/.MAD/.CSV/etc files

this matches the old behavior where DROP TABLE always tried to discover
the table before dropping.

2abb907... by Sergei Golubchik

replace HTON_AUTOMATIC_DELETE_TABLE with return -1 from drop_table()

e785dff... by Sergei Golubchik

rewrite bug#26704 test case

drop-no_root needs DROP DATABASE to fail.
But `chmod 000` is not reliable after drop table force anymore.

Make DROP DATABASE to fail by creating an extra file in the db dir

6b0d274... by Sergei Golubchik

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.

Other things:
- synced code in mysql_rm_table_no_locks() with mariadb-10.7.4

4daf7ac... by Sergei Golubchik

introduce hton->drop_table() method

first step in moving drop table out of the handler.
todo: other methods that don't need an open table

for now hton->drop_table is optional, for backward compatibility
reasons

0f68cf3... by Monty <email address hidden>

Update ma_delete_table.cc to be able to handle drop force

66752c0... by Monty <email address hidden>

Original patch from Amazon, with some fixed test results

22fd31c... by Alexander Barkov

MDEV-28078 Garbage on multiple equal ENUMs with tricky character sets

TYPELIBs for ENUM/SET columns could erroneously undergo redundant
hex-unescaping at the table open time.

Fix:
- Prevent multiple unescaping of the same TYPELIB
- Prevent sharing TYPELIBs between columns with different mbminlen

118826d... by Marko Mäkelä

Fix gcc-12 -O2 -Warray-bounds