You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-5196 REPLACE function may trigger invalid capacity assertion (#2522)
When length of string to replace minus length of string to replace to is bigger than input string and processing mode allows for binary (memcmp or std::string::find()) comparison, REPLACE may trigger invalid capacity assertion and query processing will stop. The fix is to properly count the number of occurences of the string to replace, basically.
This commit is contained in:
15
mysql-test/columnstore/basic/t/mcol-5196.test
Normal file
15
mysql-test/columnstore/basic/t/mcol-5196.test
Normal file
@ -0,0 +1,15 @@
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mcol5196;
|
||||
--enable_warnings
|
||||
|
||||
CREATE DATABASE mcol5196;
|
||||
|
||||
USE mcol5196;
|
||||
|
||||
CREATE TABLE t1 (a VARCHAR(7) CHARACTER SET latin1 COLLATE latin1_bin) ENGINE=COLUMNSTORE;
|
||||
|
||||
INSERT INTO t1(a) VALUES ('aa');
|
||||
|
||||
SELECT REPLACE(a, 'pqrs', 'a') FROM t1;
|
||||
|
||||
DROP DATABASE mcol5196;
|
Reference in New Issue
Block a user