List:Internals« Previous MessageNext Message »
From:bar Date:August 29 2005 1:49pm
Subject:bk commit into 4.1 tree (bar:1.2391) BUG#12371
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://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2391 05/08/29 16:49:01 bar@stripped +3 -0
  ctype_utf8.result, ctype_utf8.test, item.cc:
    Bug#12371 executing prepared statement fails (illegal mix of collations)
    After review fixes.

  mysql-test/r/ctype_utf8.result
    1.63 05/08/29 16:48:25 bar@stripped +3 -0
    Bug#12371 executing prepared statement fails (illegal mix of collations)
    After review fixes.

  mysql-test/t/ctype_utf8.test
    1.65 05/08/29 16:48:16 bar@stripped +2 -0
    Bug#12371 executing prepared statement fails (illegal mix of collations)
    After review fixes.

  sql/item.cc
    1.219 05/08/29 16:47:50 bar@stripped +7 -1
    Bug#12371 executing prepared statement fails (illegal mix of collations)
    After review fixes.

# 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.b12371

--- 1.218/sql/item.cc	2005-08-29 15:44:43 +05:00
+++ 1.219/sql/item.cc	2005-08-29 16:47:50 +05:00
@@ -290,7 +290,13 @@
   {
     Item_string *conv;
     uint conv_errors;
-    String tmp, cstr, *ostr= val_str(&tmp);
+    char buf[MAX_FIELD_WIDTH];
+    String tmp(buf, sizeof(buf), &my_charset_bin);
+    String cstr, *ostr= val_str(&tmp);
+    /*
+      As safe_charset_converter is not executed for
+      a parameter bound to NULL, ostr should never be 0.
+    */
     cstr.copy(ostr->ptr(), ostr->length(), ostr->charset(), tocs,
&conv_errors);
     if (conv_errors || !(conv= new Item_string(cstr.ptr(), cstr.length(),
                                                cstr.charset(),

--- 1.62/mysql-test/r/ctype_utf8.result	2005-08-06 16:57:25 +05:00
+++ 1.63/mysql-test/r/ctype_utf8.result	2005-08-29 16:48:25 +05:00
@@ -1001,6 +1001,9 @@
 execute my_stmt using @a;
 a	b
 bar	kostja
+set @a:=NULL;
+execute my_stmt using @a;
+a	b
 drop table t1;
 CREATE TABLE t1 (
 a varchar(255) NOT NULL default '',

--- 1.64/mysql-test/t/ctype_utf8.test	2005-08-06 16:57:12 +05:00
+++ 1.65/mysql-test/t/ctype_utf8.test	2005-08-29 16:48:16 +05:00
@@ -840,6 +840,8 @@
 prepare my_stmt from "select * from t1 where a=?";
 set @a:='bar';
 execute my_stmt using @a;
+set @a:=NULL;
+execute my_stmt using @a;
 drop table t1;
 
 
Thread
bk commit into 4.1 tree (bar:1.2391) BUG#12371bar29 Aug