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.yy26
1 files changed, 16 insertions, 10 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index ebe05ec565f..38d251c3aef 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -704,6 +704,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
union_clause union_list union_option
precision subselect_start opt_and charset
subselect_end select_var_list select_var_list_init help opt_len
+ opt_extended_describe
END_OF_INPUT
%type <NONE>
@@ -2263,7 +2264,7 @@ expr_expr:
| expr comp_op all_or_any in_subselect %prec EQ
{
Item_allany_subselect *it=
- new Item_allany_subselect($1, (*$2)($3), $4);
+ new Item_allany_subselect($1, (*$2)($3), $4, $3);
if ($3)
$$ = it->upper_not= new Item_func_not_all(it); /* ALL */
else
@@ -2309,7 +2310,7 @@ no_in_expr:
| no_in_expr comp_op all_or_any in_subselect %prec EQ
{
Item_allany_subselect *it=
- new Item_allany_subselect($1, (*$2)($3), $4);
+ new Item_allany_subselect($1, (*$2)($3), $4, $3);
if ($3)
$$ = it->upper_not= new Item_func_not_all(it); /* ALL */
else
@@ -2364,7 +2365,7 @@ no_and_expr:
| no_and_expr comp_op all_or_any in_subselect %prec EQ
{
Item_allany_subselect *it=
- new Item_allany_subselect($1, (*$2)($3), $4);
+ new Item_allany_subselect($1, (*$2)($3), $4, $3);
if ($3)
$$ = it->upper_not= new Item_func_not_all(it); /* ALL */
else
@@ -4025,7 +4026,9 @@ describe:
YYABORT;
}
opt_describe_column {}
- | describe_command { Lex->describe=1; } select
+ | describe_command opt_extended_describe
+ { Lex->describe|= DESCRIBE_NORMAL; }
+ select
{
LEX *lex=Lex;
lex->select_lex.options|= SELECT_DESCRIBE;
@@ -4036,6 +4039,11 @@ describe_command:
DESC
| DESCRIBE;
+opt_extended_describe:
+ /* empty */ {}
+ | EXTENDED_SYM { Lex->describe|= DESCRIBE_EXTENDED; }
+ ;
+
opt_describe_column:
/* empty */ {}
| text_string { Lex->wild= $1; }
@@ -4291,11 +4299,9 @@ literal:
{
Item *tmp= new Item_varbinary($2.str,$2.length);
String *str= tmp ? tmp->val_str((String*) 0) : (String*) 0;
- Item_string *item = new Item_string(str ? str->ptr() : "",
- str ? str->length() :
- 0, Lex->charset);
- item->set_varbin_name(tmp->name);
- $$= item;
+ $$= new Item_string(str ? str->ptr() : "",
+ str ? str->length() : 0,
+ Lex->charset);
}
| DATE_SYM text_literal { $$ = $2; }
| TIME_SYM text_literal { $$ = $2; }
@@ -5349,7 +5355,7 @@ order_or_limit:
union_option:
/* empty */ {}
- | ALL {Select->master_unit()->union_option= 1;};
+ | ALL {Select->master_unit()->union_option|= UNION_ALL;};
singlerow_subselect:
subselect_start singlerow_subselect_init