mariadb/mysql-test/r/character_set_results_func.result
unknown b00c536378 System variable tests delivered by Folio3 (see WL4288).
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
2008-04-10 15:14:28 +02:00

64 lines
2 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'#--------------------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;