mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
MDEV-26067 innodb_lock_wait_timeout values above 100,000,000 are useless
The practical maximum value of the parameter innodb_lock_wait_timeout is 100,000,000. Any value larger than that specifies an infinite timeout. Therefore, we should make 100,000,000 the maximum value of the parameter.
This commit is contained in:
parent
ce1c957ab1
commit
8c5c3a4594
7 changed files with 26 additions and 31 deletions
|
@ -74,9 +74,11 @@ SELECT @@global.innodb_lock_wait_timeout;
|
|||
@@global.innodb_lock_wait_timeout
|
||||
1024
|
||||
SET @@global.innodb_lock_wait_timeout=1073741824;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect innodb_lock_wait_timeout value: '1073741824'
|
||||
SELECT @@global.innodb_lock_wait_timeout;
|
||||
@@global.innodb_lock_wait_timeout
|
||||
1073741824
|
||||
100000000
|
||||
SET @@session.innodb_lock_wait_timeout=1;
|
||||
SELECT @@session.innodb_lock_wait_timeout;
|
||||
@@session.innodb_lock_wait_timeout
|
||||
|
@ -86,14 +88,16 @@ SELECT @@session.innodb_lock_wait_timeout;
|
|||
@@session.innodb_lock_wait_timeout
|
||||
1024
|
||||
SET @@session.innodb_lock_wait_timeout=1073741824;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect innodb_lock_wait_timeout value: '1073741824'
|
||||
SELECT @@session.innodb_lock_wait_timeout;
|
||||
@@session.innodb_lock_wait_timeout
|
||||
1073741824
|
||||
100000000
|
||||
SET @@global.innodb_lock_wait_timeout="t";
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
|
||||
SELECT @@global.innodb_lock_wait_timeout;
|
||||
@@global.innodb_lock_wait_timeout
|
||||
1073741824
|
||||
100000000
|
||||
SET @@global.innodb_lock_wait_timeout=-1024;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect innodb_lock_wait_timeout value: '-1024'
|
||||
|
@ -105,27 +109,27 @@ Warnings:
|
|||
Warning 1292 Truncated incorrect innodb_lock_wait_timeout value: '1073741825'
|
||||
SELECT @@global.innodb_lock_wait_timeout;
|
||||
@@global.innodb_lock_wait_timeout
|
||||
1073741824
|
||||
100000000
|
||||
SET @@global.innodb_lock_wait_timeout=" ";
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
|
||||
SELECT @@global.innodb_lock_wait_timeout;
|
||||
@@global.innodb_lock_wait_timeout
|
||||
1073741824
|
||||
100000000
|
||||
SET @@global.innodb_lock_wait_timeout=' ';
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
|
||||
SELECT @@global.innodb_lock_wait_timeout;
|
||||
@@global.innodb_lock_wait_timeout
|
||||
1073741824
|
||||
100000000
|
||||
SET @@global.innodb_lock_wait_timeout=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
|
||||
SELECT @@global.innodb_lock_wait_timeout;
|
||||
@@global.innodb_lock_wait_timeout
|
||||
1073741824
|
||||
100000000
|
||||
SET @@session.innodb_lock_wait_timeout="T";
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
|
||||
SELECT @@session.innodb_lock_wait_timeout;
|
||||
@@session.innodb_lock_wait_timeout
|
||||
1073741824
|
||||
100000000
|
||||
SET @@session.innodb_lock_wait_timeout=-1024;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect innodb_lock_wait_timeout value: '-1024'
|
||||
|
@ -137,22 +141,22 @@ Warnings:
|
|||
Warning 1292 Truncated incorrect innodb_lock_wait_timeout value: '1073999999'
|
||||
SELECT @@session.innodb_lock_wait_timeout;
|
||||
@@session.innodb_lock_wait_timeout
|
||||
1073741824
|
||||
100000000
|
||||
SET @@session.innodb_lock_wait_timeout=' ';
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
|
||||
SELECT @@session.innodb_lock_wait_timeout;
|
||||
@@session.innodb_lock_wait_timeout
|
||||
1073741824
|
||||
100000000
|
||||
SET @@session.innodb_lock_wait_timeout=" ";
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
|
||||
SELECT @@session.innodb_lock_wait_timeout;
|
||||
@@session.innodb_lock_wait_timeout
|
||||
1073741824
|
||||
100000000
|
||||
SET @@session.innodb_lock_wait_timeout=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
|
||||
SELECT @@session.innodb_lock_wait_timeout;
|
||||
@@session.innodb_lock_wait_timeout
|
||||
1073741824
|
||||
100000000
|
||||
SET @@global.innodb_lock_wait_timeout = @start_global_value;
|
||||
SELECT @@global.innodb_lock_wait_timeout;
|
||||
@@global.innodb_lock_wait_timeout
|
||||
|
|
|
@ -207,15 +207,6 @@
|
|||
NUMERIC_BLOCK_SIZE 0
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
@@ -1021,7 +1021,7 @@
|
||||
SESSION_VALUE 50
|
||||
DEFAULT_VALUE 50
|
||||
VARIABLE_SCOPE SESSION
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1073741824
|
||||
@@ -1033,10 +1033,10 @@
|
||||
SESSION_VALUE NULL
|
||||
DEFAULT_VALUE 16777216
|
||||
|
|
|
@ -1009,10 +1009,10 @@ VARIABLE_NAME INNODB_LOCK_WAIT_TIMEOUT
|
|||
SESSION_VALUE 50
|
||||
DEFAULT_VALUE 50
|
||||
VARIABLE_SCOPE SESSION
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.
|
||||
VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. The value 100000000 is infinite timeout.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 1073741824
|
||||
NUMERIC_MAX_VALUE 100000000
|
||||
NUMERIC_BLOCK_SIZE 0
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
|
|
|
@ -270,7 +270,7 @@ replace t1 values (1,2),(1,3),(2,4);
|
|||
# MDEV-14829 Assertion `0' failed in Protocol::end_statement upon concurrent UPDATE
|
||||
#
|
||||
set @old_lock_wait_timeout= @@innodb_lock_wait_timeout;
|
||||
set @@innodb_lock_wait_timeout= 1073741824;
|
||||
set @@innodb_lock_wait_timeout= 100000000;
|
||||
create or replace table t1 (pk int, a char(3), b char(3), primary key(pk))
|
||||
engine=innodb with system versioning;
|
||||
insert into t1 (pk) values (1);
|
||||
|
|
|
@ -173,7 +173,7 @@ replace t1 values (1,2),(1,3),(2,4);
|
|||
--echo # MDEV-14829 Assertion `0' failed in Protocol::end_statement upon concurrent UPDATE
|
||||
--echo #
|
||||
set @old_lock_wait_timeout= @@innodb_lock_wait_timeout;
|
||||
set @@innodb_lock_wait_timeout= 1073741824;
|
||||
set @@innodb_lock_wait_timeout= 100000000;
|
||||
create or replace table t1 (pk int, a char(3), b char(3), primary key(pk))
|
||||
engine=innodb with system versioning;
|
||||
|
||||
|
|
|
@ -869,9 +869,9 @@ static MYSQL_THDVAR_BOOL(ft_enable_stopword, PLUGIN_VAR_OPCMDARG,
|
|||
NULL, NULL,
|
||||
/* default */ TRUE);
|
||||
|
||||
static MYSQL_THDVAR_ULONG(lock_wait_timeout, PLUGIN_VAR_RQCMDARG,
|
||||
"Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.",
|
||||
NULL, NULL, 50, 0, 1024 * 1024 * 1024, 0);
|
||||
static MYSQL_THDVAR_UINT(lock_wait_timeout, PLUGIN_VAR_RQCMDARG,
|
||||
"Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. The value 100000000 is infinite timeout.",
|
||||
NULL, NULL, 50, 0, 100000000, 0);
|
||||
|
||||
static MYSQL_THDVAR_STR(ft_user_stopword_table,
|
||||
PLUGIN_VAR_OPCMDARG|PLUGIN_VAR_MEMALLOC,
|
||||
|
@ -1857,7 +1857,7 @@ thd_has_edited_nontrans_tables(
|
|||
/******************************************************************//**
|
||||
Returns the lock wait timeout for the current connection.
|
||||
@return the lock wait timeout, in seconds */
|
||||
ulong
|
||||
uint
|
||||
thd_lock_wait_timeout(
|
||||
/*==================*/
|
||||
THD* thd) /*!< in: thread handle, or NULL to query
|
||||
|
|
|
@ -242,7 +242,7 @@ const char *thd_innodb_tmpdir(THD *thd);
|
|||
/******************************************************************//**
|
||||
Returns the lock wait timeout for the current connection.
|
||||
@return the lock wait timeout, in seconds */
|
||||
ulong
|
||||
uint
|
||||
thd_lock_wait_timeout(
|
||||
/*==================*/
|
||||
THD* thd); /*!< in: thread handle, or NULL to query
|
||||
|
|
Loading…
Reference in a new issue