diff options
author | Sergey Glukhov <sergey.glukhov@oracle.com> | 2011-03-28 12:28:30 +0400 |
---|---|---|
committer | Sergey Glukhov <sergey.glukhov@oracle.com> | 2011-03-28 12:28:30 +0400 |
commit | ff23f5360ee328bd6adb14436e68e080cfe1d110 (patch) | |
tree | a42581f217bef4defbed4810cd9fef5a17b16c27 /sql/item_func.cc | |
parent | d499851be03a2a20f7cb230d9b2d69e169aa81c8 (diff) | |
download | mariadb-git-ff23f5360ee328bd6adb14436e68e080cfe1d110.tar.gz |
Bug#11766424 59527: DECIMAL_BIN_SIZE: ASSERTION `SCALE >= 0 && PRECISION > 0 && SCALE <= PRE
Assertion happens due to missing initialization of unsigned_flag
for Item_func_set_user_var object. It leads to incorrect
calculation of decimal field size.
The fix is to add initialization of unsigned_flag.
mysql-test/r/variables.result:
test case
mysql-test/t/variables.test:
test case
sql/item_func.cc:
add initialization of unsigned_flag.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index efae928a8b6..d4fd2c94e1d 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3840,6 +3840,7 @@ Item_func_set_user_var::fix_length_and_dec() maybe_null=args[0]->maybe_null; max_length=args[0]->max_length; decimals=args[0]->decimals; + unsigned_flag= args[0]->unsigned_flag; collation.set(args[0]->collation.collation, DERIVATION_IMPLICIT); } |