diff options
author | Gleb Shchepa <gshchepa@mysql.com> | 2008-12-12 18:19:33 +0400 |
---|---|---|
committer | Gleb Shchepa <gshchepa@mysql.com> | 2008-12-12 18:19:33 +0400 |
commit | cd42f4ba2c259be32584ed3d3235ddfd6c3f3612 (patch) | |
tree | 8e2b50c43c7ee0afb0bd084fdac4a80810124664 /sql/item_func.h | |
parent | 749847686ceb2dd5a04d030bb35c84af2332678f (diff) | |
parent | af5cf536bc5246e49a4874a225931a838659cae0 (diff) | |
download | mariadb-git-cd42f4ba2c259be32584ed3d3235ddfd6c3f3612.tar.gz |
auto merge 5.0-bugteam --> 5.1-bugteam (bug 40761)
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 3acda817d26..83230b10154 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -362,7 +362,10 @@ public: Item_func_unsigned(Item *a) :Item_func_signed(a) {} const char *func_name() const { return "cast_as_unsigned"; } void fix_length_and_dec() - { max_length=args[0]->max_length; unsigned_flag=1; } + { + max_length= min(args[0]->max_length, DECIMAL_MAX_PRECISION + 2); + unsigned_flag=1; + } longlong val_int(); virtual void print(String *str, enum_query_type query_type); }; |