diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2018-04-25 14:42:38 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2018-04-30 19:34:08 +0400 |
commit | 68cbabbfb0667187042315461069d3e1aeb2c57b (patch) | |
tree | 72d7eed804e1aa5e8206694049be33b0c56c42c8 /mysql-test/main/column_compression.result | |
parent | 9a8498066865b508239b36853403f2700800af2b (diff) | |
download | mariadb-git-68cbabbfb0667187042315461069d3e1aeb2c57b.tar.gz |
MDEV-15938 - TINYTEXT CHARACTER SET utf8 COMPRESSED truncates data
Unexpected data truncation may occur when storing data to compressed blob
column having multi byte variable length character sets.
The reason was incorrect number of characters limit was enforced for
blobs.
Diffstat (limited to 'mysql-test/main/column_compression.result')
-rw-r--r-- | mysql-test/main/column_compression.result | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/main/column_compression.result b/mysql-test/main/column_compression.result index 8b7f0f7f611..c521a208589 100644 --- a/mysql-test/main/column_compression.result +++ b/mysql-test/main/column_compression.result @@ -1394,3 +1394,12 @@ SET column_compression_threshold=0; INSERT INTO t1 VALUES('a'); SET column_compression_threshold=DEFAULT; DROP TABLE t1; +# +# MDEV-15938 - TINYTEXT CHARACTER SET utf8 COMPRESSED truncates data +# +CREATE TABLE t1(a TINYTEXT COMPRESSED, b TINYTEXT) CHARACTER SET utf8; +INSERT INTO t1 VALUES (REPEAT(_latin1'a', 254), REPEAT(_latin1'a', 254)); +SELECT CHAR_LENGTH(a), CHAR_LENGTH(b), LEFT(a, 10), LEFT(b, 10) FROM t1; +CHAR_LENGTH(a) CHAR_LENGTH(b) LEFT(a, 10) LEFT(b, 10) +254 254 aaaaaaaaaa aaaaaaaaaa +DROP TABLE t1; |