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.yy33
1 files changed, 3 insertions, 30 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 21f7ec1c48a..006d829005f 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -680,17 +680,7 @@ create3:
/* empty*/ {}
| opt_duplicate SELECT_SYM
{
- LEX *lex=Lex;
- lex->where=lex->having=0;
- lex->select_limit=current_thd->default_select_limit;
- lex->offset_limit=0L;
- lex->options=0;
- lex->exchange = 0;
- lex->order_list.elements=lex->group_list.elements=0;
- lex->order_list.first=0;
- lex->order_list.next= (byte**) &lex->order_list.first;
- lex->group_list.first=0;
- lex->group_list.next= (byte**) &lex->group_list.first;
+ mysql_init_select(Lex);
}
select_options select_item_list opt_select_from {}
@@ -1149,17 +1139,8 @@ select:
SELECT_SYM
{
LEX *lex=Lex;
- lex->where=lex->having=0;
- lex->select_limit=current_thd->default_select_limit;
- lex->offset_limit=0L;
- lex->options=0;
lex->sql_command= SQLCOM_SELECT;
- lex->exchange = 0;
- lex->order_list.elements=lex->group_list.elements=0;
- lex->order_list.first=0;
- lex->order_list.next= (byte**) &lex->order_list.first;
- lex->group_list.first=0;
- lex->group_list.next= (byte**) &lex->group_list.first;
+ mysql_init_select(lex);
}
select_options select_item_list select_into
@@ -1973,17 +1954,9 @@ insert_values:
| SELECT_SYM
{
LEX *lex=Lex;
- lex->where=lex->having=0;
- lex->select_limit=current_thd->default_select_limit;
- lex->offset_limit=0L;
- lex->options=0;
- lex->order_list.elements=lex->group_list.elements=0;
- lex->order_list.first=0;
- lex->order_list.next= (byte**) &lex->order_list.first;
- lex->group_list.first=0;
- lex->group_list.next= (byte**) &lex->group_list.first;
lex->sql_command = (lex->sql_command == SQLCOM_INSERT ?
SQLCOM_INSERT_SELECT : SQLCOM_REPLACE_SELECT);
+ mysql_init_select(lex);
}
select_options select_item_list select_from {}