Commit e456ef4b authored by Staale Smedseng's avatar Staale Smedseng

Adding a test to verify that Bug#27208 "If no current database,

character_set_database !=character_set_server" is fixed.
parent 2389815a
......@@ -2,6 +2,7 @@
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;
'connect (con1,localhost,root,,,,)'
'connection con1'
......@@ -71,6 +72,15 @@ SELECT count(*) FROM t1 WHERE CHAR_LENGTH(a)>1;
count(*)
1
DROP TABLE IF EXISTS t1;
'Bug#27208: If no current database, character_set_database !=character_set_server'
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;
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;
......@@ -29,6 +29,7 @@
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;
--echo 'connect (con1,localhost,root,,,,)'
......@@ -106,10 +107,30 @@ SELECT count(*) FROM t1 WHERE CHAR_LENGTH(a)>1;
DROP TABLE IF EXISTS t1;
--enable_warnings
#==============================================================================
--echo 'Bug#27208: If no current database, character_set_database !=character_set_server'
#==============================================================================
SET GLOBAL character_set_server=latin5;
connect (con2, localhost, root,,);
connection con2;
CREATE DATABASE csdb CHARACTER SET = utf8;
USE csdb;
DROP DATABASE csdb;
SELECT @@character_set_database;
connection default;
disconnect con2;
#restore
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;
############################################################
# End of functionality Testing for character_set_database #
############################################################
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment