Skip to content

Commit 6126eb6

Browse files
committed
Bug#37394850 Remove unused function recover_innodb_upon_upgrade
Post WL#15924 cleanup, method recover_innodb_upon_upgrade() is no longer used. This patch removes this unused method. Change-Id: Id53b4635391004bc0b6df18dd21a28396a5e47c8
1 parent ddffb69 commit 6126eb6

File tree

3 files changed

+1
-35
lines changed

3 files changed

+1
-35
lines changed

share/messages_to_error_log.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ ER_RPL_GTID_TABLE_CANNOT_OPEN
105105
ER_SYSTEM_SCHEMA_NOT_FOUND
106106
eng "System schema directory does not exist."
107107

108-
ER_DD_INIT_UPGRADE_FAILED
108+
OBSOLETE_ER_DD_INIT_UPGRADE_FAILED
109109
eng "Error in initializing dictionary, upgrade will do a cleanup and exit"
110110

111111
ER_VIEW_UNKNOWN_CHARSET_OR_COLLATION

sql/dd/impl/bootstrap/bootstrapper.cc

-24
Original file line numberDiff line numberDiff line change
@@ -968,30 +968,6 @@ bool restart_dictionary(THD *thd) {
968968
return false;
969969
}
970970

971-
// Initialize dictionary in case of server restart.
972-
void recover_innodb_upon_upgrade(THD *thd) {
973-
Dictionary_impl *d = dd::Dictionary_impl::instance();
974-
store_predefined_tablespace_metadata(thd);
975-
// RAII to handle error in execution of CREATE TABLE.
976-
Key_length_error_handler key_error_handler;
977-
/*
978-
Ignore ER_TOO_LONG_KEY for dictionary tables during restart.
979-
Do not print the error in error log as we are creating only the
980-
cached objects and not physical tables.
981-
TODO: Workaround due to bug#20629014. Remove when the bug is fixed.
982-
*/
983-
thd->push_internal_handler(&key_error_handler);
984-
if (create_dd_schema(thd) || initialize_dd_properties(thd) ||
985-
create_tables(thd, nullptr) ||
986-
DDSE_dict_recover(thd, DICT_RECOVERY_RESTART_SERVER,
987-
d->get_actual_dd_version(thd))) {
988-
// Error is not be handled in this case as we are on cleanup code path.
989-
LogErr(WARNING_LEVEL, ER_DD_INIT_UPGRADE_FAILED);
990-
}
991-
thd->pop_internal_handler();
992-
return;
993-
}
994-
995971
bool setup_dd_objects_and_collations(THD *thd) {
996972
// Continue with server startup.
997973
bootstrap::DD_bootstrap_ctx::instance().set_stage(

sql/dd/impl/bootstrap/bootstrapper.h

-10
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,6 @@ bool store_plugin_IS_table_metadata(THD *thd);
233233
*/
234234
bool setup_dd_objects_and_collations(THD *thd);
235235

236-
/**
237-
This function is used in case of crash during upgrade.
238-
It tries to initialize dictionary and calls DDSE_dict_recover.
239-
InnoDB should do the recovery and empty undo log. Upgrade
240-
process will do the cleanup and exit.
241-
242-
@param thd Thread context.
243-
*/
244-
void recover_innodb_upon_upgrade(THD *thd);
245-
246236
/**
247237
Initialize InnoDB for
248238
- creating new data directory : InnoDB creates system tablespace and

0 commit comments

Comments
 (0)