mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02: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:
parent
3dec6c48bc
commit
38c799c9a5
3 changed files with 39 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue