Skip to content

Commit 920bbde

Browse files
Debarun Banerjeedahlerlend
authored andcommitted
BUG#30239255 CLONE FAILS ON JUST UPGRADED SERVER FROM 5.7
BUG#30602218 CLONE PLUGIN MISUNDERSTANDING UNDO TABLE-SPACE FILE NAME Problem : --------- Upgrade leaves orphan in-memory tablespaces for the 5.7 undo tablespaces. Solution : ---------- While upgrading undo tablespace, remove the tablespace completely instead of just deleting the files. Patch is based on contribution from Satya Bodapati <[email protected]> Thanks to Satya and Percona for this patch. Reviewed-by: Kevin Lewis <[email protected]> RB: 23497
1 parent 006cf4e commit 920bbde

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

share/messages_to_error_log.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10650,6 +10650,9 @@ ER_IB_MSG_DICT_PARTITION_NOT_FOUND
1065010650
ER_ACCESS_DENIED_FOR_USER_ACCOUNT_BLOCKED_BY_PASSWORD_LOCK
1065110651
eng "Access denied for user '%-.48s'@'%-.64s'. Account is blocked for %s day(s) (%s day(s) remaining) due to %u consecutive failed logins. Use FLUSH PRIVILEGES or ALTER USER to reset."
1065210652

10653+
ER_INNODB_OUT_OF_RESOURCES
10654+
eng "%s"
10655+
1065310656
ER_DD_UPGRADE_FOUND_PREPARED_XA_TRANSACTION
1065410657
eng "Upgrade cannot proceed due to an existing prepared XA transaction."
1065510658

@@ -10659,6 +10662,9 @@ ER_MIGRATE_TABLE_TO_DD_OOM
1065910662
ER_RPL_RELAY_LOG_RECOVERY_INFO_AFTER_CLONE
1066010663
eng "Relay log information for channel '%s' was found after a clone operation. Relay log recovery will be executed to adjust positions and file information for this new server. Should that automatic procedure fail please adjust the positions through 'CHANGE MASTER TO'"
1066110664

10665+
ER_IB_MSG_57_UNDO_SPACE_DELETE_FAIL
10666+
eng "Failed to delete 5.7 undo tablespace: %s during upgrade"
10667+
1066210668
# DO NOT add server-to-client messages here;
1066310669
# they go in messages_to_clients.txt
1066410670
# in the same directory as this file.

storage/innobase/srv/srv0start.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,8 +1361,11 @@ dberr_t srv_undo_tablespaces_upgrade() {
13611361

13621362
fil_space_close(undo_space.id());
13631363

1364-
os_file_delete_if_exists(innodb_data_file_key, undo_space.file_name(),
1365-
NULL);
1364+
auto err = fil_delete_tablespace(undo_space.id(), BUF_REMOVE_ALL_NO_WRITE);
1365+
1366+
if (err != DB_SUCCESS) {
1367+
ib::warn(ER_IB_MSG_57_UNDO_SPACE_DELETE_FAIL, undo_space.space_name());
1368+
}
13661369
}
13671370

13681371
/* Remove the tracking of these undo tablespaces from TRX_SYS page and

0 commit comments

Comments
 (0)