summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2009-10-19 17:17:08 +0400
committerAlexander Nozdrin <alik@sun.com>2009-10-19 17:17:08 +0400
commit3251065aef83d6cc8088b03e56f6f3242786de66 (patch)
tree18863557a9b43b168f930debb4fdcc69a37f4e82 /sql/sql_class.h
parent9b4b453ab8a5f7c7fa06b4ef22b6a10867fac187 (diff)
parentbf14598c9903067474a7cdf1c49bca9f52d0c55a (diff)
downloadmariadb-git-3251065aef83d6cc8088b03e56f6f3242786de66.tar.gz
Merge from mysql-5.1.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 3dc6a49e964..bb5c700e4dc 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -2647,7 +2647,32 @@ public:
MI_COLUMNDEF *recinfo,*start_recinfo;
KEY *keyinfo;
ha_rows end_write_records;
- uint field_count,sum_func_count,func_count;
+ /**
+ Number of normal fields in the query, including those referred to
+ from aggregate functions. Hence, "SELECT `field1`,
+ SUM(`field2`) from t1" sets this counter to 2.
+
+ @see count_field_types
+ */
+ uint field_count;
+ /**
+ Number of fields in the query that have functions. Includes both
+ aggregate functions (e.g., SUM) and non-aggregates (e.g., RAND).
+ Also counts functions referred to from aggregate functions, i.e.,
+ "SELECT SUM(RAND())" sets this counter to 2.
+
+ @see count_field_types
+ */
+ uint func_count;
+ /**
+ Number of fields in the query that have aggregate functions. Note
+ that the optimizer may choose to optimize away these fields by
+ replacing them with constants, in which case sum_func_count will
+ need to be updated.
+
+ @see opt_sum_query, count_field_types
+ */
+ uint sum_func_count;
uint hidden_field_count;
uint group_parts,group_length,group_null_parts;
uint quick_group;