diff options
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 4a50a602121..54a6a6dc462 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -500,6 +500,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token BIT_SYM %token BIT_XOR %token BLOB_SYM +%token BLOCK_SYM %token BOOLEAN_SYM %token BOOL_SYM %token BOTH @@ -540,10 +541,12 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token CONSISTENT_SYM %token CONSTRAINT %token CONTAINS_SYM +%token CONTEXT_SYM %token CONTINUE_SYM %token CONVERT_SYM %token CONVERT_TZ_SYM %token COUNT_SYM +%token CPU_SYM %token CREATE %token CROSS %token CUBE_SYM @@ -617,6 +620,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token EXTRACT_SYM %token FALSE_SYM %token FAST_SYM +%token FAULTS_SYM %token FETCH_SYM %token FIELD_FUNC %token FILE_SYM @@ -686,6 +690,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token INT_SYM %token INVOKER_SYM %token IN_SYM +%token IO_SYM +%token IPC_SYM %token IS %token ISOLATION %token ISSUER_SYM @@ -754,6 +760,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token MEDIUMINT %token MEDIUMTEXT %token MEDIUM_SYM +%token MEMORY_SYM %token MERGE_SYM %token MICROSECOND_SYM %token MIGRATE_SYM @@ -812,6 +819,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token OUTFILE %token OUT_SYM %token PACK_KEYS_SYM +%token PAGE_SYM %token PARTIAL %token PASSWORD %token PARAM_MARKER @@ -829,6 +837,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token PROCEDURE %token PROCESS %token PROCESSLIST_SYM +%token PROFILE_SYM +%token PROFILES_SYM %token PURGE %token QUARTER_SYM %token QUERY_SYM @@ -899,6 +909,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token SMALLINT %token SNAPSHOT_SYM %token SOUNDS_SYM +%token SOURCE_SYM %token SPATIAL_SYM %token SPECIFIC_SYM %token SQLEXCEPTION_SYM @@ -929,6 +940,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token SUM_SYM %token SUPER_SYM %token SUSPEND_SYM +%token SWAPS_SYM +%token SWITCHES_SYM %token SYSDATE %token TABLES %token TABLESPACE @@ -6835,6 +6848,64 @@ opt_table_sym: /* empty */ | TABLE_SYM; +opt_profile_defs: + /* empty */ + | profile_defs + +profile_defs: + profile_def + | profile_defs ',' profile_def + +profile_def: + CPU_SYM + { + Lex->profile_options|= PROFILE_CPU; + } + | MEMORY_SYM + { + Lex->profile_options|= PROFILE_MEMORY; + } + | BLOCK_SYM IO_SYM + { + Lex->profile_options|= PROFILE_BLOCK_IO; + } + | CONTEXT_SYM SWITCHES_SYM + { + Lex->profile_options|= PROFILE_CONTEXT; + } + | PAGE_SYM FAULTS_SYM + { + Lex->profile_options|= PROFILE_PAGE_FAULTS; + } + | IPC_SYM + { + Lex->profile_options|= PROFILE_IPC; + } + | SWAPS_SYM + { + Lex->profile_options|= PROFILE_SWAPS; + } + | SOURCE_SYM + { + Lex->profile_options|= PROFILE_SOURCE; + } + | ALL + { + Lex->profile_options|= PROFILE_ALL; + } + ; + +opt_profile_args: + /* empty */ + { + Lex->profile_query_id= 0; + } + | FOR_SYM QUERY_SYM NUM + { + Lex->profile_query_id= atoi($3.str); + } + ; + /* Show things */ show: SHOW @@ -6970,6 +7041,10 @@ show_param: { Lex->sql_command = SQLCOM_SHOW_WARNS;} | ERRORS opt_limit_clause_init { Lex->sql_command = SQLCOM_SHOW_ERRORS;} + | PROFILES_SYM + { Lex->sql_command = SQLCOM_SHOW_PROFILES; } + | PROFILE_SYM opt_profile_defs opt_profile_args opt_limit_clause_init + { Lex->sql_command = SQLCOM_SHOW_PROFILE; } | opt_var_type STATUS_SYM wild_and_where { LEX *lex= Lex; @@ -8063,6 +8138,7 @@ keyword_sp: | BERKELEY_DB_SYM {} | BINLOG_SYM {} | BIT_SYM {} + | BLOCK_SYM {} | BOOL_SYM {} | BOOLEAN_SYM {} | BTREE_SYM {} @@ -8080,6 +8156,8 @@ keyword_sp: | CONCURRENT {} | CONNECTION_SYM {} | CONSISTENT_SYM {} + | CONTEXT_SYM {} + | CPU_SYM {} | CUBE_SYM {} | DATA_SYM {} | DATETIME {} @@ -8102,6 +8180,7 @@ keyword_sp: | EXPANSION_SYM {} | EXTENDED_SYM {} | FAST_SYM {} + | FAULTS_SYM {} | FOUND_SYM {} | DISABLE_SYM {} | ENABLE_SYM {} @@ -8126,6 +8205,8 @@ keyword_sp: | ISSUER_SYM {} | INNOBASE_SYM {} | INSERT_METHOD {} + | IO_SYM {} + | IPC_SYM {} | RELAY_THREAD {} | LAST_SYM {} | LEAVES {} @@ -8155,6 +8236,7 @@ keyword_sp: | MAX_UPDATES_PER_HOUR {} | MAX_USER_CONNECTIONS_SYM {} | MEDIUM_SYM {} + | MEMORY_SYM {} | MERGE_SYM {} | MICROSECOND_SYM {} | MIGRATE_SYM {} @@ -8181,6 +8263,7 @@ keyword_sp: | ONE_SHOT_SYM {} | ONE_SYM {} | PACK_KEYS_SYM {} + | PAGE_SYM {} | PARTIAL {} | PASSWORD {} | PHASE_SYM {} @@ -8190,6 +8273,8 @@ keyword_sp: | PRIVILEGES {} | PROCESS {} | PROCESSLIST_SYM {} + | PROFILE_SYM {} + | PROFILES_SYM {} | QUARTER_SYM {} | QUERY_SYM {} | QUICK {} @@ -8223,6 +8308,7 @@ keyword_sp: | SHUTDOWN {} | SNAPSHOT_SYM {} | SOUNDS_SYM {} + | SOURCE_SYM {} | SQL_CACHE_SYM {} | SQL_BUFFER_RESULT {} | SQL_NO_CACHE_SYM {} @@ -8234,6 +8320,8 @@ keyword_sp: | SUBJECT_SYM {} | SUPER_SYM {} | SUSPEND_SYM {} + | SWAPS_SYM {} + | SWITCHES_SYM {} | TABLES {} | TABLESPACE {} | TEMPORARY {} |