You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-11-03 17:13:17 +03:00 
			
		
		
		
	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.
		
			
				
	
	
		
			16 lines
		
	
	
		
			305 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			305 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
--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;
 |