diff options
author | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-05-20 21:22:57 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-05-20 21:22:57 +0500 |
commit | 59a7e066e3a86bb4371ce5027b4ad6b79ac91ce2 (patch) | |
tree | 02abebc14d64d25a68e4845a50e8f39f7ca0adb0 /mysql-test/r | |
parent | 8b33c41554b1f9ac173a047f55fa0c522f28af35 (diff) | |
download | mariadb-git-59a7e066e3a86bb4371ce5027b4ad6b79ac91ce2.tar.gz |
bug #28361 Buffer overflow in DECIMAL code on Windows
my_decimal in some cases can contain more decimal digits than
is officially supported (DECIMAL_MAX_PRECISION), so we need to
prepare bigger buffer for the resulting string.
mysql-test/r/type_newdecimal.result:
bug #28361 Buffer overflow in DECIMAL code on Windows
test result
mysql-test/t/type_newdecimal.test:
bug #28361 Buffer overflow in DECIMAL code on Windows
test case
This test case doesn't fall in most cases even without the fix
Still valgrind shows the problemn
sql/my_decimal.h:
bug #28361 Buffer overflow in DECIMAL code on Windows
DECIMAL_MAX_POSSIBLE_PRECISION introduced to be used in places,
when we need to check for the number of digits technicaly possible
in my_decimal.
DECIMAL_MAX_STR_LENGTH fixed as it has to fit for the MAX_POSSIBLE_PRECISION
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/type_newdecimal.result | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index cbcab126439..d91baaa0394 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1465,4 +1465,7 @@ Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at r Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 +create table t1 (s varchar(100)); +insert into t1 values (0.00000000010000000000000000364321973154977415791655470655996396089904010295867919921875); +drop table t1; End of 5.0 tests |