summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-08-13 10:01:30 +0300
committerunknown <bell@sanja.is.com.ua>2004-08-13 10:01:30 +0300
commit5535bce52422f913633cc40b1658b590544a5e9b (patch)
treedb76b055297225d3f6d0277c1daef6075c222761 /sql/sql_yacc.yy
parent49c1ab7626ec4afbca2aaae4b2821b8275457815 (diff)
downloadmariadb-git-5535bce52422f913633cc40b1658b590544a5e9b.tar.gz
skip resolving field in table list if table list is not accessable due to groupping (BUG#4814)
mysql-test/r/func_gconcat.result: fix of test queries mysql-test/r/subselect.result: resolving fields of grouped outer SELECT mysql-test/t/func_gconcat.test: fix of test queries mysql-test/t/subselect.test: resolving fields of grouped outer SELECT sql/item.cc: skip resolving field in table list if table list is not accessable due to groupping layout fixed sql/item_subselect.cc: detection of place of subquery sql/item_subselect.h: detection of place of subquery sql/mysql_priv.h: enum_parsing_place made global type sql/sql_lex.cc: enum_parsing_place made global type sql/sql_lex.h: enum_parsing_place made global type sql/sql_yacc.yy: enum_parsing_place made global type
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy24
1 files changed, 12 insertions, 12 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 8e3fb0884a9..de560041ba7 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1113,11 +1113,11 @@ create_select:
lex->sql_command= SQLCOM_REPLACE_SELECT;
lex->current_select->table_list.save_and_clear(&lex->save_list);
mysql_init_select(lex);
- lex->current_select->parsing_place= SELECT_LEX_NODE::SELECT_LIST;
+ lex->current_select->parsing_place= SELECT_LIST;
}
select_options select_item_list
{
- Select->parsing_place= SELECT_LEX_NODE::NO_MATTER;
+ Select->parsing_place= NO_MATTER;
}
opt_select_from
{ Lex->current_select->table_list.push_front(&Lex->save_list); }
@@ -2370,11 +2370,11 @@ select_part2:
lex->lock_option= TL_READ;
if (sel->linkage != UNION_TYPE)
mysql_init_select(lex);
- lex->current_select->parsing_place= SELECT_LEX_NODE::SELECT_LIST;
+ lex->current_select->parsing_place= SELECT_LIST;
}
select_options select_item_list
{
- Select->parsing_place= SELECT_LEX_NODE::NO_MATTER;
+ Select->parsing_place= NO_MATTER;
}
select_into select_lock_type;
@@ -3438,11 +3438,11 @@ select_derived:
YYABORT;
mysql_init_select(lex);
lex->current_select->linkage= DERIVED_TABLE_TYPE;
- lex->current_select->parsing_place= SELECT_LEX_NODE::SELECT_LIST;
+ lex->current_select->parsing_place= SELECT_LIST;
}
select_options select_item_list
{
- Select->parsing_place= SELECT_LEX_NODE::NO_MATTER;
+ Select->parsing_place= NO_MATTER;
}
opt_select_from union_opt
;
@@ -3572,13 +3572,13 @@ having_clause:
/* empty */
| HAVING
{
- Select->parsing_place= SELECT_LEX_NODE::IN_HAVING;
+ Select->parsing_place= IN_HAVING;
}
expr
{
SELECT_LEX *sel= Select;
sel->having= $3;
- sel->parsing_place= SELECT_LEX_NODE::NO_MATTER;
+ sel->parsing_place= NO_MATTER;
if ($3)
$3->top_level_item();
}
@@ -4813,7 +4813,7 @@ simple_ident:
ident
{
SELECT_LEX *sel=Select;
- $$= (sel->parsing_place != SELECT_LEX_NODE::IN_HAVING ||
+ $$= (sel->parsing_place != IN_HAVING ||
sel->get_in_sum_expr() > 0) ?
(Item*) new Item_field(NullS,NullS,$1.str) :
(Item*) new Item_ref(0,0, NullS,NullS,$1.str);
@@ -4829,7 +4829,7 @@ simple_ident:
ER(ER_TABLENAME_NOT_ALLOWED_HERE),
MYF(0), $1.str, thd->where);
}
- $$= (sel->parsing_place != SELECT_LEX_NODE::IN_HAVING ||
+ $$= (sel->parsing_place != IN_HAVING ||
sel->get_in_sum_expr() > 0) ?
(Item*) new Item_field(NullS,$1.str,$3.str) :
(Item*) new Item_ref(0,0,NullS,$1.str,$3.str);
@@ -4845,7 +4845,7 @@ simple_ident:
ER(ER_TABLENAME_NOT_ALLOWED_HERE),
MYF(0), $2.str, thd->where);
}
- $$= (sel->parsing_place != SELECT_LEX_NODE::IN_HAVING ||
+ $$= (sel->parsing_place != IN_HAVING ||
sel->get_in_sum_expr() > 0) ?
(Item*) new Item_field(NullS,$2.str,$4.str) :
(Item*) new Item_ref(0,0,NullS,$2.str,$4.str);
@@ -4861,7 +4861,7 @@ simple_ident:
ER(ER_TABLENAME_NOT_ALLOWED_HERE),
MYF(0), $3.str, thd->where);
}
- $$= (sel->parsing_place != SELECT_LEX_NODE::IN_HAVING ||
+ $$= (sel->parsing_place != IN_HAVING ||
sel->get_in_sum_expr() > 0) ?
(Item*) new Item_field((YYTHD->client_capabilities &
CLIENT_NO_SCHEMA ? NullS : $1.str),