370
Item *buildIdent(LEX *lex,
371
const lex_string_t &schema_name,
372
const lex_string_t &table_name,
373
const lex_string_t &field_name)
370
Item *buildIdent(LEX *lex, const lex_string_t &schema_name, const lex_string_t &table_name, const lex_string_t &field_name)
375
372
Select_Lex *sel= lex->current_select;
377
374
if (table_name.length and sel->no_table_names_allowed)
379
my_error(ER_TABLENAME_NOT_ALLOWED_HERE,
380
MYF(0), table_name.str, lex->session->where());
376
my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), table_name.str, lex->session->where());
383
Item *item= (sel->parsing_place != IN_HAVING or
384
sel->get_in_sum_expr() > 0) ?
385
(Item*) new Item_field(lex->current_context(), schema_name.str, table_name.str, field_name.str) :
386
(Item*) new Item_ref(lex->current_context(), schema_name.str, table_name.str, field_name.str);
379
return sel->parsing_place != IN_HAVING || sel->get_in_sum_expr() > 0
380
? (Item*) new Item_field(lex->current_context(), schema_name.str, table_name.str, field_name.str)
381
: (Item*) new Item_ref(lex->current_context(), schema_name.str, table_name.str, field_name.str);
391
384
Item *buildTableWild(LEX *lex, const lex_string_t &schema_name, const lex_string_t &table_name)