summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h
index 1db4e62051c..e662eed4a71 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -2224,7 +2224,12 @@ public:
~Item_result_field() {} /* Required with gcc 2.95 */
Field *get_tmp_table_field() { return result_field; }
Field *tmp_table_field(TABLE *t_arg) { return result_field; }
- table_map used_tables() const { return true; }
+ /*
+ This implementation of used_tables() used by Item_avg_field and
+ Item_variance_field which work when only temporary table left, so theu
+ return table map of the temporary table.
+ */
+ table_map used_tables() const { return 1; }
void set_result_field(Field *field) { result_field= field; }
bool is_result_field() { return true; }
void save_in_result_field(bool no_conversions)