1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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.
This commit is contained in:
unknown
2006-05-04 17:05:21 +03:00
parent 473ad8c986
commit 231f4964ad
2 changed files with 36 additions and 0 deletions

View File

@@ -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;