Commit 8773a5e1 authored by Marko Mäkelä's avatar Marko Mäkelä

Post-fix MDEV-11695 Define a reasonable upper limit for innodb_spin_wait_delay

Change the parameter type from ulong to uint, so that 32-bit and
64-bit systems will report an identical result.
parent 6790bf04
......@@ -2196,7 +2196,7 @@ GLOBAL_VALUE 6
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 6
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum delay between polling for a spin lock (6 by default)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 6000
......
......@@ -22611,7 +22611,7 @@ static MYSQL_SYSVAR_ULONG(sync_spin_loops, srv_n_spin_wait_rounds,
"Count of spin-loop rounds in InnoDB mutexes (30 by default)",
NULL, NULL, 30L, 0L, ~0UL, 0);
static MYSQL_SYSVAR_ULONG(spin_wait_delay, srv_spin_wait_delay,
static MYSQL_SYSVAR_UINT(spin_wait_delay, srv_spin_wait_delay,
PLUGIN_VAR_OPCMDARG,
"Maximum delay between polling for a spin lock (6 by default)",
NULL, NULL, 6, 0, 6000, 0);
......
......@@ -522,7 +522,7 @@ extern my_bool srv_scrub_log;
extern ulong srv_n_spin_wait_rounds;
extern ulong srv_n_free_tickets_to_enter;
extern ulong srv_thread_sleep_delay;
extern ulong srv_spin_wait_delay;
extern uint srv_spin_wait_delay;
extern ibool srv_priority_boost;
extern ulint srv_truncated_status_writes;
......
......@@ -28,7 +28,7 @@ Created 2012-03-24 Sunny Bains.
#ifndef ut0mutex_h
#define ut0mutex_h
extern ulong srv_spin_wait_delay;
extern uint srv_spin_wait_delay;
extern ulong srv_n_spin_wait_rounds;
extern ulong srv_force_recovery_crash;
......@@ -75,7 +75,7 @@ typedef BlockSyncArrayMutex ib_bpmutex_t;
#error "ib_mutex_t type is unknown"
#endif /* MUTEX_FUTEX */
extern ulong srv_spin_wait_delay;
extern uint srv_spin_wait_delay;
extern ulong srv_n_spin_wait_rounds;
#define mutex_create(I, M) mutex_init((M), (I), __FILE__, __LINE__)
......
......@@ -418,7 +418,7 @@ ulong srv_replication_delay = 0;
/*-------------------------------------------*/
UNIV_INTERN ulong srv_n_spin_wait_rounds = 15;
ulong srv_spin_wait_delay = 6;
uint srv_spin_wait_delay;
ibool srv_priority_boost = TRUE;
static ulint srv_n_rows_inserted_old = 0;
......
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