Commit dfb58a37 authored by Sergei Golubchik's avatar Sergei Golubchik

innodb/xtradb: init scrub mutex even in read-only mode

because it's locked for innodb part of SHOW STATUS,
which can happen in read-only mode too.
parent ab64d674
...@@ -2983,9 +2983,6 @@ innobase_start_or_create_for_mysql(void) ...@@ -2983,9 +2983,6 @@ innobase_start_or_create_for_mysql(void)
/* Create the thread that will optimize the FTS sub-system. */ /* Create the thread that will optimize the FTS sub-system. */
fts_optimize_init(); fts_optimize_init();
/* Init data for datafile scrub threads */
btr_scrub_init();
/* Create thread(s) that handles key rotation */ /* Create thread(s) that handles key rotation */
fil_crypt_threads_init(); fil_crypt_threads_init();
...@@ -2994,6 +2991,9 @@ innobase_start_or_create_for_mysql(void) ...@@ -2994,6 +2991,9 @@ innobase_start_or_create_for_mysql(void)
os_thread_create(log_scrub_thread, NULL, NULL); os_thread_create(log_scrub_thread, NULL, NULL);
} }
/* Init data for datafile scrub threads */
btr_scrub_init();
/* Initialize online defragmentation. */ /* Initialize online defragmentation. */
btr_defragment_init(); btr_defragment_init();
...@@ -3177,11 +3177,11 @@ innobase_shutdown_for_mysql(void) ...@@ -3177,11 +3177,11 @@ innobase_shutdown_for_mysql(void)
if (!srv_read_only_mode) { if (!srv_read_only_mode) {
fil_crypt_threads_cleanup(); fil_crypt_threads_cleanup();
/* Cleanup data for datafile scrubbing */
btr_scrub_cleanup();
} }
/* Cleanup data for datafile scrubbing */
btr_scrub_cleanup();
#ifdef __WIN__ #ifdef __WIN__
/* MDEV-361: ha_innodb.dll leaks handles on Windows /* MDEV-361: ha_innodb.dll leaks handles on Windows
MDEV-7403: should not pass recv_writer_thread_handle to MDEV-7403: should not pass recv_writer_thread_handle to
......
...@@ -3075,9 +3075,6 @@ innobase_start_or_create_for_mysql(void) ...@@ -3075,9 +3075,6 @@ innobase_start_or_create_for_mysql(void)
/* Create the thread that will optimize the FTS sub-system. */ /* Create the thread that will optimize the FTS sub-system. */
fts_optimize_init(); fts_optimize_init();
/* Init data for datafile scrub threads */
btr_scrub_init();
/* Create thread(s) that handles key rotation */ /* Create thread(s) that handles key rotation */
fil_crypt_threads_init(); fil_crypt_threads_init();
...@@ -3086,6 +3083,9 @@ innobase_start_or_create_for_mysql(void) ...@@ -3086,6 +3083,9 @@ innobase_start_or_create_for_mysql(void)
os_thread_create(log_scrub_thread, NULL, NULL); os_thread_create(log_scrub_thread, NULL, NULL);
} }
/* Init data for datafile scrub threads */
btr_scrub_init();
/* Initialize online defragmentation. */ /* Initialize online defragmentation. */
btr_defragment_init(); btr_defragment_init();
...@@ -3269,11 +3269,11 @@ innobase_shutdown_for_mysql(void) ...@@ -3269,11 +3269,11 @@ innobase_shutdown_for_mysql(void)
if (!srv_read_only_mode) { if (!srv_read_only_mode) {
fil_crypt_threads_cleanup(); fil_crypt_threads_cleanup();
/* Cleanup data for datafile scrubbing */
btr_scrub_cleanup();
} }
/* Cleanup data for datafile scrubbing */
btr_scrub_cleanup();
#ifdef __WIN__ #ifdef __WIN__
/* MDEV-361: ha_innodb.dll leaks handles on Windows /* MDEV-361: ha_innodb.dll leaks handles on Windows
MDEV-7403: should not pass recv_writer_thread_handle to MDEV-7403: should not pass recv_writer_thread_handle to
......
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