List:Internals« Previous MessageNext Message »
From:bar Date:July 6 2004 12:15pm
Subject:bk commit into 4.1 tree (bar:1.1967)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of bar. When bar does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.1967 04/07/06 17:15:43 bar@stripped +3 -0
  Bug#4417 binary character set breaks multi-byte table/field name.

  sql/sql_class.cc
    1.171 04/07/06 17:15:33 bar@stripped +8 -6
    Bug#4417 binary character set breaks multi-byte table/field name.

  mysql-test/t/ctype_recoding.test
    1.14 04/07/06 17:15:33 bar@stripped +19 -0
    Bug#4417 binary character set breaks multi-byte table/field name.

  mysql-test/r/ctype_recoding.result
    1.19 04/07/06 17:15:33 bar@stripped +25 -0
    Bug#4417 binary character set breaks multi-byte table/field name.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	bar
# Host:	bar.intranet.mysql.r18.ru
# Root:	/usr/home/bar/mysql-4.1

--- 1.170/sql/sql_class.cc	2004-06-21 12:21:52 +05:00
+++ 1.171/sql/sql_class.cc	2004-07-06 17:15:33 +05:00
@@ -533,19 +533,21 @@
   return FALSE;
 }
 
+
 /*
   Update some cache variables when character set changes
 */
 
 void THD::update_charset()
 {
-  charset_is_system_charset= my_charset_same(charset(),system_charset_info);
-  charset_is_collation_connection= my_charset_same(charset(),
-						   variables.
-						   collation_connection);
+  uint32 not_used;
+  charset_is_system_charset= !String::needs_conversion(0,charset(),
+                                                       system_charset_info,
+                                                       &not_used);
+  charset_is_collation_connection= 
+    !String::needs_conversion(0,charset(),variables.collation_connection,
+                              &not_used);
 }
-
-
 
 
 /* routings to adding tables to list of changed in transaction tables */

--- 1.18/mysql-test/r/ctype_recoding.result	2004-05-11 02:15:55 +05:00
+++ 1.19/mysql-test/r/ctype_recoding.result	2004-07-06 17:15:33 +05:00
@@ -111,3 +111,28 @@
 F2E5F1F2
+USE test;
+SET NAMES binary;
+CREATE TABLE `тест` (`тест` int);
+SHOW CREATE TABLE `тест`;
+Table	Create Table
+тест	CREATE TABLE `тест` (
+  `тест` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SET NAMES utf8;
+SHOW CREATE TABLE `тест`;
+Table	Create Table
+тест	CREATE TABLE `тест` (
+  `тест` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE `тест`;
+SET NAMES binary;
+SET character_set_connection=utf8;
+SELECT 'тест' as s;
+s
+тест
+SET NAMES utf8;
+SET character_set_connection=binary;
+SELECT 'тест' as s;
+s
+тест

--- 1.13/mysql-test/t/ctype_recoding.test	2004-05-11 02:15:55 +05:00
+++ 1.14/mysql-test/t/ctype_recoding.test	2004-07-06 17:15:33 +05:00
@@ -78,3 +78,22 @@
 SET character_set_connection=cp1251;
+
+USE test;
+
+# Bug#4417
+# Check that identifiers and strings are not converted 
+# when the client character set is binary.
+
+SET NAMES binary;
+CREATE TABLE `тест` (`тест` int);
+SHOW CREATE TABLE `тест`;
+SET NAMES utf8;
+SHOW CREATE TABLE `тест`;
+DROP TABLE `тест`;
+SET NAMES binary;
+SET character_set_connection=utf8;
+SELECT 'тест' as s;
+SET NAMES utf8;
+SET character_set_connection=binary;
+SELECT 'тест' as s;
Thread
bk commit into 4.1 tree (bar:1.1967)bar6 Jul