Current Path : /home/usr.opt/mysql57/mysql-test/suite/sys_vars/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/sys_vars/r/character_set_database_func.result |
'#--------------------FN_DYNVARS_008_01-------------------------#' SET @global_character_set_database = @@global.character_set_database; SET @session_character_set_database = @@session.character_set_database; SET @session_character_set_server = @@session.character_set_server; SET @global_character_set_server = @@global.character_set_server; SET @@global.character_set_database = utf8; Warnings: Warning 1681 Updating 'character_set_database' is deprecated. It will be made read-only in a future release. 'connect (con1,localhost,root,,,,)' 'connection con1' SELECT @@global.character_set_database; @@global.character_set_database utf8 SELECT @@session.character_set_database; @@session.character_set_database latin1 '#--------------------FN_DYNVARS_008_02-------------------------#' 'connection default' DROP TABLE IF EXISTS t1; '--check if setting session character_set_database effects new databases' SET @@session.character_set_server = utf8; SELECT @@session.character_set_database; @@session.character_set_database latin1 SET @@session.character_set_database = latin5; Warnings: Warning 1681 Updating 'character_set_database' is deprecated. It will be made read-only in a future release. SELECT @@session.character_set_database; @@session.character_set_database latin5 CREATE DATABASE db1; USE db1; SHOW CREATE DATABASE db1; Database Create Database db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET utf8 */ CREATE TABLE t1(a INT, b VARCHAR(40)); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 DROP TABLE t1; DROP DATABASE db1; '--ascii character set specified--' CREATE DATABASE db1 CHARACTER SET ascii; USE db1; SHOW CREATE DATABASE db1; Database Create Database db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET ascii */ CREATE TABLE t1(a INT, b VARCHAR(40)); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=ascii DROP TABLE t1; DROP DATABASE db1; '------Check if load data uses character_set_database----------' USE test; CREATE TABLE t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=MyISAM CHARACTER SET utf8; 'Verify with latin'; SET @@session.character_set_database = latin1; Warnings: Warning 1681 Updating 'character_set_database' is deprecated. It will be made read-only in a future release. LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/charset_utf8.txt' INTO TABLE t1; SELECT count(*) FROM t1 WHERE CHAR_LENGTH(a)>1; count(*) 2433 TRUNCATE TABLE t1; 'Verify with utf8'; SET @@session.character_set_database = utf8; Warnings: Warning 1681 Updating 'character_set_database' is deprecated. It will be made read-only in a future release. LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/charset_utf8.txt' INTO TABLE t1; SELECT count(*) FROM t1 WHERE CHAR_LENGTH(a)>1; count(*) 1 DROP TABLE IF EXISTS t1; SET GLOBAL character_set_server=latin5; CREATE DATABASE csdb CHARACTER SET = utf8; USE csdb; DROP DATABASE csdb; SELECT @@character_set_database; @@character_set_database latin5 SET @@global.character_set_database = @global_character_set_database; Warnings: Warning 1681 Updating 'character_set_database' is deprecated. It will be made read-only in a future release. SET @@session.character_set_database = @session_character_set_database; Warnings: Warning 1681 Updating 'character_set_database' is deprecated. It will be made read-only in a future release. SET @@session.character_set_server = @session_character_set_server; SET @@global.character_set_server = @global_character_set_server;