Commit 0540e508 authored by Varun Gupta's avatar Varun Gupta Committed by Sergei Petrunia

MDEV-25075: Ignorable index makes the resulting CREATE TABLE invalid

- The patch itself
- More changes to the parser
- Fix by Sergei P to make the tests pass with --embedded
parent a4d3e046
This diff is collapsed.
This diff is collapsed.
......@@ -8,5 +8,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
####################################
SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long;
event_name digest digest_text sql_text
statement/sql/select beb5bd93b7e8c45bc5cb6060804988e8 SELECT ? + ? + SELECT ...
statement/sql/truncate faf6cefb662b443f05e97b5c5ab14a59 TRUNCATE TABLE truncat...
statement/sql/select ade774bdfbc132a71810ede8ef469660 SELECT ? + ? + SELECT ...
statement/sql/truncate 0f84807fb4a75d0f391f8a93e7c3c182 TRUNCATE TABLE truncat...
......@@ -289,6 +289,7 @@ static SYMBOL symbols[] = {
{ "IDENTIFIED", SYM(IDENTIFIED_SYM)},
{ "IF", SYM(IF_SYM)},
{ "IGNORE", SYM(IGNORE_SYM)},
{ "IGNORED", SYM(IGNORED_SYM)},
{ "IGNORE_DOMAIN_IDS", SYM(IGNORE_DOMAIN_IDS_SYM)},
{ "IGNORE_SERVER_IDS", SYM(IGNORE_SERVER_IDS_SYM)},
{ "IMMEDIATE", SYM(IMMEDIATE_SYM)},
......
......@@ -532,6 +532,7 @@ End SQL_MODE_ORACLE_SPECIFIC */
%token <kwd> IF_SYM
%token <kwd> IGNORE_DOMAIN_IDS_SYM
%token <kwd> IGNORE_SYM
%token <kwd> IGNORED_SYM
%token <kwd> INDEX_SYM
%token <kwd> INFILE
%token <kwd> INNER_SYM /* SQL-2003-R */
......@@ -7095,8 +7096,8 @@ btree_or_rtree:
;
ignorability:
IGNORE_SYM { $$= true; }
| NOT_SYM IGNORE_SYM { $$= false; }
IGNORED_SYM { $$= true; }
| NOT_SYM IGNORED_SYM { $$= false; }
;
key_list:
......@@ -15315,6 +15316,7 @@ keyword_table_alias:
| keyword_verb_clause
| FUNCTION_SYM
| EXCEPTION_ORACLE_SYM
| IGNORED_SYM
;
/* Keyword that we allow for identifiers (except SP labels) */
......@@ -15331,6 +15333,7 @@ keyword_ident:
| FUNCTION_SYM
| WINDOW_SYM
| EXCEPTION_ORACLE_SYM
| IGNORED_SYM
;
keyword_sysvar_name:
......@@ -15345,6 +15348,7 @@ keyword_sysvar_name:
| FUNCTION_SYM
| WINDOW_SYM
| EXCEPTION_ORACLE_SYM
| IGNORED_SYM
;
keyword_set_usual_case:
......@@ -15359,6 +15363,7 @@ keyword_set_usual_case:
| FUNCTION_SYM
| WINDOW_SYM
| EXCEPTION_ORACLE_SYM
| IGNORED_SYM
;
non_reserved_keyword_udt:
......@@ -15975,6 +15980,7 @@ reserved_keyword_udt_not_param_type:
| IF_SYM
| IGNORE_DOMAIN_IDS_SYM
| IGNORE_SYM
| IGNORED_SYM
| INDEX_SYM
| INFILE
| INNER_SYM
......@@ -17870,6 +17876,7 @@ keyword_label:
| keyword_sysvar_type
| FUNCTION_SYM
| EXCEPTION_ORACLE_SYM
| IGNORED_SYM
;
keyword_sp_decl:
......@@ -17884,6 +17891,7 @@ keyword_sp_decl:
| keyword_verb_clause
| FUNCTION_SYM
| WINDOW_SYM
| IGNORED_SYM
;
opt_truncate_table_storage_clause:
......@@ -18283,6 +18291,7 @@ keyword_label:
| FUNCTION_SYM
| COMPRESSED_SYM
| EXCEPTION_ORACLE_SYM
| IGNORED_SYM
;
keyword_sp_decl:
......@@ -18293,6 +18302,7 @@ keyword_sp_decl:
| keyword_sysvar_type
| keyword_verb_clause
| WINDOW_SYM
| IGNORED_SYM
;
opt_truncate_table_storage_clause:
......
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