366
Item *buildIdent(Session *session,
367
const LEX_STRING &schema_name,
368
const LEX_STRING &table_name,
369
const LEX_STRING &field_name)
371
Select_Lex *sel= session->getLex()->current_select;
373
if (sel->no_table_names_allowed)
375
my_error(ER_TABLENAME_NOT_ALLOWED_HERE,
376
MYF(0), table_name.str, session->where);
379
Item *item= (sel->parsing_place != IN_HAVING or
380
sel->get_in_sum_expr() > 0) ?
381
(Item*) new Item_field(session->getLex()->current_context(), schema_name.str, table_name.str, field_name.str) :
382
(Item*) new Item_ref(session->getLex()->current_context(), schema_name.str, table_name.str, field_name.str);
366
387
} // namespace parser
367
388
} // namespace drizzled