mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
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.
This commit is contained in:
parent
9a84980668
commit
68cbabbfb0
6 changed files with 78 additions and 34 deletions
9
mysql-test/main/column_compression_utf16.result
Normal file
9
mysql-test/main/column_compression_utf16.result
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# MDEV-15938 - TINYTEXT CHARACTER SET utf8 COMPRESSED truncates data
|
||||
#
|
||||
CREATE TABLE t1(a TINYTEXT COMPRESSED, b TINYTEXT) CHARACTER SET utf16;
|
||||
INSERT INTO t1 VALUES (REPEAT(_latin1'a', 127), REPEAT(_latin1'a', 127));
|
||||
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)
|
||||
127 127 aaaaaaaaaa aaaaaaaaaa
|
||||
DROP TABLE t1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue