Commit de5d2550 authored by Michael Widenius's avatar Michael Widenius

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
parent b0f5c4db
......@@ -269,3 +269,9 @@ call p2();
DROP PROCEDURE p1;
DROP PROCEDURE p2;
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'
......@@ -1507,9 +1507,9 @@ CREATE PROCEDURE on()
CREATE PROCEDURE optimize()
SELECT * from t1 where f2=f1;
--error ER_PARSE_ERROR
CREATE PROCEDURE option()
SELECT * from t1 where f2=f1;
DROP PROCEDURE option;
--error ER_PARSE_ERROR
CREATE PROCEDURE optionally()
......@@ -10171,7 +10171,6 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
BEGIN
declare option char;
......@@ -12755,7 +12754,6 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
declare option condition for sqlstate '02000';
......
......@@ -162,3 +162,14 @@ call p2();
DROP PROCEDURE p1;
DROP PROCEDURE p2;
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 */
/*
Currently there are 174 shift/reduce conflicts.
Currently there are 175 shift/reduce conflicts.
We should not introduce new conflicts any more.
*/
%expect 174
%expect 175
/*
Comments for TOKENS.
......@@ -12960,6 +12960,7 @@ keyword:
| LANGUAGE_SYM {}
| NO_SYM {}
| OPEN_SYM {}
| OPTION {}
| OPTIONS_SYM {}
| OWNER_SYM {}
| PARSER_SYM {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment