Re: [Maria-developers] MDEV-25075: Ignorable index makes the resulting CREATE TABLE invalid
![](https://secure.gravatar.com/avatar/c7422c379fec4aa4d99a8a137bf10594.jpg?s=120&d=mm&r=g)
Hi Varun,
diff --git a/sql/lex.h b/sql/lex.h index 542356c0e433..5a9ec2ec1b35 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -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)},
Above this array one can see:
... NOTE!! If you add or delete symbols from this file, you must also update results for the perfschema.start_server_low_digest_sql_length test! */
static SYMBOL symbols[] = {
and indeed the buildbot shows failures, e.g. http://buildbot.askmonty.org/buildbot/builders/kvm-rpm-centos74-amd64/builds... CURRENT_TEST: perfschema.start_server_low_digest_sql_length --- /usr/share/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result 2021-03-10 06:23:20.000000000 +0000 +++ /dev/shm/var/4/log/start_server_low_digest_sql_length.reject 2021-03-10 07:37:16.351213429 +0000 @@ -8,5 +8,5 @@ #################################### 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... Please fix this. BR Sergei -- Sergei Petrunia, Software Developer MariaDB Corporation | Skype: sergefp | Blog: http://petrunia.net
![](https://secure.gravatar.com/avatar/c7422c379fec4aa4d99a8a137bf10594.jpg?s=120&d=mm&r=g)
More input:
--- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -15975,6 +15976,7 @@ reserved_keyword_udt_not_param_type: | IF_SYM | IGNORE_DOMAIN_IDS_SYM | IGNORE_SYM + | IGNORED_SYM | INDEX_SYM | INFILE | INNER_SYM
Any reason the keyword is added into reserved_keyword_udt_not_param_type list and not others? If we just add it here, use of "IGNORED" as identifier/table name/etc will need quoting, e.g. create table (a int ignored) will produce an error. I've tried adding it in other rules and it seemed to work: @@ -15315,6 +15316,7 @@ keyword_table_alias: | keyword_verb_clause | FUNCTION_SYM | EXCEPTION_ORACLE_SYM + | IGNORED_SYM /*psergey*/ ; /* Keyword that we allow for identifiers (except SP labels) */ @@ -15331,6 +15333,7 @@ keyword_ident: | FUNCTION_SYM | WINDOW_SYM | EXCEPTION_ORACLE_SYM + | IGNORED_SYM /*psergey*/ ; keyword_sysvar_name: @@ -15345,6 +15348,7 @@ keyword_sysvar_name: | FUNCTION_SYM | WINDOW_SYM | EXCEPTION_ORACLE_SYM + | IGNORED_SYM /*psergey*/ ; keyword_set_usual_case: @@ -15358,6 +15362,7 @@ keyword_set_usual_case: | keyword_verb_clause | FUNCTION_SYM | WINDOW_SYM + | IGNORED_SYM /*psergey*/ | EXCEPTION_ORACLE_SYM ; Please investigate it further, how do we introduce IGNORED in a way that has minimal impact on what syntax is accepted. BR Sergei -- Sergei Petrunia, Software Developer MariaDB Corporation | Skype: sergefp | Blog: http://petrunia.net
participants (1)
-
Sergey Petrunia