List:Commits« Previous MessageNext Message »
From:Staale Smedseng Date:January 21 2009 10:20am
Subject:bzr commit into mysql-6.0-bugteam branch (staale.smedseng:2970) Bug#27208
View as plain text  
#At file:///export/home/tmp/ss156133/z/b27208-60/

 2970 Staale Smedseng	2009-01-21 [merge]
      Adding a test to verify that Bug#27208 "If no current database,
      character_set_database !=character_set_server" is fixed.
modified:
  mysql-test/r/character_set_database_func.result
  mysql-test/t/character_set_database_func.test

=== modified file 'mysql-test/r/character_set_database_func.result'
--- a/mysql-test/r/character_set_database_func.result	2008-04-14 15:21:18 +0000
+++ b/mysql-test/r/character_set_database_func.result	2009-01-20 15:59:20 +0000
@@ -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_LENGT
 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;

=== modified file 'mysql-test/t/character_set_database_func.test'
--- a/mysql-test/t/character_set_database_func.test	2008-04-16 08:23:07 +0000
+++ b/mysql-test/t/character_set_database_func.test	2009-01-20 15:59:20 +0000
@@ -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_LENGT
 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  #
 ############################################################

Thread
bzr commit into mysql-6.0-bugteam branch (staale.smedseng:2970) Bug#27208Staale Smedseng21 Jan