Skip to content

Commit

Permalink
PS-9011 fix 8.0: Backport Bug#35625510 crash upgrade to 8.0.32/8.0.34…
Browse files Browse the repository at this point in the history
… if tables in mysqldb has instant column (percona#5172)

Cherry picked fix for the bug Bug #112946 / #35625510
"INSTANT algo <= 8028 on table in mysql schema leads to corruption post upgrade"
(https://bugs.mysql.com/bug.php?id=112946)
(commit mysql/mysql-server@68da9a2)
from 8.2.0 to 8.0.35.
  • Loading branch information
percona-ysorokin authored Dec 7, 2023
1 parent 6797697 commit f164e33
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions storage/innobase/dict/dict0dict.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3134,11 +3134,13 @@ static dict_index_t *dict_index_build_internal_clust(

ut::free(indexed);

if (!table->is_system_table) {
if (table->has_row_versions()) {
new_index->create_fields_array();
}
new_index->create_nullables(table->current_row_version);
new_index->create_nullables(table->current_row_version);

if (table->has_row_versions()) {
new_index->create_fields_array();
} else {
/* Table with no row version are considered of version 0 */
ut_a(new_index->get_nullable_in_version(0) == new_index->n_nullable);
}

ut_ad(UT_LIST_GET_LEN(table->indexes) == 0);
Expand Down

0 comments on commit f164e33

Please sign in to comment.