Skip to content

Commit 9efeb30

Browse files
ssorumgarddahlerlend
authored andcommitted
Bug#29492857: LOGGING BUFFERED DURING MYSQL UPGRADE
The patch for Bug#29189532 implemented explicit flush requests from the clients, but the timeout limits still prevented immediate flushing from happening. This patch ignores the timeout limit when an explicit request for flush is submitted. The patch also adds a couple of additional flush requests. Change-Id: I8ee278eca42b753f2f7287e5dd9bc76a5f86f6f9 Reviewed-by: Tatjana Nuernberg <tatjana.nuernberg@oracle.com>
1 parent 22b1080 commit 9efeb30

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

components/mysql_server/log_builtins.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,8 @@ static int log_sink_buffer(void *instance MY_ATTRIBUTE((unused)),
14491449
// Buffering very first event; set up initial time-out ...
14501450
log_buffering_timeout =
14511451
now + (LOG_BUFFERING_TIMEOUT_AFTER * LOG_BUFFERING_TIME_SCALE);
1452-
else if (now > log_buffering_timeout) {
1452+
1453+
if (now > log_buffering_timeout || ll == nullptr) {
14531454
// We timed out. Flush, and set up new, possibly shorter subsequent timeout.
14541455

14551456
/*

sql/dd/upgrade_57/upgrade.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,8 @@ bool add_sdi_info(THD *thd) {
573573
if (Upgrade_status().update(Upgrade_status::enum_stage::SDI_INFO_UPDATED))
574574
return true;
575575

576-
LogErr(INFORMATION_LEVEL, ER_DD_UPGRADE_DD_POPULATED);
576+
LogErr(SYSTEM_LEVEL, ER_DD_UPGRADE_DD_POPULATED);
577+
log_sink_buffer_check_timeout();
577578

578579
return false;
579580
} // add_sdi_info
@@ -890,7 +891,8 @@ bool do_pre_checks_and_initialize_dd(THD *thd) {
890891
If mysql.idb does not exist and updgrade stage tracking file
891892
does not exist, we are in upgrade mode.
892893
*/
893-
LogErr(INFORMATION_LEVEL, ER_DD_UPGRADE_START);
894+
LogErr(SYSTEM_LEVEL, ER_DD_UPGRADE_START);
895+
log_sink_buffer_check_timeout();
894896
}
895897

896898
/*

0 commit comments

Comments
 (0)