mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
MDEV-9979 Keywords UNBOUNDED, PRECEDING, FOLLOWING, TIES, OTHERS should be non-reserved
Adding keywords the following keywords into the "keyword" rules: - EXCLUDE - UNBOUNDED - PRECEDING - FOLLOWING - TIES - OTHERS They are non-reserved words in the SQL standard (checked in a SQL-2011 draft), and they don't cause any conflicts in sql_yacc.yy.
This commit is contained in:
parent
642077ea5a
commit
1d96b09890
3 changed files with 104 additions and 6 deletions
|
@ -276,6 +276,57 @@ ERROR HY000: Unknown system variable 'option'
|
||||||
set option option=1;
|
set option option=1;
|
||||||
ERROR HY000: Unknown system variable 'option'
|
ERROR HY000: Unknown system variable 'option'
|
||||||
#
|
#
|
||||||
|
# MDEV-9979 Keywords UNBOUNDED, PRECEDING, FOLLOWING, TIES, OTHERS should be non-reserved
|
||||||
|
#
|
||||||
|
CREATE TABLE EXCLUDE (EXCLUDE INT);
|
||||||
|
SELECT EXCLUDE FROM EXCLUDE;
|
||||||
|
EXCLUDE
|
||||||
|
SELECT EXCLUDE EXCLUDE FROM EXCLUDE;
|
||||||
|
EXCLUDE
|
||||||
|
SELECT EXCLUDE AS EXCLUDE FROM EXCLUDE;
|
||||||
|
EXCLUDE
|
||||||
|
DROP TABLE EXCLUDE;
|
||||||
|
CREATE TABLE UNBOUNDED (UNBOUNDED INT);
|
||||||
|
SELECT UNBOUNDED FROM UNBOUNDED;
|
||||||
|
UNBOUNDED
|
||||||
|
SELECT UNBOUNDED UNBOUNDEX FROM UNBOUNDED;
|
||||||
|
UNBOUNDEX
|
||||||
|
SELECT UNBOUNDED AS UNBOUNDEX FROM UNBOUNDED;
|
||||||
|
UNBOUNDEX
|
||||||
|
DROP TABLE UNBOUNDED;
|
||||||
|
CREATE TABLE PRECEDING (PRECEDING INT);
|
||||||
|
SELECT PRECEDING FROM PRECEDING;
|
||||||
|
PRECEDING
|
||||||
|
SELECT PRECEDING PRECEDING FROM PRECEDING;
|
||||||
|
PRECEDING
|
||||||
|
SELECT PRECEDING AS PRECEDING FROM PRECEDING;
|
||||||
|
PRECEDING
|
||||||
|
DROP TABLE PRECEDING;
|
||||||
|
CREATE TABLE FOLLOWING (FOLLOWING INT);
|
||||||
|
SELECT FOLLOWING FROM FOLLOWING;
|
||||||
|
FOLLOWING
|
||||||
|
SELECT FOLLOWING FOLLOWING FROM FOLLOWING;
|
||||||
|
FOLLOWING
|
||||||
|
SELECT FOLLOWING AS FOLLOWING FROM FOLLOWING;
|
||||||
|
FOLLOWING
|
||||||
|
DROP TABLE FOLLOWING;
|
||||||
|
CREATE TABLE TIES (TIES INT);
|
||||||
|
SELECT TIES FROM TIES;
|
||||||
|
TIES
|
||||||
|
SELECT TIES TIES FROM TIES;
|
||||||
|
TIES
|
||||||
|
SELECT TIES AS TIES FROM TIES;
|
||||||
|
TIES
|
||||||
|
DROP TABLE TIES;
|
||||||
|
CREATE TABLE OTHERS (OTHERS INT);
|
||||||
|
SELECT OTHERS FROM OTHERS;
|
||||||
|
OTHERS
|
||||||
|
SELECT OTHERS OTHERS FROM OTHERS;
|
||||||
|
OTHERS
|
||||||
|
SELECT OTHERS AS OTHERS FROM OTHERS;
|
||||||
|
OTHERS
|
||||||
|
DROP TABLE OTHERS;
|
||||||
|
#
|
||||||
# MDEV-10585 EXECUTE IMMEDIATE statement
|
# MDEV-10585 EXECUTE IMMEDIATE statement
|
||||||
#
|
#
|
||||||
CREATE TABLE immediate (immediate int);
|
CREATE TABLE immediate (immediate int);
|
||||||
|
|
|
@ -174,6 +174,46 @@ set option=1;
|
||||||
--error 1193
|
--error 1193
|
||||||
set option option=1;
|
set option option=1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-9979 Keywords UNBOUNDED, PRECEDING, FOLLOWING, TIES, OTHERS should be non-reserved
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE EXCLUDE (EXCLUDE INT);
|
||||||
|
SELECT EXCLUDE FROM EXCLUDE;
|
||||||
|
SELECT EXCLUDE EXCLUDE FROM EXCLUDE;
|
||||||
|
SELECT EXCLUDE AS EXCLUDE FROM EXCLUDE;
|
||||||
|
DROP TABLE EXCLUDE;
|
||||||
|
|
||||||
|
CREATE TABLE UNBOUNDED (UNBOUNDED INT);
|
||||||
|
SELECT UNBOUNDED FROM UNBOUNDED;
|
||||||
|
SELECT UNBOUNDED UNBOUNDEX FROM UNBOUNDED;
|
||||||
|
SELECT UNBOUNDED AS UNBOUNDEX FROM UNBOUNDED;
|
||||||
|
DROP TABLE UNBOUNDED;
|
||||||
|
|
||||||
|
CREATE TABLE PRECEDING (PRECEDING INT);
|
||||||
|
SELECT PRECEDING FROM PRECEDING;
|
||||||
|
SELECT PRECEDING PRECEDING FROM PRECEDING;
|
||||||
|
SELECT PRECEDING AS PRECEDING FROM PRECEDING;
|
||||||
|
DROP TABLE PRECEDING;
|
||||||
|
|
||||||
|
CREATE TABLE FOLLOWING (FOLLOWING INT);
|
||||||
|
SELECT FOLLOWING FROM FOLLOWING;
|
||||||
|
SELECT FOLLOWING FOLLOWING FROM FOLLOWING;
|
||||||
|
SELECT FOLLOWING AS FOLLOWING FROM FOLLOWING;
|
||||||
|
DROP TABLE FOLLOWING;
|
||||||
|
|
||||||
|
CREATE TABLE TIES (TIES INT);
|
||||||
|
SELECT TIES FROM TIES;
|
||||||
|
SELECT TIES TIES FROM TIES;
|
||||||
|
SELECT TIES AS TIES FROM TIES;
|
||||||
|
DROP TABLE TIES;
|
||||||
|
|
||||||
|
CREATE TABLE OTHERS (OTHERS INT);
|
||||||
|
SELECT OTHERS FROM OTHERS;
|
||||||
|
SELECT OTHERS OTHERS FROM OTHERS;
|
||||||
|
SELECT OTHERS AS OTHERS FROM OTHERS;
|
||||||
|
DROP TABLE OTHERS;
|
||||||
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-10585 EXECUTE IMMEDIATE statement
|
--echo # MDEV-10585 EXECUTE IMMEDIATE statement
|
||||||
--echo #
|
--echo #
|
||||||
|
|
|
@ -1030,6 +1030,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
||||||
Comments for TOKENS.
|
Comments for TOKENS.
|
||||||
For each token, please include in the same line a comment that contains
|
For each token, please include in the same line a comment that contains
|
||||||
the following tags:
|
the following tags:
|
||||||
|
SQL-2011-N : Non Reserved keywird as per SQL-2011
|
||||||
SQL-2003-R : Reserved keyword as per SQL-2003
|
SQL-2003-R : Reserved keyword as per SQL-2003
|
||||||
SQL-2003-N : Non Reserved keyword as per SQL-2003
|
SQL-2003-N : Non Reserved keyword as per SQL-2003
|
||||||
SQL-1999-R : Reserved keyword as per SQL-1999
|
SQL-1999-R : Reserved keyword as per SQL-1999
|
||||||
|
@ -1219,7 +1220,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
||||||
%token EVERY_SYM /* SQL-2003-N */
|
%token EVERY_SYM /* SQL-2003-N */
|
||||||
%token EXCHANGE_SYM
|
%token EXCHANGE_SYM
|
||||||
%token EXAMINED_SYM
|
%token EXAMINED_SYM
|
||||||
%token EXCLUDE_SYM
|
%token EXCLUDE_SYM /* SQL-2011-N */
|
||||||
%token EXECUTE_SYM /* SQL-2003-R */
|
%token EXECUTE_SYM /* SQL-2003-R */
|
||||||
%token EXISTS /* SQL-2003-R */
|
%token EXISTS /* SQL-2003-R */
|
||||||
%token EXIT_SYM
|
%token EXIT_SYM
|
||||||
|
@ -1240,7 +1241,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
||||||
%token FLOAT_SYM /* SQL-2003-R */
|
%token FLOAT_SYM /* SQL-2003-R */
|
||||||
%token FLUSH_SYM
|
%token FLUSH_SYM
|
||||||
%token FOLLOWS_SYM /* MYSQL trigger*/
|
%token FOLLOWS_SYM /* MYSQL trigger*/
|
||||||
%token FOLLOWING_SYM
|
%token FOLLOWING_SYM /* SQL-2011-N */
|
||||||
%token FORCE_SYM
|
%token FORCE_SYM
|
||||||
%token FOREIGN /* SQL-2003-R */
|
%token FOREIGN /* SQL-2003-R */
|
||||||
%token FOR_SYM /* SQL-2003-R */
|
%token FOR_SYM /* SQL-2003-R */
|
||||||
|
@ -1442,7 +1443,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
||||||
%token ORDER_SYM /* SQL-2003-R */
|
%token ORDER_SYM /* SQL-2003-R */
|
||||||
%token OR_OR_SYM /* OPERATOR */
|
%token OR_OR_SYM /* OPERATOR */
|
||||||
%token OR_SYM /* SQL-2003-R */
|
%token OR_SYM /* SQL-2003-R */
|
||||||
%token OTHERS_SYM
|
%token OTHERS_SYM /* SQL-2011-N */
|
||||||
%token OUTER
|
%token OUTER
|
||||||
%token OUTFILE
|
%token OUTFILE
|
||||||
%token OUT_SYM /* SQL-2003-R */
|
%token OUT_SYM /* SQL-2003-R */
|
||||||
|
@ -1469,7 +1470,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
||||||
%token PORT_SYM
|
%token PORT_SYM
|
||||||
%token POSITION_SYM /* SQL-2003-N */
|
%token POSITION_SYM /* SQL-2003-N */
|
||||||
%token PRECEDES_SYM /* MYSQL */
|
%token PRECEDES_SYM /* MYSQL */
|
||||||
%token PRECEDING_SYM
|
%token PRECEDING_SYM /* SQL-2011-N */
|
||||||
%token PRECISION /* SQL-2003-R */
|
%token PRECISION /* SQL-2003-R */
|
||||||
%token PREPARE_SYM /* SQL-2003-R */
|
%token PREPARE_SYM /* SQL-2003-R */
|
||||||
%token PRESERVE_SYM
|
%token PRESERVE_SYM
|
||||||
|
@ -1630,7 +1631,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
||||||
%token TEXT_SYM
|
%token TEXT_SYM
|
||||||
%token THAN_SYM
|
%token THAN_SYM
|
||||||
%token THEN_SYM /* SQL-2003-R */
|
%token THEN_SYM /* SQL-2003-R */
|
||||||
%token TIES_SYM
|
%token TIES_SYM /* SQL-2011-N */
|
||||||
%token TIMESTAMP /* SQL-2003-R */
|
%token TIMESTAMP /* SQL-2003-R */
|
||||||
%token TIMESTAMP_ADD
|
%token TIMESTAMP_ADD
|
||||||
%token TIMESTAMP_DIFF
|
%token TIMESTAMP_DIFF
|
||||||
|
@ -1651,7 +1652,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
||||||
%token TYPE_SYM /* SQL-2003-N */
|
%token TYPE_SYM /* SQL-2003-N */
|
||||||
%token UDF_RETURNS_SYM
|
%token UDF_RETURNS_SYM
|
||||||
%token ULONGLONG_NUM
|
%token ULONGLONG_NUM
|
||||||
%token UNBOUNDED_SYM
|
%token UNBOUNDED_SYM /* SQL-2011-N */
|
||||||
%token UNCOMMITTED_SYM /* SQL-2003-N */
|
%token UNCOMMITTED_SYM /* SQL-2003-N */
|
||||||
%token UNDEFINED_SYM
|
%token UNDEFINED_SYM
|
||||||
%token UNDERSCORE_CHARSET
|
%token UNDERSCORE_CHARSET
|
||||||
|
@ -14539,9 +14540,11 @@ keyword:
|
||||||
| DO_SYM {}
|
| DO_SYM {}
|
||||||
| END {}
|
| END {}
|
||||||
| EXAMINED_SYM {}
|
| EXAMINED_SYM {}
|
||||||
|
| EXCLUDE_SYM {}
|
||||||
| EXECUTE_SYM {}
|
| EXECUTE_SYM {}
|
||||||
| FLUSH_SYM {}
|
| FLUSH_SYM {}
|
||||||
| FOLLOWS_SYM {}
|
| FOLLOWS_SYM {}
|
||||||
|
| FOLLOWING_SYM {}
|
||||||
| FORMAT_SYM {}
|
| FORMAT_SYM {}
|
||||||
| GET_SYM {}
|
| GET_SYM {}
|
||||||
| HANDLER_SYM {}
|
| HANDLER_SYM {}
|
||||||
|
@ -14553,10 +14556,12 @@ keyword:
|
||||||
| OPEN_SYM {}
|
| OPEN_SYM {}
|
||||||
| OPTION {}
|
| OPTION {}
|
||||||
| OPTIONS_SYM {}
|
| OPTIONS_SYM {}
|
||||||
|
| OTHERS_SYM {}
|
||||||
| OWNER_SYM {}
|
| OWNER_SYM {}
|
||||||
| PARSER_SYM {}
|
| PARSER_SYM {}
|
||||||
| PORT_SYM {}
|
| PORT_SYM {}
|
||||||
| PRECEDES_SYM {}
|
| PRECEDES_SYM {}
|
||||||
|
| PRECEDING_SYM {}
|
||||||
| PREPARE_SYM {}
|
| PREPARE_SYM {}
|
||||||
| REMOVE_SYM {}
|
| REMOVE_SYM {}
|
||||||
| REPAIR {}
|
| REPAIR {}
|
||||||
|
@ -14575,9 +14580,11 @@ keyword:
|
||||||
| START_SYM {}
|
| START_SYM {}
|
||||||
| STOP_SYM {}
|
| STOP_SYM {}
|
||||||
| STORED_SYM {}
|
| STORED_SYM {}
|
||||||
|
| TIES_SYM {}
|
||||||
| TRUNCATE_SYM {}
|
| TRUNCATE_SYM {}
|
||||||
| UNICODE_SYM {}
|
| UNICODE_SYM {}
|
||||||
| UNINSTALL_SYM {}
|
| UNINSTALL_SYM {}
|
||||||
|
| UNBOUNDED_SYM {}
|
||||||
| WRAPPER_SYM {}
|
| WRAPPER_SYM {}
|
||||||
| XA_SYM {}
|
| XA_SYM {}
|
||||||
| UPGRADE_SYM {}
|
| UPGRADE_SYM {}
|
||||||
|
|
Loading…
Reference in a new issue