diff options
author | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-05-16 10:12:49 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-05-16 10:12:49 +0500 |
commit | 1e33cfb36a84b477a468dbcfc1ccc3035a9efb81 (patch) | |
tree | cc5b5bde02ab2b13971ee22d8bd647a5f35776fa /mysql-test/r/bigint.result | |
parent | d886ea8fb66c10e58029bf7c010a1a2a085ad23d (diff) | |
download | mariadb-git-1e33cfb36a84b477a468dbcfc1ccc3035a9efb81.tar.gz |
bug #8663 cant use bigint unsigned as input to cast
in the case of the overflow in the decimal->integer conversion
we didn't return the proper boundary value, but just the result
of the conversion we calculated on the moment of the error
mysql-test/r/bigint.result:
bug #8663 cant use bigint unsigned as input to cast
test result fixed
mysql-test/t/bigint.test:
bug #8663 cant use bigint unsigned as input to cast
test case
strings/decimal.c:
bug #8663 cant use bigint unsigned as input to cast
decimal->int conversion fixed to return proper boundary value
in the case of overflow
Diffstat (limited to 'mysql-test/r/bigint.result')
-rw-r--r-- | mysql-test/r/bigint.result | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 541a15561e2..f18d1c9b583 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -352,3 +352,13 @@ select c1 mod 50 as result from t1; result 6 drop table t1; +select cast(19999999999999999999 as signed); +cast(19999999999999999999 as signed) +9223372036854775807 +Warnings: +Error 1292 Truncated incorrect DECIMAL value: '' +select cast(-19999999999999999999 as signed); +cast(-19999999999999999999 as signed) +-9223372036854775808 +Warnings: +Error 1292 Truncated incorrect DECIMAL value: '' |