summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-01-03 12:40:38 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-01-03 12:40:38 +0100
commitb35290e19bda02257e4cf6c6acc6133b4e3f2372 (patch)
treee0d986b1156ceb3c03209c3bef9989bc7040553f /sql
parentef1e488be369b3d3c7eb26cfba1f44840221d502 (diff)
parent4d7f0735067260bfc600c85e1574b7c708180fc2 (diff)
downloadmariadb-git-b35290e19bda02257e4cf6c6acc6133b4e3f2372.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql')
-rw-r--r--sql/item.cc40
-rw-r--r--sql/item.h9
-rw-r--r--sql/sql_lex.cc2
3 files changed, 50 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 2577bbed716..4f8433c28c0 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -8876,6 +8876,46 @@ bool Item_direct_view_ref::excl_dep_on_grouping_fields(st_select_lex *sel)
}
+double Item_direct_view_ref::val_result()
+{
+ double tmp=(*ref)->val_result();
+ null_value=(*ref)->null_value;
+ return tmp;
+}
+
+
+longlong Item_direct_view_ref::val_int_result()
+{
+ longlong tmp=(*ref)->val_int_result();
+ null_value=(*ref)->null_value;
+ return tmp;
+}
+
+
+String *Item_direct_view_ref::str_result(String* tmp)
+{
+ tmp=(*ref)->str_result(tmp);
+ null_value=(*ref)->null_value;
+ return tmp;
+}
+
+
+my_decimal *Item_direct_view_ref::val_decimal_result(my_decimal *val)
+{
+ my_decimal *tmp= (*ref)->val_decimal_result(val);
+ null_value=(*ref)->null_value;
+ return tmp;
+}
+
+
+bool Item_direct_view_ref::val_bool_result()
+{
+ bool tmp= (*ref)->val_bool_result();
+ null_value=(*ref)->null_value;
+ return tmp;
+}
+
+
bool Item_default_value::eq(const Item *item, bool binary_cmp) const
{
return item->type() == DEFAULT_VALUE_ITEM &&
diff --git a/sql/item.h b/sql/item.h
index c3db959fd44..4f02b2085f4 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -4978,6 +4978,15 @@ public:
item_equal= NULL;
Item_direct_ref::cleanup();
}
+ /*
+ TODO move these val_*_result function to Item_dierct_ref (maybe)
+ */
+ double val_result();
+ longlong val_int_result();
+ String *str_result(String* tmp);
+ my_decimal *val_decimal_result(my_decimal *val);
+ bool val_bool_result();
+
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
{ return get_item_copy<Item_direct_view_ref>(thd, mem_root, this); }
};
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index a6bc4e171da..f8fbf12effe 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -4249,7 +4249,7 @@ void SELECT_LEX::update_used_tables()
}
Item *item;
- List_iterator_fast<Item> it(join->fields_list);
+ List_iterator_fast<Item> it(join->all_fields);
select_list_tables= 0;
while ((item= it++))
{