diff options
author | unknown <bell@laptop.sanja.is.com.ua> | 2003-10-12 17:56:05 +0300 |
---|---|---|
committer | unknown <bell@laptop.sanja.is.com.ua> | 2003-10-12 17:56:05 +0300 |
commit | 5f65a1d6e2cc288eb68907a0de01e6a49348e7fb (patch) | |
tree | 2d243d69c4c8bafa98d2f0bd9b6ed43fea552637 /sql/item_sum.cc | |
parent | 723190470e08febb09c58731abf356c9a798c46c (diff) | |
download | mariadb-git-5f65a1d6e2cc288eb68907a0de01e6a49348e7fb.tar.gz |
fixed printability of Items (all items except subselects)
(SCRUM) (WL#1274)
sql/item.cc:
fixed printability of Items
sql/item.h:
fixed printability of Items
sql/item_cmpfunc.cc:
fixed printability of Items
sql/item_cmpfunc.h:
fixed printability of Items
sql/item_func.cc:
fixed printability of Items
sql/item_func.h:
fixed printability of Items
sql/item_geofunc.h:
added DBUG_ASSERT to catch error in debuging timw
sql/item_row.cc:
fixed printability of Items
sql/item_row.h:
fixed printability of Items
sql/item_strfunc.cc:
fixed printability of Items
sql/item_strfunc.h:
fixed printability of Items
sql/item_sum.cc:
fixed printability of Items
sql/item_sum.h:
fixed printability of Items
sql/item_timefunc.cc:
fixed printability of Items
sql/item_timefunc.h:
layout fixed
fixed printability of Items
sql/item_uniq.h:
fixed printability of Items
sql/sql_yacc.yy:
layout fixed
correct convertion to String
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 967abbc5ab8..b61c19f994d 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1343,6 +1343,14 @@ longlong Item_sum_count_distinct::val_int() return table->file->records; } + +void Item_sum_count_distinct::print(String *str) +{ + str->append("count(distinct "); + args[0]->print(str); + str->append(')'); +} + /**************************************************************************** ** Functions to handle dynamic loadable aggregates ** Original source by: Alexis Mikhailov <root@medinf.chuvashia.su> @@ -1936,3 +1944,28 @@ String* Item_func_group_concat::val_str(String* str) } return &result; } + +void Item_func_group_concat::print(String *str) +{ + str->append("group concat("); + if (distinct) + str->append(" distinct "); + for (uint i= 0; i < arg_count; i++) + { + if (i) + str->append(','); + args[i]->print(str); + } + if (arg_count_order) + { + for (uint i= 0 ; i < arg_count_order ; i++) + { + if (i) + str->append(','); + (*order[i]->item)->print(str); + } + } + str->append(" seperator \'"); + str->append(*separator); + str->append("\')"); +} |