mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Added item.real_type() for easy access to the underlaying types for Item_ref and Item_cache_wrapper()
This allows us to simplify and speed up some tests and also remove get_cached_item() sql/item.h: Added item.real_type() Removed get_cached_item() sql/opt_range.cc: Simplify test sql/sql_select.cc: Simplify test sql/sql_show.cc: Simplify test
This commit is contained in:
@ -12055,9 +12055,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
||||
{
|
||||
if (item->used_tables() & OUTER_REF_TABLE_BIT)
|
||||
item->update_used_tables();
|
||||
if (type == Item::SUBSELECT_ITEM ||
|
||||
(item->get_cached_item() &&
|
||||
item->get_cached_item()->type() == Item::SUBSELECT_ITEM ) ||
|
||||
if ((item->real_type() == Item::SUBSELECT_ITEM) ||
|
||||
(item->used_tables() & ~OUTER_REF_TABLE_BIT))
|
||||
{
|
||||
/*
|
||||
@ -17989,9 +17987,7 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
|
||||
}
|
||||
}
|
||||
else if ((real_pos->type() == Item::FUNC_ITEM ||
|
||||
real_pos->type() == Item::SUBSELECT_ITEM ||
|
||||
(real_pos->get_cached_item() &&
|
||||
real_pos->get_cached_item()->type() == Item::SUBSELECT_ITEM) ||
|
||||
real_pos->real_type() == Item::SUBSELECT_ITEM ||
|
||||
real_pos->type() == Item::CACHE_ITEM ||
|
||||
real_pos->type() == Item::COND_ITEM) &&
|
||||
!real_pos->with_sum_func)
|
||||
|
Reference in New Issue
Block a user