summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_gconcat.test
diff options
context:
space:
mode:
authorunknown <kroki/tomash@moonlight.intranet>2006-10-10 17:08:47 +0400
committerunknown <kroki/tomash@moonlight.intranet>2006-10-10 17:08:47 +0400
commit3177e8ebc49d95bb9c7768e5fc6aceb66bbb1783 (patch)
tree4528fd89be3dd96788b1cfa462033c391cc2076e /mysql-test/t/func_gconcat.test
parentebf58763e2e4970ab303813450105e1a193f8b9e (diff)
downloadmariadb-git-3177e8ebc49d95bb9c7768e5fc6aceb66bbb1783.tar.gz
BUG#21354: (COUNT(*) = 1) not working in SELECT inside prepared
statement. The problem was that during statement re-execution if the result was empty the old result could be returned for group functions. The solution is to implement proper cleanup() method in group functions. mysql-test/r/ps.result: Add result for bug#21354: (COUNT(*) = 1) not working in SELECT inside prepared statement. mysql-test/t/func_gconcat.test: Add a comment that the test case is from bug#836. mysql-test/t/ps.test: Add test case for bug#21354: (COUNT(*) = 1) not working in SELECT inside prepared statement. sql/item_sum.cc: Call clear() in Item_sum_count::cleanup(). sql/item_sum.h: Add comments. Add proper cleanup() methods. Change Item_sum::no_rows_in_result() to call clear() instead of reset(), as the latter also issues add(), and there is nothing to add when there are no rows in result.
Diffstat (limited to 'mysql-test/t/func_gconcat.test')
-rw-r--r--mysql-test/t/func_gconcat.test2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index 8f50690dd8b..21ec7362877 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -99,7 +99,7 @@ select ifnull(group_concat(concat(t1.id, ':', t1.name)), 'shortname') as 'withou
select distinct ifnull(group_concat(concat(t1.id, ':', t1.name)), 'shortname') as 'with distinct: cutoff at length of shortname' from t1;
drop table t1;
-# check zero rows
+# check zero rows (bug#836)
create table t1(id int);
create table t2(id int);
insert into t1 values(0),(1);