-
Gleb Shchepa authored
Part I. Grammar preparation. * Replace the existent type tag <symbol> with <keyword> for a better readability. * Add the new type tag <keyword> to currently untyped terminal and non-terminal symbols. Part II. Create a simple compile-time program for transforming sql_yacc.yy into a .h file that contains an array of reserved and non-reserved words. * Find %token declarations with the <keyword> type tag by a regexp. * Separate %type declarations are ignored for the simplicity. Part III. Introduce a new system view: INFORMATION_SCHEMA.keywords. * Hardcode the statical list of keywords and reserved words into a view on top of a long JSON_TABLE(...) expression. * Use a trick in the .test file to trace changes in keywords: notify the developer to update the target I_S version in the mysqld binary where necessary -- this will force DD to refresh I_S view declarations on the next run. Change-Id: Ib40e7f743f4deb069df0a0bbc00c39e4460f7c33
Gleb Shchepa authoredPart I. Grammar preparation. * Replace the existent type tag <symbol> with <keyword> for a better readability. * Add the new type tag <keyword> to currently untyped terminal and non-terminal symbols. Part II. Create a simple compile-time program for transforming sql_yacc.yy into a .h file that contains an array of reserved and non-reserved words. * Find %token declarations with the <keyword> type tag by a regexp. * Separate %type declarations are ignored for the simplicity. Part III. Introduce a new system view: INFORMATION_SCHEMA.keywords. * Hardcode the statical list of keywords and reserved words into a view on top of a long JSON_TABLE(...) expression. * Use a trick in the .test file to trace changes in keywords: notify the developer to update the target I_S version in the mysqld binary where necessary -- this will force DD to refresh I_S view declarations on the next run. Change-Id: Ib40e7f743f4deb069df0a0bbc00c39e4460f7c33
Loading