summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2005-03-13 23:50:43 +0300
committerkonstantin@mysql.com <>2005-03-13 23:50:43 +0300
commit983c75f05e6d6c009a90d856f6ffb591df9999e1 (patch)
treedfbb52f3c23bf61610783925dd1ed12c6c69942f /sql/field.h
parentca336ad1def1a88d03fdbd167ad456b7ff6dd972 (diff)
downloadmariadb-git-983c75f05e6d6c009a90d856f6ffb591df9999e1.tar.gz
WL#926 "SUM(DISTINCT) and AVG(DISTINCT)": improvement of SUM(DISTINCT) and
implementation of AVG(DISTINCT) which utilizes the approach with Fields. The patch implemented in October is portede to the up-to-date tree containing DECIMAL type. Tests for AVG(DISTINCT) (although there is not much to test provided that SUM(DISTINCT) works), cleanups for COUNT(DISTINCT) and GROUP_CONCAT() will follow in another changeset.
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h
index a92ef1db297..083af27d6d9 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1340,7 +1340,8 @@ public:
Create field class for CREATE TABLE
*/
-class create_field :public Sql_alloc {
+class create_field :public Sql_alloc
+{
public:
const char *field_name;
const char *change; // If done with alter table
@@ -1362,6 +1363,11 @@ public:
create_field() :after(0) {}
create_field(Field *field, Field *orig_field);
void create_length_to_internal_length(void);
+
+ /* Init for a tmp table field. To be extended if need be. */
+ void init_for_tmp_table(enum_field_types sql_type_arg,
+ uint32 max_length, uint32 decimals,
+ bool maybe_null, bool is_unsigned);
};