1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-35840 Eliminate -warray-bounds triggered by TABLE_SHARE::db_type()

The warnings are triggered with -O3
This commit is contained in:
Yuchen Pei
2025-01-14 17:47:08 +11:00
parent a5174aaffb
commit 78157c4765
2 changed files with 18 additions and 12 deletions

View File

@ -8953,8 +8953,9 @@ 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))
share.db_type()->drop_table(share.db_type(), path_copy);
ht->drop_table(share.db_type(), path_copy);
free_table_share(&share);
}
/*