892
895
text_string opt_gconcat_separator
895
type int_type real_type order_dir
898
type int_type real_type order_dir field_def
896
899
if_exists opt_local opt_table_options table_options
897
900
table_option opt_if_not_exists
898
901
opt_temporary all_or_any opt_distinct
1032
1035
opt_field_or_var_spec fields_or_vars opt_load_data_set_spec
1033
1036
binlog_base64_event
1034
1037
init_key_options key_options key_opts key_opt key_using_alg
1038
parse_vcol_expr vcol_opt_attribute vcol_opt_attribute_list
1037
1042
%type <index_hint> index_hint_type
1708
1714
lex->comment=null_lex_str;
1709
1715
lex->charset=NULL;
1710
1716
lex->column_format= COLUMN_FORMAT_TYPE_DEFAULT;
1717
lex->vcol_info= NULL;
1715
1722
if (add_field_to_list(lex->thd, &$1, (enum enum_field_types) $3,
1717
1724
lex->column_format,
1718
1725
lex->default_value, lex->on_update_value,
1720
lex->change,&lex->interval_list,lex->charset))
1727
lex->change,&lex->interval_list,lex->charset,
1733
type opt_attribute {}
1734
| VIRTUAL_SYM type AS '(' virtual_column_func ')' vcol_opt_attribute
1736
$$=DRIZZLE_TYPE_VIRTUAL;
1737
Lex->vcol_info->set_field_type((enum enum_field_types) $2);
1743
| vcol_opt_attribute_list {}
1746
vcol_opt_attribute_list:
1747
vcol_opt_attribute_list vcol_attribute {}
1755
lex->type|= UNIQUE_FLAG;
1756
lex->alter_info.flags|= ALTER_ADD_INDEX;
1758
| UNIQUE_SYM KEY_SYM
1761
lex->type|= UNIQUE_KEY_FLAG;
1762
lex->alter_info.flags|= ALTER_ADD_INDEX;
1764
| COMMENT_SYM TEXT_STRING_sys { Lex->comment= $2; }
1767
Lex->vcol_info->set_field_stored(true);
1772
PARSE_VCOL_EXPR_SYM '(' virtual_column_func ')'
1775
"PARSE_VCOL_EXPR" can only be used by the SQL server
1776
when reading a '*.frm' file.
1777
Prevent the end user from invoking this command.
1779
if (not Lex->parse_vcol_expr)
1781
my_message(ER_SYNTAX_ERROR, ER(ER_SYNTAX_ERROR), MYF(0));
1787
virtual_column_func:
1788
remember_name expr remember_end
1790
Lex->vcol_info= new virtual_column_info();
1791
if (not Lex->vcol_info)
1793
my_error(ER_OUTOFMEMORY, MYF(0), sizeof(virtual_column_info));
1796
uint expr_len= (uint)($3 - $1) - 1;
1797
Lex->vcol_info->expr_str.str= (char* ) sql_memdup($1 + 1, expr_len);
1798
Lex->vcol_info->expr_str.length= expr_len;
1799
Lex->vcol_info->expr_item= $2;
2333
2412
lex->column_format,
2334
2413
lex->default_value, lex->on_update_value,
2336
$3.str, &lex->interval_list, lex->charset))
2415
$3.str, &lex->interval_list, lex->charset,
2337
2417
DRIZZLE_YYABORT;