diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-01-07 15:36:08 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-01-07 15:36:08 +0200 |
commit | 8773a5e16199269be090cbed13ff892bac810cef (patch) | |
tree | 4c30f71715311fa0553380badfd48a9edb0aae2b | |
parent | 6790bf049ce340a056957ea1a445390b23f3aabe (diff) | |
download | mariadb-git-8773a5e16199269be090cbed13ff892bac810cef.tar.gz |
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.
-rw-r--r-- | mysql-test/suite/sys_vars/r/sysvars_innodb.result | 2 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 2 | ||||
-rw-r--r-- | storage/innobase/include/srv0srv.h | 2 | ||||
-rw-r--r-- | storage/innobase/include/ut0mutex.h | 4 | ||||
-rw-r--r-- | storage/innobase/srv/srv0srv.cc | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index 2365f36ee37..de2295859c3 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -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 diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index f0e5edb5704..ae9363d1709 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -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); diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 1c546dc2a06..1e05c2c6e4a 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -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; diff --git a/storage/innobase/include/ut0mutex.h b/storage/innobase/include/ut0mutex.h index e4ab671eece..197a34e6122 100644 --- a/storage/innobase/include/ut0mutex.h +++ b/storage/innobase/include/ut0mutex.h @@ -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__) diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index ab9f52b6596..002477bc4e0 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -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; |