From 8026cd6202bd252dc9baac31d6c8bc39653bd637 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Tue, 7 Feb 2017 13:27:42 +0400 Subject: 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]. --- sql/lex.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/lex.h') diff --git a/sql/lex.h b/sql/lex.h index 35c9e33d7d9..2e105eb89ec 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -409,6 +409,7 @@ static SYMBOL symbols[] = { { "NEXT", SYM(NEXT_SYM)}, { "NO", SYM(NO_SYM)}, { "NO_WAIT", SYM(NO_WAIT_SYM)}, + { "NOWAIT", SYM(NOWAIT_SYM)}, { "NODEGROUP", SYM(NODEGROUP_SYM)}, { "NONE", SYM(NONE_SYM)}, { "NOT", SYM(NOT_SYM)}, -- cgit v1.2.1