Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
-
None
Description
CREATE OR REPLACE TABLE t1 (a TINYINT UNSIGNED); |
CREATE OR REPLACE TABLE t2 (a TINYINT); |
INSERT INTO t1 VALUES (255); |
INSERT IGNORE INTO t2 SELECT a FROM t1; |
SELECT * FROM t2; |
+------+
|
| a |
|
+------+
|
| -1 |
|
+------+
|
Notice, an out of range unsigned value of 255 was silently converted to its negative complement.
The expected result is 127 with a warning.