diff options
author | unknown <jani@ua141d10.elisa.omakaista.fi> | 2006-05-04 17:05:21 +0300 |
---|---|---|
committer | unknown <jani@ua141d10.elisa.omakaista.fi> | 2006-05-04 17:05:21 +0300 |
commit | 231f4964ad6b19f9c83cac2065f0318cee4b0e74 (patch) | |
tree | 32a3068174d9eb52b2ba7f5cb8965ee86d2c4942 /mysql-test/t/select.test | |
parent | 473ad8c9863ed21dfd5010d949998a55709eb3a9 (diff) | |
download | mariadb-git-231f4964ad6b19f9c83cac2065f0318cee4b0e74.tar.gz |
Added test case for Bug#18712: Truncation problem. The test
is only to make sure that this will not be fixed, as it is
intended behaviour. Documentation will be improved accordingly.
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r-- | mysql-test/t/select.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index c4fe1906cbc..8e3c5847846 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -2871,3 +2871,18 @@ SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr DROP TABLE t1,t2; + +# +# Bug#18712: Truncation problem (needs just documenting and test +# cases to prevent fixing this accidently. It is intended behaviour) +# + +CREATE TABLE t1 (i TINYINT UNSIGNED NOT NULL); +INSERT t1 SET i = 0; +UPDATE t1 SET i = -1; +SELECT * FROM t1; +UPDATE t1 SET i = CAST(i - 1 AS SIGNED); +SELECT * FROM t1; +UPDATE t1 SET i = i - 1; +SELECT * FROM t1; +DROP TABLE t1; |