Created
July 27, 2016 09:25
-
-
Save yoku0825/68369433679392b2284e4eaf258b00c6 to your computer and use it in GitHub Desktop.
SHOWの代わりにSHWOとtypoしても解釈してくれるSQLパーサー
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** sql/sql_yacc.yy.orig 2016-05-25 14:50:36.000000000 +0900 | |
--- sql/sql_yacc.yy 2016-07-26 19:05:41.391000493 +0900 | |
*************** | |
*** 983,984 **** | |
--- 983,985 ---- | |
%token SHOW | |
+ %token SHWO | |
%token SHUTDOWN | |
*************** | |
*** 1311,1313 **** | |
truncate rename | |
! show describe load alter optimize keycache preload flush | |
reset purge begin commit rollback savepoint release | |
--- 1312,1314 ---- | |
truncate rename | |
! show shwo describe load alter optimize keycache preload flush | |
reset purge begin commit rollback savepoint release | |
*************** | |
*** 1407,1409 **** | |
! %type<NONE> SHOW DESC DESCRIBE describe_command | |
--- 1408,1410 ---- | |
! %type<NONE> SHOW SHWO DESC DESCRIBE describe_command | |
*************** | |
*** 1692,1693 **** | |
--- 1693,1695 ---- | |
| show | |
+ | shwo | |
| shutdown_stmt { MAKE_CMD($1); } | |
*************** | |
*** 11770,11771 **** | |
--- 11772,11783 ---- | |
+ shwo: | |
+ SHWO | |
+ { | |
+ LEX *lex=Lex; | |
+ memset(&lex->create_info, 0, sizeof(lex->create_info)); | |
+ } | |
+ show_param | |
+ ; | |
+ | |
+ | |
show_param: | |
*** sql/lex.h.orig 2016-07-26 19:09:18.502000698 +0900 | |
--- sql/lex.h 2016-07-26 19:04:51.805000493 +0900 | |
*************** | |
*** 543,544 **** | |
--- 543,545 ---- | |
{ SYM("SHOW", SHOW)}, | |
+ { SYM("SHWO", SHOW)}, | |
{ SYM("SHUTDOWN", SHUTDOWN)}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment