1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-36138 Server null-pointer crash at startup when tmptables left in --tmpdir

Fix a regression introduced in MDEV-35840 78157c4765

Also tested compiling with -O3 that the -Warray-bounds fixed in
MDEV-35840 does not resurface
This commit is contained in:
Yuchen Pei
2025-02-24 12:10:32 +11:00
parent f3687ccaaf
commit 0fa141ebb4
3 changed files with 22 additions and 3 deletions

View File

@@ -8986,9 +8986,11 @@ my_bool mysql_rm_tmp_tables(void)
memcpy(path_copy, path, path_len - ext_len);
path_copy[path_len - ext_len]= 0;
init_tmp_table_share(thd, &share, "", 0, "", path_copy);
handlerton *ht= share.db_type();
if (!open_table_def(thd, &share))
ht->drop_table(share.db_type(), path_copy);
{
handlerton *ht= share.db_type();
ht->drop_table(ht, path_copy);
}
free_table_share(&share);
}
/*