mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
b00c536378
BitKeeper/etc/ignore: Added mysql-test/linux_sys_vars.inc mysql-test/load_sysvars.inc mysql-test/windows_sys_vars.inc to the ignore list
64 lines
2 KiB
Text
64 lines
2 KiB
Text
'#--------------------FN_DYNVARS_012_01-------------------------#'
|
||
SET @global_character_set_results = @@global.character_set_results;
|
||
SET @session_character_set_results = @@session.character_set_results;
|
||
SET @@global.character_set_results = utf8;
|
||
'connect (con1,localhost,root,,,,)'
|
||
'connection con1'
|
||
SELECT @@global.character_set_results;
|
||
@@global.character_set_results
|
||
utf8
|
||
SELECT @@session.character_set_results;
|
||
@@session.character_set_results
|
||
utf8
|
||
'#--------------------FN_DYNVARS_012_02-------------------------#'
|
||
'connection default'
|
||
DROP TABLE IF EXISTS t1;
|
||
CREATE TABLE t1(b CHAR(40) character set utf8);
|
||
SET NAMES utf8;
|
||
'----check string literals against different character_set_results---'
|
||
check if results are converted to character_set_results
|
||
SET @@session.character_set_results = greek;
|
||
SELECT 'Ð<>ЂЃЄ' AS utf_text;
|
||
utf_text
|
||
????
|
||
check effect of character_set_results when introducers are used
|
||
SET @@session.character_set_results = latin1;
|
||
SELECT _latin1'Müller' AS latin1_text;
|
||
latin1_text
|
||
Müller
|
||
SET @@session.character_set_results = ascii;
|
||
SELECT _latin1'Müller' AS latin1_text;
|
||
latin1_text
|
||
M?ller
|
||
check when we dont want any conversion
|
||
SET @@session.character_set_results = NULL;
|
||
SELECT 'Ð<>ЂЃЄ' AS utf_text;
|
||
utf_text
|
||
Ð<EFBFBD>ЂЃЄ
|
||
'---check results from table against different character_set_results--'
|
||
INSERT INTO t1 VALUES(_utf8'Ð<>ЂЃЄ');
|
||
INSERT INTO t1 VALUES('ФХЦЧШ');
|
||
SET @@session.character_set_results = NULL;
|
||
SELECT b, CHAR_LENGTH(b) FROM t1;
|
||
b CHAR_LENGTH(b)
|
||
Ð<EFBFBD>ЂЃЄ 4
|
||
ФХЦЧШ 5
|
||
SET @@session.character_set_results = utf8;
|
||
SELECT b, CHAR_LENGTH(b) FROM t1;
|
||
b CHAR_LENGTH(b)
|
||
Ð<EFBFBD>ЂЃЄ 4
|
||
ФХЦЧШ 5
|
||
SET @@session.character_set_results = koi8r;
|
||
SELECT b, CHAR_LENGTH(b) FROM t1;
|
||
b CHAR_LENGTH(b)
|
||
³??? 4
|
||
æèãþû 5
|
||
SET @@session.character_set_results = cp1250;
|
||
SELECT b, CHAR_LENGTH(b) FROM t1;
|
||
b CHAR_LENGTH(b)
|
||
???? 4
|
||
????? 5
|
||
DROP TABLE t1;
|
||
'connection default;'
|
||
SET @@global.character_set_results = @global_character_set_results;
|
||
SET @@session.character_set_results = @session_character_set_results;
|