1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-11379, MDEV-11388 - [WAIT n|NOWAIT]

Extended syntax so that it is now possible to set lock_wait_timeout for the
following statements:
SELECT ... FOR UPDATE [WAIT n|NOWAIT]
SELECT ... LOCK IN SHARED MODE [WAIT n|NOWAIT]
LOCK TABLE ... [WAIT n|NOWAIT]
CREATE ... INDEX ON tbl_name (index_col_name, ...) [WAIT n|NOWAIT] ...
ALTER TABLE tbl_name [WAIT n|NOWAIT] ...
OPTIMIZE TABLE tbl_name [WAIT n|NOWAIT]
DROP INDEX ... [WAIT n|NOWAIT]
TRUNCATE TABLE tbl_name [WAIT n|NOWAIT]
RENAME TABLE tbl_name [WAIT n|NOWAIT] ...
DROP TABLE tbl_name [WAIT n|NOWAIT] ...

Valid range of lock_wait_timeout and innodb_lock_wait_timeout was extended so
that 0 is acceptable value (means no wait).

This is amended AliSQL patch. We prefer Oracle syntax for [WAIT n|NOWAIT]
instead of original [WAIT [n]|NO_WAIT].
This commit is contained in:
Sergey Vojtovich
2017-02-07 13:27:42 +04:00
parent 4c6ae99285
commit 8026cd6202
22 changed files with 369 additions and 73 deletions

View File

@ -54,17 +54,15 @@ SELECT @@session.lock_wait_timeout;
65535
'#------------------FN_DYNVARS_002_05-----------------------#'
SET @@global.lock_wait_timeout = 0;
Warnings:
Warning 1292 Truncated incorrect lock_wait_timeout value: '0'
SELECT @@global.lock_wait_timeout;
@@global.lock_wait_timeout
1
0
SET @@global.lock_wait_timeout = -1024;
Warnings:
Warning 1292 Truncated incorrect lock_wait_timeout value: '-1024'
SELECT @@global.lock_wait_timeout;
@@global.lock_wait_timeout
1
0
SET @@global.lock_wait_timeout = 31536001;
Warnings:
Warning 1292 Truncated incorrect lock_wait_timeout value: '31536001'
@ -87,17 +85,15 @@ SELECT @@global.lock_wait_timeout;
@@global.lock_wait_timeout
31536000
SET @@session.lock_wait_timeout = 0;
Warnings:
Warning 1292 Truncated incorrect lock_wait_timeout value: '0'
SELECT @@session.lock_wait_timeout;
@@session.lock_wait_timeout
1
0
SET @@session.lock_wait_timeout = -2;
Warnings:
Warning 1292 Truncated incorrect lock_wait_timeout value: '-2'
SELECT @@session.lock_wait_timeout;
@@session.lock_wait_timeout
1
0
SET @@session.lock_wait_timeout = 31537000;
Warnings:
Warning 1292 Truncated incorrect lock_wait_timeout value: '31537000'
@ -137,11 +133,9 @@ SELECT @@global.lock_wait_timeout;
@@global.lock_wait_timeout
1
SET @@global.lock_wait_timeout = FALSE;
Warnings:
Warning 1292 Truncated incorrect lock_wait_timeout value: '0'
SELECT @@global.lock_wait_timeout;
@@global.lock_wait_timeout
1
0
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@global.lock_wait_timeout = 10;
SET @@session.lock_wait_timeout = 11;