mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +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:
@ -3003,10 +3003,7 @@ bool uses_only_table_name_fields(Item *item, TABLE_LIST *table)
|
||||
else if (item->type() == Item::REF_ITEM)
|
||||
return uses_only_table_name_fields(item->real_item(), table);
|
||||
|
||||
if ((item->type() == Item::SUBSELECT_ITEM ||
|
||||
(item->get_cached_item() &&
|
||||
item->get_cached_item()->type() == Item::SUBSELECT_ITEM))
|
||||
&& !item->const_item())
|
||||
if (item->real_type() == Item::SUBSELECT_ITEM && !item->const_item())
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user