mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names. changed store_warning() -> push_warning_print()
		
			
				
	
	
		
			28 lines
		
	
	
		
			791 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			791 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
#
 | 
						|
# Test of problem with CONCAT_WS() and long separators.
 | 
						|
#
 | 
						|
 | 
						|
--disable_warnings
 | 
						|
DROP TABLE IF EXISTS t1;
 | 
						|
--enable_warnings
 | 
						|
 | 
						|
CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL );
 | 
						|
INSERT INTO t1 VALUES (1413006,'idlfmv'),
 | 
						|
(1413065,'smpsfz'),(1413127,'sljrhx'),(1413304,'qerfnd');
 | 
						|
 | 
						|
SELECT number, alpha, CONCAT_WS('<---->',number,alpha) AS new
 | 
						|
FROM t1 GROUP BY number;
 | 
						|
 | 
						|
SELECT CONCAT_WS('<---->',number,alpha) AS new
 | 
						|
FROM t1 GROUP BY new LIMIT 1;
 | 
						|
 | 
						|
SELECT number, alpha, CONCAT_WS('<->',number,alpha) AS new
 | 
						|
FROM t1 GROUP BY new LIMIT 1;
 | 
						|
 | 
						|
SELECT number, alpha, CONCAT_WS('-',number,alpha,alpha,alpha,alpha,alpha,alpha,alpha) AS new
 | 
						|
FROM t1 GROUP BY new LIMIT 1;
 | 
						|
 | 
						|
SELECT number, alpha, CONCAT_WS('<------------------>',number,alpha) AS new
 | 
						|
FROM t1 GROUP BY new LIMIT 1;
 | 
						|
drop table t1;
 |