Created
May 19, 2022 12:50
-
-
Save rdtr/4c8417c32da12a3125338087e4ad89a1 to your computer and use it in GitHub Desktop.
Test MDEV-28315
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Content of a test file | |
CREATE TABLE t1 (a VARBINARY(128)) CHARACTER SET utf32; | |
INSERT INTO t1 VALUES ('South Carolina, Vermont, New Jersey, New Mexico, Wisconsin, Missouri, Delaware'); | |
CREATE TABLE t2 (b SET('South Carolina', 'Vermont', 'Texas', 'New Mexico', 'Wisconsin', 'Missouri', 'Delaware', 'Wyoming', 'New Jersey', 'Maryland', 'Illinois', 'New York')) CHARACTER SET utf32; | |
--error WARN_DATA_TRUNCATED | |
INSERT INTO t2 SELECT * FROM t1; | |
SELECT * FROM t2; | |
DROP TABLE t1; | |
DROP TABLE t2; | |
# Content of a result file | |
CREATE TABLE t1 (a VARBINARY(128)) CHARACTER SET utf32; | |
INSERT INTO t1 VALUES ('South Carolina, Vermont, New Jersey, New Mexico, Wisconsin, Missouri, Delaware'); | |
CREATE TABLE t2 (b SET('South Carolina', 'Vermont', 'Texas', 'New Mexico', 'Wisconsin', 'Missouri', 'Delaware', 'Wyoming', 'New Jersey', 'Maryland', 'Illinois', 'New York')) CHARACTER SET utf32; | |
INSERT INTO t2 SELECT * FROM t1; | |
ERROR 01000: Data truncated for column 'b' at row 1 | |
SELECT * FROM t2; | |
b | |
DROP TABLE t1; | |
DROP TABLE t2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment