summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy23
1 files changed, 20 insertions, 3 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 8def8a43249..e6b0aeb6430 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -470,6 +470,7 @@ Item* handle_sql2003_note184_exception(THD *thd, Item* left, bool equal,
enum enum_tx_isolation tx_isolation;
enum Cast_target cast_type;
enum Item_udftype udf_type;
+ enum ha_choice choice;
CHARSET_INFO *charset;
thr_lock_type lock_type;
interval_type interval, interval_time_st;
@@ -858,6 +859,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token OWNER_SYM
%token PACK_KEYS_SYM
%token PAGE_SYM
+%token PAGE_CHECKSUM_SYM
%token PARAM_MARKER
%token PARSER_SYM
%token PARTIAL /* SQL-2003-N */
@@ -993,6 +995,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token TABLESPACE
%token TABLE_REF_PRIORITY
%token TABLE_SYM /* SQL-2003-R */
+%token TABLE_CHECKSUM_SYM
%token TEMPORARY /* SQL-2003-N */
%token TEMPTABLE_SYM
%token TERMINATED
@@ -1126,6 +1129,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%type <ulonglong_number>
ulonglong_num real_ulonglong_num size_number
+%type <choice> choice
+
%type <p_elem_value>
part_bit_expr
@@ -4335,6 +4340,12 @@ create_table_option:
Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
}
| CHECKSUM_SYM opt_equal ulong_num { Lex->create_info.table_options|= $3 ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM; Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM; }
+ | TABLE_CHECKSUM_SYM opt_equal ulong_num { Lex->create_info.table_options|= $3 ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM; Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM; }
+ | PAGE_CHECKSUM_SYM opt_equal choice
+ {
+ Lex->create_info.used_fields|= HA_CREATE_USED_PAGE_CHECKSUM;
+ Lex->create_info.page_checksum= $3;
+ }
| DELAY_KEY_WRITE_SYM opt_equal ulong_num { Lex->create_info.table_options|= $3 ? HA_OPTION_DELAY_KEY_WRITE : HA_OPTION_NO_DELAY_KEY_WRITE; Lex->create_info.used_fields|= HA_CREATE_USED_DELAY_KEY_WRITE; }
| ROW_FORMAT_SYM opt_equal row_types { Lex->create_info.row_type= $3; Lex->create_info.used_fields|= HA_CREATE_USED_ROW_FORMAT; }
| UNION_SYM opt_equal '(' table_list ')'
@@ -4366,11 +4377,10 @@ create_table_option:
Lex->create_info.used_fields|= HA_CREATE_USED_KEY_BLOCK_SIZE;
Lex->create_info.key_block_size= $3;
}
- | TRANSACTIONAL_SYM opt_equal ulong_num
+ | TRANSACTIONAL_SYM opt_equal choice
{
Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL;
- Lex->create_info.transactional= ($3 != 0 ? HA_CHOICE_YES :
- HA_CHOICE_NO);
+ Lex->create_info.transactional= $3;
}
;
@@ -8000,6 +8010,11 @@ dec_num:
| FLOAT_NUM
;
+choice:
+ ulong_num { $$= $1 != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; }
+ | DEFAULT { $$= HA_CHOICE_UNDEF; }
+ ;
+
procedure_clause:
/* empty */
| PROCEDURE ident /* Procedure name */
@@ -10046,6 +10061,7 @@ keyword_sp:
| ONE_SYM {}
| PACK_KEYS_SYM {}
| PAGE_SYM {}
+ | PAGE_CHECKSUM_SYM {}
| PARTIAL {}
| PARTITIONING_SYM {}
| PARTITIONS_SYM {}
@@ -10108,6 +10124,7 @@ keyword_sp:
| SUBPARTITIONS_SYM {}
| SUPER_SYM {}
| SUSPEND_SYM {}
+ | TABLE_CHECKSUM_SYM {}
| TABLES {}
| TABLESPACE {}
| TEMPORARY {}