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:
@ -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;
|
||||
|
Reference in New Issue
Block a user