From 4de26a8e0e1eb7c726c05407c1461c17fc4c3f3a Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sat, 17 Sep 2016 08:09:10 +0400 Subject: MDEV-10343 Providing compatibility for basic SQL data types Based on the patch by Dmitry Tolpeko. --- sql/lex.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sql/lex.h') diff --git a/sql/lex.h b/sql/lex.h index 35c9e33d7d9..a83ef373642 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -114,6 +114,7 @@ static SYMBOL symbols[] = { { "CIPHER", SYM(CIPHER_SYM)}, { "CLASS_ORIGIN", SYM(CLASS_ORIGIN_SYM)}, { "CLIENT", SYM(CLIENT_SYM)}, + { "CLOB", SYM(CLOB)}, { "CLOSE", SYM(CLOSE_SYM)}, { "COALESCE", SYM(COALESCE)}, { "CODE", SYM(CODE_SYM)}, @@ -472,6 +473,7 @@ static SYMBOL symbols[] = { { "QUERY", SYM(QUERY_SYM)}, { "QUICK", SYM(QUICK)}, { "RANGE", SYM(RANGE_SYM)}, + { "RAW", SYM(RAW)}, { "READ", SYM(READ_SYM)}, { "READ_ONLY", SYM(READ_ONLY_SYM)}, { "READ_WRITE", SYM(READ_WRITE_SYM)}, @@ -660,6 +662,7 @@ static SYMBOL symbols[] = { { "VARBINARY", SYM(VARBINARY)}, { "VARCHAR", SYM(VARCHAR)}, { "VARCHARACTER", SYM(VARCHAR)}, + { "VARCHAR2", SYM(VARCHAR2)}, { "VARIABLES", SYM(VARIABLES)}, { "VARYING", SYM(VARYING)}, { "VIA", SYM(VIA_SYM)}, -- cgit v1.2.1 From 8fdc1f0147cd77d3191139247a4c54d1f1cbe189 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Thu, 11 Aug 2016 14:12:14 +0400 Subject: MDEV-10411 Providing compatibility for basic PL/SQL constructs Part 9: EXCEPTION handlers - Adding exception handler syntax: WHEN exception_name THEN statement - Adding EXCEPTION section intoi the top BEGIN..END SP block. Note, currently EXCEPTION goes in the beginning of the top BEGIN..END SP block. TODO: - add EXCEPTION section into inner blocks - move EXCEPTION to the end of the block --- 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 a83ef373642..b1259eab42b 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -222,6 +222,7 @@ static SYMBOL symbols[] = { { "EXCHANGE", SYM(EXCHANGE_SYM)}, { "EXCLUDE", SYM(EXCLUDE_SYM)}, { "EXECUTE", SYM(EXECUTE_SYM)}, + { "EXCEPTION", SYM(EXCEPTION_SYM)}, { "EXISTS", SYM(EXISTS)}, { "EXIT", SYM(EXIT_SYM)}, { "EXPANSION", SYM(EXPANSION_SYM)}, -- cgit v1.2.1 From 6cd24d124ff1fdc484abc60932fedc1e2d3adac1 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sat, 17 Sep 2016 08:14:07 +0400 Subject: MDEV-10411 Providing compatibility for basic PL/SQL constructs Part 15: ELSIF vs ELSEIF Also, moving tests for Oracle keywords in sql_mode=DEFAULT from "parser.test" to a better place "keywords.test". --- 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 b1259eab42b..d258c9bac5b 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -203,6 +203,7 @@ static SYMBOL symbols[] = { { "EACH", SYM(EACH_SYM)}, { "ELSE", SYM(ELSE)}, { "ELSEIF", SYM(ELSEIF_SYM)}, + { "ELSIF", SYM(ELSIF_SYM)}, { "ENABLE", SYM(ENABLE_SYM)}, { "ENCLOSED", SYM(ENCLOSED)}, { "END", SYM(END)}, -- cgit v1.2.1 From c8822d71efd426902db6f8096037a1ad9d61b3fe Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Mon, 19 Sep 2016 11:39:36 +0400 Subject: MDEV-10342 Providing compatibility for basic SQL built-in functions Adding the Oracle style DECODE function: DECODE(operand, search, result [, search, result ...] [, default_result]) --- 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 d258c9bac5b..8e946853c24 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -705,6 +705,7 @@ static SYMBOL sql_functions[] = { { "CURTIME", SYM(CURTIME)}, { "DATE_ADD", SYM(DATE_ADD_INTERVAL)}, { "DATE_SUB", SYM(DATE_SUB_INTERVAL)}, + { "DECODE", SYM(DECODE_SYM)}, { "DENSE_RANK", SYM(DENSE_RANK_SYM)}, { "EXTRACT", SYM(EXTRACT_SYM)}, { "FIRST_VALUE", SYM(FIRST_VALUE_SYM)}, -- cgit v1.2.1 From a699a5f967516bb2ed633fffc9539884e4df4499 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Thu, 22 Sep 2016 13:31:20 +0400 Subject: MDEV-10583 sql_mode=ORACLE: SQL%ROWCOUNT --- 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 8e946853c24..38b0e2ab68c 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -523,6 +523,7 @@ static SYMBOL symbols[] = { { "ROLLUP", SYM(ROLLUP_SYM)}, { "ROUTINE", SYM(ROUTINE_SYM)}, { "ROW", SYM(ROW_SYM)}, + { "ROWCOUNT", SYM(ROWCOUNT_SYM)}, /* Oracle-N */ { "ROWS", SYM(ROWS_SYM)}, { "ROW_COUNT", SYM(ROW_COUNT_SYM)}, { "ROW_FORMAT", SYM(ROW_FORMAT_SYM)}, -- cgit v1.2.1 From 76714a5c9a4c05fa7084f2c562a9eb50a0b7bd17 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 27 Sep 2016 10:13:08 +0400 Subject: MDEV-10582 sql_mode=ORACLE: explicit cursor attributes %ISOPEN, %ROWCOUNT, %FOUND, %NOTFOUND --- sql/lex.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/lex.h') diff --git a/sql/lex.h b/sql/lex.h index 38b0e2ab68c..08bcba3beee 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -310,6 +310,7 @@ static SYMBOL symbols[] = { { "IPC", SYM(IPC_SYM)}, { "IS", SYM(IS)}, { "ISOLATION", SYM(ISOLATION)}, + { "ISOPEN", SYM(ISOPEN_SYM)}, { "ISSUER", SYM(ISSUER_SYM)}, { "ITERATE", SYM(ITERATE_SYM)}, { "INVOKER", SYM(INVOKER_SYM)}, @@ -415,6 +416,7 @@ static SYMBOL symbols[] = { { "NODEGROUP", SYM(NODEGROUP_SYM)}, { "NONE", SYM(NONE_SYM)}, { "NOT", SYM(NOT_SYM)}, + { "NOTFOUND", SYM(NOTFOUND_SYM)}, { "NO_WRITE_TO_BINLOG", SYM(NO_WRITE_TO_BINLOG)}, { "NULL", SYM(NULL_SYM)}, { "NUMBER", SYM(NUMBER_SYM)}, -- cgit v1.2.1 From 7fa1ad14dca4850caee52e75d69eae441af3f824 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 27 Sep 2016 13:22:38 +0400 Subject: MDEV-10840 sql_mode=ORACLE: RAISE statement for predefined exceptions --- 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 08bcba3beee..a932a24cd3c 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -476,6 +476,7 @@ static SYMBOL symbols[] = { { "QUARTER", SYM(QUARTER_SYM)}, { "QUERY", SYM(QUERY_SYM)}, { "QUICK", SYM(QUICK)}, + { "RAISE", SYM(RAISE_SYM)}, { "RANGE", SYM(RANGE_SYM)}, { "RAW", SYM(RAW)}, { "READ", SYM(READ_SYM)}, -- cgit v1.2.1 From cd1afe0aac28cec267e9c2e74d7a5f73050e2614 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 15 Nov 2016 15:57:57 +0400 Subject: MDEV-10588 sql_mode=ORACLE: TRUNCATE TABLE t1 [ {DROP|REUSE} STORAGE ] --- 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 a932a24cd3c..67db3b746bf 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -517,6 +517,7 @@ static SYMBOL symbols[] = { { "RETURN", SYM(RETURN_SYM)}, { "RETURNING", SYM(RETURNING_SYM)}, { "RETURNS", SYM(RETURNS_SYM)}, + { "REUSE", SYM(REUSE_SYM)}, { "REVERSE", SYM(REVERSE_SYM)}, { "REVOKE", SYM(REVOKE)}, { "RIGHT", SYM(RIGHT)}, -- cgit v1.2.1 From af7f287b3b53742e32dd489c8e7187f336a222a9 Mon Sep 17 00:00:00 2001 From: halfspawn Date: Tue, 14 Feb 2017 14:43:11 +0100 Subject: MDEV-10697 GOTO statement --- 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 67db3b746bf..cdd4daffaf8 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -261,6 +261,7 @@ static SYMBOL symbols[] = { { "GET_FORMAT", SYM(GET_FORMAT)}, { "GET", SYM(GET_SYM)}, { "GLOBAL", SYM(GLOBAL_SYM)}, + { "GOTO", SYM(GOTO_SYM)}, { "GRANT", SYM(GRANT)}, { "GRANTS", SYM(GRANTS)}, { "GROUP", SYM(GROUP_SYM)}, -- cgit v1.2.1 From 1b8a0c879d80733e3c684080b8c7719c35642e0d Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 3 Mar 2017 15:02:08 +0400 Subject: MDEV-12133 sql_mode=ORACLE: table%ROWTYPE in variable declarations --- 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 cdd4daffaf8..2a30f7f31ad 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -530,6 +530,7 @@ static SYMBOL symbols[] = { { "ROW", SYM(ROW_SYM)}, { "ROWCOUNT", SYM(ROWCOUNT_SYM)}, /* Oracle-N */ { "ROWS", SYM(ROWS_SYM)}, + { "ROWTYPE", SYM(ROWTYPE_SYM)}, { "ROW_COUNT", SYM(ROW_COUNT_SYM)}, { "ROW_FORMAT", SYM(ROW_FORMAT_SYM)}, { "RTREE", SYM(RTREE_SYM)}, -- cgit v1.2.1