OPTION is now a valid identifier (not a reserved word)
mysql-test/r/keywords.result: Test that option works as table/column/variable mysql-test/suite/funcs_1/r/storedproc.result: OPTION is now a valid identifier mysql-test/suite/funcs_1/t/storedproc.test: OPTION is now a valid identifier mysql-test/t/keywords.test: Test that option works as table/column/variable sql/sql_yacc.yy: OPTION is now a valid identifier
This commit is contained in:
parent
b0f5c4dbe1
commit
de5d2550af
@ -269,3 +269,9 @@ call p2();
|
|||||||
DROP PROCEDURE p1;
|
DROP PROCEDURE p1;
|
||||||
DROP PROCEDURE p2;
|
DROP PROCEDURE p2;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
create table option (option int not null);
|
||||||
|
drop table option;
|
||||||
|
set option=1;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '=1' at line 1
|
||||||
|
set option option=1;
|
||||||
|
ERROR HY000: Unknown system variable 'option'
|
||||||
|
@ -2490,8 +2490,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
|
|||||||
SELECT * from t1 where f2=f1' at line 1
|
SELECT * from t1 where f2=f1' at line 1
|
||||||
CREATE PROCEDURE option()
|
CREATE PROCEDURE option()
|
||||||
SELECT * from t1 where f2=f1;
|
SELECT * from t1 where f2=f1;
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'option()
|
DROP PROCEDURE option;
|
||||||
SELECT * from t1 where f2=f1' at line 1
|
|
||||||
CREATE PROCEDURE optionally()
|
CREATE PROCEDURE optionally()
|
||||||
SELECT * from t1 where f2=f1;
|
SELECT * from t1 where f2=f1;
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'optionally()
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'optionally()
|
||||||
@ -8548,8 +8547,6 @@ CREATE PROCEDURE sp1()
|
|||||||
BEGIN
|
BEGIN
|
||||||
declare option char;
|
declare option char;
|
||||||
END//
|
END//
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'option char;
|
|
||||||
END' at line 3
|
|
||||||
DROP PROCEDURE IF EXISTS sp1;
|
DROP PROCEDURE IF EXISTS sp1;
|
||||||
CREATE PROCEDURE sp1()
|
CREATE PROCEDURE sp1()
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -10773,11 +10770,7 @@ BEGIN
|
|||||||
declare option condition for sqlstate '02000';
|
declare option condition for sqlstate '02000';
|
||||||
declare exit handler for option set @var2 = 1;
|
declare exit handler for option set @var2 = 1;
|
||||||
END//
|
END//
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'option condition for sqlstate '02000';
|
|
||||||
declare exit handler for option set @var2' at line 3
|
|
||||||
DROP PROCEDURE IF EXISTS sp1;
|
DROP PROCEDURE IF EXISTS sp1;
|
||||||
Warnings:
|
|
||||||
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
|
|
||||||
CREATE PROCEDURE sp1( )
|
CREATE PROCEDURE sp1( )
|
||||||
BEGIN
|
BEGIN
|
||||||
declare optionally condition for sqlstate '02000';
|
declare optionally condition for sqlstate '02000';
|
||||||
@ -12957,7 +12950,7 @@ CREATE PROCEDURE sp1( )
|
|||||||
BEGIN
|
BEGIN
|
||||||
declare option handler for sqlstate '02000' set @var2 = 1;
|
declare option handler for sqlstate '02000' set @var2 = 1;
|
||||||
END//
|
END//
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'option handler for sqlstate '02000' set @var2 = 1;
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'handler for sqlstate '02000' set @var2 = 1;
|
||||||
END' at line 3
|
END' at line 3
|
||||||
DROP PROCEDURE IF EXISTS sp1;
|
DROP PROCEDURE IF EXISTS sp1;
|
||||||
Warnings:
|
Warnings:
|
||||||
|
@ -1507,9 +1507,9 @@ CREATE PROCEDURE on()
|
|||||||
CREATE PROCEDURE optimize()
|
CREATE PROCEDURE optimize()
|
||||||
SELECT * from t1 where f2=f1;
|
SELECT * from t1 where f2=f1;
|
||||||
|
|
||||||
--error ER_PARSE_ERROR
|
|
||||||
CREATE PROCEDURE option()
|
CREATE PROCEDURE option()
|
||||||
SELECT * from t1 where f2=f1;
|
SELECT * from t1 where f2=f1;
|
||||||
|
DROP PROCEDURE option;
|
||||||
|
|
||||||
--error ER_PARSE_ERROR
|
--error ER_PARSE_ERROR
|
||||||
CREATE PROCEDURE optionally()
|
CREATE PROCEDURE optionally()
|
||||||
@ -10171,7 +10171,6 @@ DROP PROCEDURE IF EXISTS sp1;
|
|||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
delimiter //;
|
delimiter //;
|
||||||
--error ER_PARSE_ERROR
|
|
||||||
CREATE PROCEDURE sp1()
|
CREATE PROCEDURE sp1()
|
||||||
BEGIN
|
BEGIN
|
||||||
declare option char;
|
declare option char;
|
||||||
@ -12755,7 +12754,6 @@ delimiter ;//
|
|||||||
DROP PROCEDURE IF EXISTS sp1;
|
DROP PROCEDURE IF EXISTS sp1;
|
||||||
|
|
||||||
delimiter //;
|
delimiter //;
|
||||||
--error ER_PARSE_ERROR
|
|
||||||
CREATE PROCEDURE sp1( )
|
CREATE PROCEDURE sp1( )
|
||||||
BEGIN
|
BEGIN
|
||||||
declare option condition for sqlstate '02000';
|
declare option condition for sqlstate '02000';
|
||||||
|
@ -162,3 +162,14 @@ call p2();
|
|||||||
DROP PROCEDURE p1;
|
DROP PROCEDURE p1;
|
||||||
DROP PROCEDURE p2;
|
DROP PROCEDURE p2;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# OPTION is not anymore a keyword
|
||||||
|
#
|
||||||
|
|
||||||
|
create table option (option int not null);
|
||||||
|
drop table option;
|
||||||
|
--error 1064
|
||||||
|
set option=1;
|
||||||
|
--error 1193
|
||||||
|
set option option=1;
|
||||||
|
@ -788,10 +788,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
|||||||
|
|
||||||
%pure_parser /* We have threads */
|
%pure_parser /* We have threads */
|
||||||
/*
|
/*
|
||||||
Currently there are 174 shift/reduce conflicts.
|
Currently there are 175 shift/reduce conflicts.
|
||||||
We should not introduce new conflicts any more.
|
We should not introduce new conflicts any more.
|
||||||
*/
|
*/
|
||||||
%expect 174
|
%expect 175
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Comments for TOKENS.
|
Comments for TOKENS.
|
||||||
@ -12960,6 +12960,7 @@ keyword:
|
|||||||
| LANGUAGE_SYM {}
|
| LANGUAGE_SYM {}
|
||||||
| NO_SYM {}
|
| NO_SYM {}
|
||||||
| OPEN_SYM {}
|
| OPEN_SYM {}
|
||||||
|
| OPTION {}
|
||||||
| OPTIONS_SYM {}
|
| OPTIONS_SYM {}
|
||||||
| OWNER_SYM {}
|
| OWNER_SYM {}
|
||||||
| PARSER_SYM {}
|
| PARSER_SYM {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user