summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authorgkodinov/kgeorge@magare.gmz <>2007-04-11 13:58:16 +0300
committergkodinov/kgeorge@magare.gmz <>2007-04-11 13:58:16 +0300
commit4202454baa1f41bcd371fb6747157de98b44e072 (patch)
tree0a97cb5f90abe79b4947662dc3c9c5083ec4be81 /sql/item_strfunc.h
parent21a136883c45941f9e138ae5ae8f7c5a69c6f791 (diff)
downloadmariadb-git-4202454baa1f41bcd371fb6747157de98b44e072.tar.gz
Bug #27530:
The function CRC32() returns unsigned integer. But the metadata (the unsigned flag) for the function was set incorrectly. As a result type arithmetics based on the function's metadata (like finding the concise type of an temporary table column to hold the result) returned incorrect results. Fixed by returning correct type information. This fix is based on code contributed by Martin Friebe (martin@hybyte.com) on 2007-03-30.
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 778ea6e9496..d7c4a3eddef 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -790,7 +790,7 @@ class Item_func_crc32 :public Item_int_func
{
String value;
public:
- Item_func_crc32(Item *a) :Item_int_func(a) {}
+ Item_func_crc32(Item *a) :Item_int_func(a) { unsigned_flag= 1; }
const char *func_name() const { return "crc32"; }
void fix_length_and_dec() { max_length=10; }
longlong val_int();