1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-15763 - VARCHAR(1) COMPRESSED crashes the server

Storing 1 byte long string in VARCHAR() COMPRESSED column may trigger
integer overflow when calculating available space for zlib output.
This commit is contained in:
Sergey Vojtovich
2018-04-03 18:34:46 +04:00
parent 3dec6c48bc
commit 38c799c9a5
3 changed files with 39 additions and 1 deletions

View File

@ -1386,3 +1386,11 @@ SELECT LENGTH(a) FROM t1;
LENGTH(a)
0
DROP TABLE t1;
#
# MDEV-15763 - VARCHAR(1) COMPRESSED crashes the server
#
CREATE TABLE t1(a VARCHAR(1) COMPRESSED);
SET column_compression_threshold=0;
INSERT INTO t1 VALUES('a');
SET column_compression_threshold=DEFAULT;
DROP TABLE t1;