Skip to content

Commit e16e9ce

Browse files
author
Vidhya Sree Rajuladevi
committed
Merge branch 'mysql-8.0' into mysql-8.4
2 parents 002052b + e63c53e commit e16e9ce

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

sql/sql_table.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13875,6 +13875,8 @@ static bool mysql_inplace_alter_table(
1387513875
close_temporary_table(thd, altered_table, true, false);
1387613876
rollback_needs_dict_cache_reset = true;
1387713877

13878+
DEBUG_SYNC(thd, "alter_table_inplace_will_need_reset");
13879+
1387813880
/*
1387913881
Replace table definition in the data-dictionary.
1388013882

storage/innobase/dict/dict0dict.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,6 +1983,8 @@ void dict_partitioned_table_remove_from_cache(const char *name) {
19831983
ut_ad(dict_sys_mutex_own());
19841984

19851985
size_t name_len = strlen(name);
1986+
const auto name_with_separator =
1987+
std::string{name, name_len} + dict_name::PART_SEPARATOR;
19861988

19871989
for (uint32_t i = 0; i < hash_get_n_cells(dict_sys->table_id_hash); ++i) {
19881990
dict_table_t *table;
@@ -2000,8 +2002,10 @@ void dict_partitioned_table_remove_from_cache(const char *name) {
20002002
continue;
20012003
}
20022004

2003-
if ((strncmp(name, prev_table->name.m_name, name_len) == 0) &&
2004-
dict_table_is_partition(prev_table)) {
2005+
/* Find all the partitions or subpartitions of table with name */
2006+
if (!strncmp(name_with_separator.data(), prev_table->name.m_name,
2007+
name_with_separator.size())) {
2008+
ut_a(dict_table_is_partition(prev_table));
20052009
btr_drop_ahi_for_table(prev_table);
20062010
dict_table_remove_from_cache(prev_table);
20072011
}

0 commit comments

Comments
 (0)