diff options
author | kroki/tomash@moonlight.intranet <> | 2006-10-10 17:08:47 +0400 |
---|---|---|
committer | kroki/tomash@moonlight.intranet <> | 2006-10-10 17:08:47 +0400 |
commit | fbf6507cf74688be3b5b687c3f99f3ef88e8dcb9 (patch) | |
tree | 4528fd89be3dd96788b1cfa462033c391cc2076e /sql/item_sum.cc | |
parent | a55d18e7464fbd0a20de97a8a95b3f2376dc0ef6 (diff) | |
download | mariadb-git-fbf6507cf74688be3b5b687c3f99f3ef88e8dcb9.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.
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 0b9b10d05d4..e480cb031d8 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -312,6 +312,7 @@ longlong Item_sum_count::val_int() void Item_sum_count::cleanup() { DBUG_ENTER("Item_sum_count::cleanup"); + clear(); Item_sum_int::cleanup(); used_table_cache= ~(table_map) 0; DBUG_VOID_RETURN; |