Commit a4cd91c5 authored by Aleksey Midenkov's avatar Aleksey Midenkov Committed by Marko Mäkelä

MDEV-18603 Debug option to disable InnoDB monitor threads

If --debug=d,innodb_skip_monitors is specified, skip the creation
of srv_error_monitor_thread and srv_monitor_thread. In this way,
interactive debugging sessions will not be interfered by messages
about a mutex or rw_lock being held for a long time.

Closes #1192
parent df51dc28
......@@ -3,7 +3,7 @@
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2013, 2018, MariaDB Corporation.
Copyright (c) 2013, 2019, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
......@@ -2323,6 +2323,7 @@ dberr_t srv_start(bool create_new_db)
thread_started[2 + SRV_MAX_N_IO_THREADS] = true;
lock_sys.timeout_thread_active = true;
DBUG_EXECUTE_IF("innodb_skip_monitors", goto skip_monitors;);
/* Create the thread which warns of long semaphore waits */
srv_error_monitor_active = true;
thread_handles[3 + SRV_MAX_N_IO_THREADS] = os_thread_create(
......@@ -2339,6 +2340,9 @@ dberr_t srv_start(bool create_new_db)
srv_start_state |= SRV_START_STATE_LOCK_SYS
| SRV_START_STATE_MONITOR;
#ifndef DBUG_OFF
skip_monitors:
#endif
ut_ad(srv_force_recovery >= SRV_FORCE_NO_UNDO_LOG_SCAN
|| !purge_sys.enabled());
......
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