5079
5079
simple_ident_q:
5080
5080
ident '.' ident
5083
Select_Lex *sel= Lex->current_select;
5084
if (sel->no_table_names_allowed)
5086
my_error(ER_TABLENAME_NOT_ALLOWED_HERE,
5087
MYF(0), $1.str, YYSession->where);
5089
$$= (sel->parsing_place != IN_HAVING ||
5090
sel->get_in_sum_expr() > 0) ?
5091
(Item*) new Item_field(Lex->current_context(),
5092
(const char *)NULL, $1.str, $3.str) :
5093
(Item*) new Item_ref(Lex->current_context(),
5094
(const char *)NULL, $1.str, $3.str);
5082
$$= parser::buildIdent(YYSession, NULL_LEX_STRING, $1, $3);
5097
5084
| '.' ident '.' ident
5099
Select_Lex *sel= Lex->current_select;
5100
if (sel->no_table_names_allowed)
5102
my_error(ER_TABLENAME_NOT_ALLOWED_HERE,
5103
MYF(0), $2.str, YYSession->where);
5105
$$= (sel->parsing_place != IN_HAVING ||
5106
sel->get_in_sum_expr() > 0) ?
5107
(Item*) new Item_field(Lex->current_context(), NULL, $2.str, $4.str) :
5108
(Item*) new Item_ref(Lex->current_context(),
5109
(const char *)NULL, $2.str, $4.str);
5086
$$= parser::buildIdent(YYSession, NULL_LEX_STRING, $2, $4);
5111
5088
| ident '.' ident '.' ident
5113
Select_Lex *sel= Lex->current_select;
5114
if (sel->no_table_names_allowed)
5116
my_error(ER_TABLENAME_NOT_ALLOWED_HERE,
5117
MYF(0), $3.str, YYSession->where);
5119
$$= (sel->parsing_place != IN_HAVING ||
5120
sel->get_in_sum_expr() > 0) ?
5121
(Item*) new Item_field(Lex->current_context(), $1.str, $3.str, $5.str) :
5122
(Item*) new Item_ref(Lex->current_context(), $1.str, $3.str, $5.str);
5090
$$= parser::buildIdent(YYSession, $1, $3, $5);