Commit b7016bd3 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-26626 fixup: SIGFPE during startup

srv_start(): Set srv_startup_is_before_trx_rollback_phase before
starting the buf_flush_page_cleaner() thread, so that it will not
invoke log_checkpoint() before the log file has been created.

This race condition was reproduced with https://rr-project.org.
This fixes up commit 15efb7ed
parent c14f60a7
...@@ -1243,14 +1243,13 @@ dberr_t srv_start(bool create_new_db) ...@@ -1243,14 +1243,13 @@ dberr_t srv_start(bool create_new_db)
recv_sys.create(); recv_sys.create();
lock_sys.create(srv_lock_table_size); lock_sys.create(srv_lock_table_size);
srv_startup_is_before_trx_rollback_phase = true;
if (!srv_read_only_mode) { if (!srv_read_only_mode) {
buf_flush_page_cleaner_init(); buf_flush_page_cleaner_init();
ut_ad(buf_page_cleaner_is_active); ut_ad(buf_page_cleaner_is_active);
} }
srv_startup_is_before_trx_rollback_phase = true;
/* Check if undo tablespaces and redo log files exist before creating /* Check if undo tablespaces and redo log files exist before creating
a new system tablespace */ a new system tablespace */
if (create_new_db) { if (create_new_db) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment