1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -102,3 +102,13 @@ INSERT INTO t1 VALUES('a');
INSERT INTO t1 VALUES(' ');
SELECT LENGTH(a) FROM t1;
DROP TABLE t1;
--echo #
--echo # MDEV-15763 - VARCHAR(1) COMPRESSED crashes the server
--echo #
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;