mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge 10.3 to 10.4
extra2_read_len resolved by keeping the implementation
in sql/table.cc by exposed it for use by ha_partition.cc
Remove identical implementation in unireg.h
(ref: bfed2c7d57
)
This commit is contained in:
@ -2779,15 +2779,13 @@ bool quick_rm_table(THD *thd, handlerton *base, const LEX_CSTRING *db,
|
||||
const LEX_CSTRING *table_name, uint flags, const char *table_path)
|
||||
{
|
||||
char path[FN_REFLEN + 1];
|
||||
const size_t pathmax = sizeof(path) - 1 - reg_ext_length;
|
||||
int error= 0;
|
||||
DBUG_ENTER("quick_rm_table");
|
||||
|
||||
size_t path_length= table_path ?
|
||||
(strxnmov(path, sizeof(path) - 1, table_path, reg_ext, NullS) - path) :
|
||||
build_table_filename(path, sizeof(path)-1, db->str, table_name->str, reg_ext, flags);
|
||||
if (mysql_file_delete(key_file_frm, path, MYF(0)))
|
||||
error= 1; /* purecov: inspected */
|
||||
path[path_length - reg_ext_length]= '\0'; // Remove reg_ext
|
||||
(strxnmov(path, pathmax, table_path, NullS) - path) :
|
||||
build_table_filename(path, pathmax, db->str, table_name->str, "", flags);
|
||||
if (flags & NO_HA_TABLE)
|
||||
{
|
||||
handler *file= get_new_handler((TABLE_SHARE*) 0, thd->mem_root, base);
|
||||
@ -2799,6 +2797,10 @@ bool quick_rm_table(THD *thd, handlerton *base, const LEX_CSTRING *db,
|
||||
if (!(flags & (FRM_ONLY|NO_HA_TABLE)))
|
||||
error|= ha_delete_table(current_thd, base, path, db, table_name, 0);
|
||||
|
||||
memcpy(path + path_length, reg_ext, reg_ext_length + 1);
|
||||
if (mysql_file_delete(key_file_frm, path, MYF(0)))
|
||||
error= 1;
|
||||
|
||||
if (likely(error == 0))
|
||||
{
|
||||
PSI_CALL_drop_table_share(flags & FN_IS_TMP, db->str, (uint)db->length,
|
||||
|
Reference in New Issue
Block a user