summaryrefslogtreecommitdiff
path: root/sql/item_sum.h
diff options
context:
space:
mode:
authorunknown <wax@kishkin.ru>2003-05-31 15:44:19 +0600
committerunknown <wax@kishkin.ru>2003-05-31 15:44:19 +0600
commite0c9de6e62a199ec48ac1c910de4bcad28425c76 (patch)
tree879ead6061bc1bdc807a16f5c29c0fd10acc4404 /sql/item_sum.h
parentc121cb748d9432561664ad020c3c48431fe2a48c (diff)
downloadmariadb-git-e0c9de6e62a199ec48ac1c910de4bcad28425c76.tar.gz
URGENT
SCRUM BUG correct wrong code in group_concat mysql-test/r/func_gconcat.result: add new tests mysql-test/t/func_gconcat.test: add new tests sql/field.cc: add new variable for group_concat sql/field.h: add new variable for group_concat sql/item_sum.cc: correct wrong code sql/item_sum.h: correct wrong code
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r--sql/item_sum.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h
index 37d7e7f79d0..e306a42c6bc 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -640,13 +640,28 @@ class Item_func_group_concat : public Item_sum
uint max_elements_in_tree;
MYSQL_ERROR *warning;
bool warning_available;
+ uint key_length;
+ int rec_offset;
+ bool tree_mode;
+ bool distinct;
+ bool warning_for_row;
+ bool always_null;
+
+ friend int group_concat_key_cmp_with_distinct(void* arg, byte* key1,
+ byte* key2);
+ friend int group_concat_key_cmp_with_order(void* arg, byte* key1, byte* key2);
+ friend int group_concat_key_cmp_with_distinct_and_order(void* arg,
+ byte* key1,
+ byte* key2);
+ friend int dump_leaf_key(byte* key, uint32 count __attribute__((unused)),
+ Item_func_group_concat *group_concat_item);
+
public:
String result;
String *separator;
TREE tree_base;
TREE *tree;
TABLE *table;
- Item **expr;
ORDER **order;
TABLE_LIST *tables_list;
ulong group_concat_max_len;
@@ -655,9 +670,6 @@ class Item_func_group_concat : public Item_sum
uint arg_count_field;
uint arg_show_fields;
uint count_cut_values;
- bool tree_mode, distinct;
- bool warning_for_row;
- bool always_null;
/*
Following is 0 normal object and pointer to original one for copy
(to correctly free resources)
@@ -673,10 +685,14 @@ class Item_func_group_concat : public Item_sum
max_elements_in_tree(item.max_elements_in_tree),
warning(item.warning),
warning_available(item.warning_available),
+ key_length(item.key_length),
+ rec_offset(item.rec_offset),
+ tree_mode(0),
+ distinct(item.distinct),
+ warning_for_row(item.warning_for_row),
separator(item.separator),
tree(item.tree),
table(item.table),
- expr(item.expr),
order(item.order),
tables_list(item.tables_list),
group_concat_max_len(item.group_concat_max_len),
@@ -685,9 +701,6 @@ class Item_func_group_concat : public Item_sum
arg_count_field(item.arg_count_field),
arg_show_fields(item.arg_show_fields),
count_cut_values(item.count_cut_values),
- tree_mode(0),
- distinct(item.distinct),
- warning_for_row(item.warning_for_row),
original(&item)
{
quick_group = 0;