summaryrefslogtreecommitdiff
path: root/sql/item_row.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2015-04-22 12:40:23 +0400
committerAlexander Barkov <bar@mariadb.org>2015-04-22 12:40:23 +0400
commitfc1f301e91367be5de7b5dc510acb1a6e22d59b5 (patch)
treede29ce0100b053cc9617ea04f2555ea6140912ff /sql/item_row.h
parente7a7ea7ec107089c42315064fa238ec2cca92110 (diff)
downloadmariadb-git-fc1f301e91367be5de7b5dc510acb1a6e22d59b5.tar.gz
MDEV-8024 Remove excessive update_used_tables() calls
Diffstat (limited to 'sql/item_row.h')
-rw-r--r--sql/item_row.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/item_row.h b/sql/item_row.h
index aa56068f8ba..31efc015909 100644
--- a/sql/item_row.h
+++ b/sql/item_row.h
@@ -17,22 +17,20 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-class Item_row: public Item
+class Item_row: public Item, private Used_tables_and_const_cache
{
Item **items;
- table_map used_tables_cache, not_null_tables_cache;
+ table_map not_null_tables_cache;
uint arg_count;
- bool const_item_cache;
bool with_null;
public:
Item_row(List<Item> &);
Item_row(Item_row *item):
Item(),
+ Used_tables_and_const_cache(item),
items(item->items),
- used_tables_cache(item->used_tables_cache),
not_null_tables_cache(0),
arg_count(item->arg_count),
- const_item_cache(item->const_item_cache),
with_null(0)
{}
@@ -71,7 +69,11 @@ public:
bool const_item() const { return const_item_cache; };
enum Item_result result_type() const { return ROW_RESULT; }
Item_result cmp_type() const { return ROW_RESULT; }
- void update_used_tables();
+ void update_used_tables()
+ {
+ used_tables_and_const_cache_init();
+ used_tables_and_const_cache_update_and_join(arg_count, items);
+ }
table_map not_null_tables() const { return not_null_tables_cache; }
virtual void print(String *str, enum_query_type query_type);