mirror of
https://github.com/MariaDB/server.git
synced 2026-04-30 04:05:32 +02: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:
parent
139a2b64bf
commit
2f9579151b
4 changed files with 13 additions and 15 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue