diff options
author | unknown <konstantin@mysql.com> | 2003-12-10 15:17:23 +0300 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2003-12-10 15:17:23 +0300 |
commit | 02f56e77e0f71197679ea8784f07be98fb17ce27 (patch) | |
tree | 641c98843d10a709fe921109ede6b392646dad8d /sql/item_sum.cc | |
parent | 0cc52bc7ca3718215a414c8e8df44e0af43dab9a (diff) | |
download | mariadb-git-02f56e77e0f71197679ea8784f07be98fb17ce27.tar.gz |
followup to fix for bug #1790 BIT_AND() result in GROUP BY different when
SQL_BIG_RESULT used": now BIT_AND() always returns 18446744073709551615
if no rows were found.
This patch also fixes bug #1972: "BIT_AND() and BIT_OR() still return
a *signed* 64bit value"
mysql-test/r/func_group.result:
followup to fix for bug #1790 BIT_AND() result in GROUP BY different when
SQL_BIG_RESULT used": test results fixed
bug #1972 "BIT_AND() and BIT_OR() still return a *signed* 64bit value":
results of new tests
mysql-test/t/func_group.test:
added tests for bug #1972 "BIT_AND() and BIT_OR() still return a
*signed* 64bit value"
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 5a5934db0cd..e18fa83e49d 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -104,12 +104,13 @@ Item_sum_num::val_str(String *str) String * Item_sum_int::val_str(String *str) { - longlong nr=val_int(); + longlong nr= val_int(); if (null_value) return 0; - char buff[21]; - uint length= (uint) (longlong10_to_str(nr,buff,-10)-buff); - str->copy(buff,length); + if (unsigned_flag) + str->set((ulonglong) nr); + else + str->set(nr); return str; } |