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 
			
		
		
		
	feat(charset)!: utf8 is a new charset default and utf8_general_ci is a new collation default in the engine configuration file shipped --------- Co-authored-by: Leonid Fedorov <leonid.fedorov@mariadb.com> Co-authored-by: mariadb-DanielLee <daniel.lee@mariadb.com>
		
			
				
	
	
		
			43 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
DROP DATABASE IF EXISTS mcs173_db;
 | 
						|
CREATE DATABASE mcs173_db;
 | 
						|
USE mcs173_db;
 | 
						|
SET default_storage_engine=Columnstore;
 | 
						|
CREATE TABLE t1 (a CHAR(1), b INT, c DATETIME, d DOUBLE);
 | 
						|
INSERT INTO t1 VALUES (NULL, NULL, '0-0-0', NULL),('a', 12, '1212-12-12', 1.19691E+100),('b', 13, '1313-3-13 13:13:13', 2.1961E+18),('c', 14, '1414-4-14', 0.16191),('d', 15, '2015-5-15 15:15:15', 1.971917);
 | 
						|
SHOW CREATE TABLE t1;
 | 
						|
Table	Create Table
 | 
						|
t1	CREATE TABLE `t1` (
 | 
						|
  `a` char(1) DEFAULT NULL,
 | 
						|
  `b` int(11) DEFAULT NULL,
 | 
						|
  `c` datetime DEFAULT NULL,
 | 
						|
  `d` double DEFAULT NULL
 | 
						|
) ENGINE=Columnstore DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
 | 
						|
SELECT COALESCE(NULL, NULL, NULL, 'mariadb', NULL, 'columnstore');
 | 
						|
COALESCE(NULL, NULL, NULL, 'mariadb', NULL, 'columnstore')
 | 
						|
mariadb
 | 
						|
SELECT COALESCE(NULL, 1, 2, 'columnstore');
 | 
						|
COALESCE(NULL, 1, 2, 'columnstore')
 | 
						|
1
 | 
						|
SELECT a, COALESCE(a, 'na') FROM t1;
 | 
						|
a	COALESCE(a, 'na')
 | 
						|
NULL	na
 | 
						|
a	a
 | 
						|
b	b
 | 
						|
c	c
 | 
						|
d	d
 | 
						|
SELECT b, COALESCE(b, 'null value') FROM t1;
 | 
						|
b	COALESCE(b, 'null value')
 | 
						|
NULL	null value
 | 
						|
12	12
 | 
						|
13	13
 | 
						|
14	14
 | 
						|
15	15
 | 
						|
SELECT d, COALESCE(d, 'null value') FROM t1;
 | 
						|
d	COALESCE(d, 'null value')
 | 
						|
NULL	null value
 | 
						|
1.19691e100	1.19691e100
 | 
						|
2.1961e18	2.1961e18
 | 
						|
0.16191	0.16191
 | 
						|
1.971917	1.971917
 | 
						|
DROP DATABASE mcs173_db;
 |