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
cp1251 test
This commit is contained in:
@ -538,7 +538,8 @@ t1_TIME REGEXP_REPLACE(t1_TIME, '22$', 'KittyCat')
|
||||
22:12:02 22:12:02
|
||||
23:59:59 23:59:59
|
||||
SET character_set_connection = 'utf8';
|
||||
CREATE TABLE t2 (hello text) engine columnstore;
|
||||
SET NAMES utf8mb3;
|
||||
CREATE TABLE t2 (hello text) DEFAULT CHARSET=utf8 engine columnstore;
|
||||
INSERT INTO t2 values('こんにちは');
|
||||
INSERT INTO t2 values('привет');
|
||||
INSERT INTO t2 values('Γεια');
|
||||
@ -569,74 +570,98 @@ hello hello regexp 'ა.ა'
|
||||
სალამი 0
|
||||
SELECT hello, regexp_substr(hello, 'ん.ち') FROM t2;
|
||||
hello regexp_substr(hello, 'ん.ち')
|
||||
こんにちは
|
||||
こんにちは んにち
|
||||
привет
|
||||
Γεια
|
||||
სალამი
|
||||
SELECT hello, regexp_substr(hello, 'и.е') FROM t2;
|
||||
hello regexp_substr(hello, 'и.е')
|
||||
こんにちは
|
||||
привет
|
||||
привет иве
|
||||
Γεια
|
||||
სალამი
|
||||
SELECT hello, regexp_substr(hello, 'ε.α') FROM t2;
|
||||
hello regexp_substr(hello, 'ε.α')
|
||||
こんにちは
|
||||
привет
|
||||
Γεια
|
||||
Γεια εια
|
||||
სალამი
|
||||
SELECT hello, regexp_substr(hello, 'ა.ა') FROM t2;
|
||||
hello regexp_substr(hello, 'ა.ა')
|
||||
こんにちは
|
||||
привет
|
||||
Γεια
|
||||
სალამი
|
||||
სალამი ალა
|
||||
SELECT hello, regexp_instr(hello, 'ん.ち') FROM t2;
|
||||
hello regexp_instr(hello, 'ん.ち')
|
||||
こんにちは 0
|
||||
こんにちは 2
|
||||
привет 0
|
||||
Γεια 0
|
||||
სალამი 0
|
||||
SELECT hello, regexp_instr(hello, 'и.е') FROM t2;
|
||||
hello regexp_instr(hello, 'и.е')
|
||||
こんにちは 0
|
||||
привет 0
|
||||
привет 3
|
||||
Γεια 0
|
||||
სალამი 0
|
||||
SELECT hello, regexp_instr(hello, 'ε.α') FROM t2;
|
||||
hello regexp_instr(hello, 'ε.α')
|
||||
こんにちは 0
|
||||
привет 0
|
||||
Γεια 0
|
||||
Γεια 2
|
||||
სალამი 0
|
||||
SELECT hello, regexp_instr(hello, 'ა.ა') FROM t2;
|
||||
hello regexp_instr(hello, 'ა.ა')
|
||||
こんにちは 0
|
||||
привет 0
|
||||
Γεια 0
|
||||
სალამი 0
|
||||
სალამი 2
|
||||
SELECT hello, regexp_replace(hello, 'ん.ち', 'Достоевский') FROM t2;
|
||||
hello regexp_replace(hello, 'ん.ち', 'Достоевский')
|
||||
こんにちは こんにちは
|
||||
こんにちは こДостоевскийは
|
||||
привет привет
|
||||
Γεια Γεια
|
||||
სალამი სალამი
|
||||
SELECT hello, regexp_replace(hello, 'и.е', 'Достоевский') FROM t2;
|
||||
hello regexp_replace(hello, 'и.е', 'Достоевский')
|
||||
こんにちは こんにちは
|
||||
привет привет
|
||||
привет прДостоевскийт
|
||||
Γεια Γεια
|
||||
სალამი სალამი
|
||||
SELECT hello, regexp_replace(hello, 'ε.α', 'Достоевский') FROM t2;
|
||||
hello regexp_replace(hello, 'ε.α', 'Достоевский')
|
||||
こんにちは こんにちは
|
||||
привет привет
|
||||
Γεια Γεια
|
||||
Γεια ΓДостоевский
|
||||
სალამი სალამი
|
||||
SELECT hello, regexp_replace(hello, 'ა.ა', 'Достоевский') FROM t2;
|
||||
hello regexp_replace(hello, 'ა.ა', 'Достоевский')
|
||||
こんにちは こんにちは
|
||||
привет привет
|
||||
Γεια Γεια
|
||||
სალამი სალამი
|
||||
სალამი სДостоевскийმი
|
||||
SHOW VARIABLES LIKE 'character_set%';
|
||||
Variable_name Value
|
||||
character_set_client utf8mb3
|
||||
character_set_connection utf8mb3
|
||||
character_set_database utf8mb3
|
||||
character_set_filesystem binary
|
||||
character_set_results utf8mb3
|
||||
character_set_server utf8mb3
|
||||
character_set_system utf8mb3
|
||||
character_sets_dir /usr/share/mysql/charsets/
|
||||
CREATE TABLE tw(hello text) DEFAULT CHARSET=cp1251 ENGINE COLUMNSTORE;
|
||||
INSERT INTO tw values(convert('привет' USING cp1251));
|
||||
SELECT hello, regexp_instr(hello, convert('и.е' USING cp1251)) FROM tw;
|
||||
hello regexp_instr(hello, convert('и.е' USING cp1251))
|
||||
привет 3
|
||||
SELECT hello, convert(regexp_substr(hello, convert('и.е' USING cp1251)) using utf8) FROM tw;
|
||||
hello convert(regexp_substr(hello, convert('и.е' USING cp1251)) using utf8)
|
||||
привет иве
|
||||
SELECT hello, convert(regexp_replace(hello, convert('и.е' USING cp1251), convert('Достоевкий' USING cp1251)) using utf8) FROM tw;
|
||||
hello convert(regexp_replace(hello, convert('и.е' USING cp1251), convert('Достоевкий' USING cp1251)) using utf8)
|
||||
привет привет
|
||||
SELECT hello, hello regexp convert('и.е' USING cp1251) FROM tw;
|
||||
hello hello regexp convert('и.е' USING cp1251)
|
||||
привет 1
|
||||
DROP DATABASE mcs228_db;
|
||||
|
@ -151,8 +151,9 @@ SELECT t1_TIME, REGEXP_REPLACE(t1_TIME, '(59)+', 'KittyCat') FROM t1 ORDER BY 1;
|
||||
SELECT t1_TIME, REGEXP_REPLACE(t1_TIME, '22$', 'KittyCat') FROM t1 ORDER BY 1;
|
||||
|
||||
SET character_set_connection = 'utf8';
|
||||
SET NAMES utf8mb3;
|
||||
|
||||
CREATE TABLE t2 (hello text) engine columnstore;
|
||||
CREATE TABLE t2 (hello text) DEFAULT CHARSET=utf8 engine columnstore;
|
||||
INSERT INTO t2 values('こんにちは');
|
||||
INSERT INTO t2 values('привет');
|
||||
INSERT INTO t2 values('Γεια');
|
||||
@ -178,5 +179,14 @@ SELECT hello, regexp_replace(hello, 'и.е', 'Достоевский') FROM t2;
|
||||
SELECT hello, regexp_replace(hello, 'ε.α', 'Достоевский') FROM t2;
|
||||
SELECT hello, regexp_replace(hello, 'ა.ა', 'Достоевский') FROM t2;
|
||||
|
||||
SHOW VARIABLES LIKE 'character_set%';
|
||||
CREATE TABLE tw(hello text) DEFAULT CHARSET=cp1251 ENGINE COLUMNSTORE;
|
||||
INSERT INTO tw values(convert('привет' USING cp1251));
|
||||
SELECT hello, regexp_instr(hello, convert('и.е' USING cp1251)) FROM tw;
|
||||
SELECT hello, convert(regexp_substr(hello, convert('и.е' USING cp1251)) using utf8) FROM tw;
|
||||
SELECT hello, convert(regexp_replace(hello, convert('и.е' USING cp1251), convert('Достоевкий' USING cp1251)) using utf8) FROM tw;
|
||||
|
||||
SELECT hello, hello regexp convert('и.е' USING cp1251) FROM tw;
|
||||
|
||||
# Clean UP
|
||||
DROP DATABASE mcs228_db;
|
||||
|
Reference in New Issue
Block a user