Skip to content

Commit 2f4c691

Browse files
ssorumgarddahlerlend
authored andcommitted
Bug#29492857: LOGGING BUFFERED DURING MYSQL UPGRADE
Followup: Add system level log messages for start/stop of DD upgrade, and flush log for each message. Change the wording of some error messages and added a new message for DD upgrade completion. Change-Id: Ic30c4ce9746c5a0053ad01d0cd3f6d8b8af551c0
1 parent 9efeb30 commit 2f4c691

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

share/errmsg-utf8.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11907,7 +11907,7 @@ ER_DD_UPGRADE_FAILED_FIND_VALID_DATA_DIR
1190711907
eng "Failed to find valid data directory."
1190811908

1190911909
ER_DD_UPGRADE_START
11910-
eng "Starting upgrade on data directory."
11910+
eng "Starting upgrade of data directory."
1191111911

1191211912
ER_DD_UPGRADE_FAILED_INIT_DD_SE
1191311913
eng "Failed to initialize DD Storage Engine."
@@ -19024,7 +19024,7 @@ ER_SERVER_UPGRADE_FAILED
1902419024
eng "Failed to upgrade server."
1902519025

1902619026
ER_SERVER_UPGRADE_STATUS
19027-
eng "Server upgrade from %d to %d has %s."
19027+
eng "Server upgrade from '%d' to '%d' %s."
1902819028

1902919029
ER_SERVER_UPGRADE_REPAIR_REQUIRED
1903019030
eng "Table '%s' requires repair."
@@ -19112,6 +19112,16 @@ ER_WILDCARD_NOT_ALLOWED_FOR_MULTIADDRESS_BIND
1911219112

1911319113
ER_NETWORK_NAMESPACE_FILE_PATH_TOO_LONG
1911419114
eng "The path to a special network namespace file is too long. (got %u > max %u)"
19115+
19116+
ER_IB_MSG_TOO_LONG_PATH
19117+
eng "Cannot create tablespace '%s'. The filepath is too long for this OS."
19118+
19119+
ER_IB_RECV_FIRST_REC_GROUP_INVALID
19120+
eng "The last block of redo had corrupted first_rec_group and became fixed (%u -> %u)."
19121+
19122+
ER_DD_UPGRADE_COMPLETED
19123+
eng "Data dictionary upgrade from version '%u' to '%u' completed."
19124+
1911519125
#
1911619126
# End of 8.0 error messages intended to be logged to the server error log.
1911719127
#

sql/dd/impl/bootstrap/bootstrapper.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,8 +1191,10 @@ bool initialize_dd_properties(THD *thd) {
11911191
If none of the above, then this must be DD upgrade or server
11921192
upgrade, or both.
11931193
*/
1194-
if (bootstrap::DD_bootstrap_ctx::instance().is_dd_upgrade())
1195-
LogErr(INFORMATION_LEVEL, ER_DD_UPGRADE, actual_version, dd::DD_VERSION);
1194+
if (bootstrap::DD_bootstrap_ctx::instance().is_dd_upgrade()) {
1195+
LogErr(SYSTEM_LEVEL, ER_DD_UPGRADE, actual_version, dd::DD_VERSION);
1196+
log_sink_buffer_check_timeout();
1197+
}
11961198
if (bootstrap::DD_bootstrap_ctx::instance().is_server_upgrade()) {
11971199
// This condition is hit only if upgrade has been skipped before
11981200
if (opt_upgrade_mode == UPGRADE_NONE) {

sql/dd/impl/upgrade/dd.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,11 @@ bool upgrade_tables(THD *thd) {
945945
update_versions(thd, false))
946946
return true;
947947

948+
LogErr(SYSTEM_LEVEL, ER_DD_UPGRADE_COMPLETED,
949+
bootstrap::DD_bootstrap_ctx::instance().get_actual_dd_version(),
950+
dd::DD_VERSION);
951+
log_sink_buffer_check_timeout();
952+
948953
/*
949954
Flush tables, reset the shared dictionary cache and the storage adapter.
950955
Start over DD bootstrap from the beginning.

sql/dd/impl/upgrade/server.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,8 @@ bool upgrade_system_schemas(THD *thd) {
893893

894894
LogErr(SYSTEM_LEVEL, ER_SERVER_UPGRADE_STATUS, server_version,
895895
MYSQL_VERSION_ID, "started");
896+
log_sink_buffer_check_timeout();
897+
896898
bootstrap_error_handler.set_log_error(false);
897899
bool err =
898900
fix_mysql_tables(thd) || check_and_fix_sys_schema(thd) ||
@@ -912,6 +914,7 @@ bool upgrade_system_schemas(THD *thd) {
912914
if (!err)
913915
LogErr(SYSTEM_LEVEL, ER_SERVER_UPGRADE_STATUS, server_version,
914916
MYSQL_VERSION_ID, "completed");
917+
log_sink_buffer_check_timeout();
915918

916919
/*
917920
* During server startup, dd::reset_tables_and_tablespaces is called, which

0 commit comments

Comments
 (0)