Skip to content

Commit 7b6fb07

Browse files
Mohammad Tafzeel Shamsbjornmu
authored andcommitted
Bug #34893684: Alter Table IMPORT TABLESPACE crashes after upgrade
PROBLEM: - In current version pattern for naming hidden dropped column has changed. - When cfg file is taken from older version hidden dropped column name follows old pattern. - When INSTANT operations are done in current version exactly in same order as done before creating cfg file, then the server crashes. FIX: - When searching dropped column with older name version returns null, IMPORT fails with error SCHEMA_MISMATCH. Change-Id: Ifd93adafb78f0aa7b5ae1980b64a3230f94deae9
1 parent 6c21f3d commit 7b6fb07

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

storage/innobase/row/row0import.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,6 +1662,14 @@ dberr_t row_import::match_instant_metadata_in_target_table(THD *thd) {
16621662
/* Search for this column in target table */
16631663
dict_col_t *target_col = m_table->get_col_by_name(col_name);
16641664

1665+
if (target_col == nullptr) {
1666+
ib_errf(thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH,
1667+
"Instant metadata didn't match for dropped column");
1668+
return DB_ERROR;
1669+
}
1670+
1671+
ut_a(target_col != nullptr);
1672+
16651673
if (!cfg_col->is_version_added_match(target_col) ||
16661674
!cfg_col->is_version_dropped_match(target_col) ||
16671675
(cfg_col->ind != target_col->ind) ||

0 commit comments

Comments
 (0)