List:Commits« Previous MessageNext Message »
From:kgeorge Date:April 27 2006 8:26am
Subject:bk commit into 5.0 tree (gkodinov:1.2099)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kgeorge. When kgeorge 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.2099 06/04/27 11:25:57 gkodinov@stripped +3 -0
  Merge mysql.com:/home/kgeorge/mysql/4.1/B16699
  into  mysql.com:/home/kgeorge/mysql/5.0/B19080

  sql/field.cc
    1.305 06/04/27 11:25:52 gkodinov@stripped +11 -0
    Merged with the same change

  mysql-test/r/ctype_utf8.result
    1.87 06/04/27 11:25:52 gkodinov@stripped +15 -15
    moved the test at the end of the tree

  mysql-test/t/ctype_utf8.test
    1.80 06/04/27 11:05:09 gkodinov@stripped +0 -0
    Auto merged

# 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:	gkodinov
# Host:	rakia.progem.bg
# Root:	/home/kgeorge/mysql/5.0/B19080/RESYNC

--- 1.304/sql/field.cc	2006-04-11 00:29:55 +03:00
+++ 1.305/sql/field.cc	2006-04-27 11:25:52 +03:00
@@ -6063,6 +6063,17 @@
   }
   else
     a_len= b_len= field_length;
+
+  if (field_charset->strxfrm_multiply > 1)
+  {
+    /*
+      We have to remove end space to be able to compare multi-byte-characters
+      like in latin_de 'ae' and 0xe4
+    */
+    return field_charset->coll->strnncollsp(field_charset,
+                                            (const uchar*) a_ptr, a_len,
+                                            (const uchar*) b_ptr, b_len);
+  }
   return my_strnncoll(field_charset,(const uchar*) a_ptr, a_len,
                                     (const uchar*) b_ptr, b_len);
 }

--- 1.86/mysql-test/r/ctype_utf8.result	2006-03-30 16:14:51 +03:00
+++ 1.87/mysql-test/r/ctype_utf8.result	2006-04-27 11:25:52 +03:00
@@ -1221,3 +1221,18 @@
 execute my_stmt using @a;
 a	b
 drop table if exists t1;
+CREATE TABLE t1 (
+a int(10) unsigned NOT NULL auto_increment,
+b varchar(32) CHARACTER SET utf8 collate utf8_unicode_ci,
+c tinyint(3) unsigned NOT NULL default '0',
+PRIMARY KEY  (a)
+);
+INSERT INTO t1 VALUES (19, 'f1861d224d31df52586103f701e1b462', 0);
+INSERT INTO t1 VALUES (20, 'ffffffffffffffffffffffffffffffff', 0);
+CREATE INDEX b ON t1(b(10));
+UPDATE t1 SET c=1 WHERE b='f1861d224d31df52586103f701e1b462';
+select c from t1;
+c
+1
+0
+drop table t1;

--- 1.79/mysql-test/t/ctype_utf8.test	2006-03-30 15:58:06 +03:00
+++ 1.80/mysql-test/t/ctype_utf8.test	2006-04-27 11:05:09 +03:00
@@ -912,6 +912,27 @@
 check table t1;
 drop table t1;
 
+#
+# Bug#19080: Sub_part indexes on utf8 varchar fields are broken for UPDATE
+#
+
+CREATE TABLE t1 (
+  a int(10) unsigned NOT NULL auto_increment,
+  b varchar(32) CHARACTER SET utf8 collate utf8_unicode_ci,
+  c tinyint(3) unsigned NOT NULL default '0',
+  PRIMARY KEY  (a)
+);
+
+INSERT INTO t1 VALUES (19, 'f1861d224d31df52586103f701e1b462', 0);
+INSERT INTO t1 VALUES (20, 'ffffffffffffffffffffffffffffffff', 0);
+CREATE INDEX b ON t1(b(10));
+
+UPDATE t1 SET c=1 WHERE b='f1861d224d31df52586103f701e1b462';
+
+select c from t1;
+
+drop table t1;
+
 # End of 4.1 tests
 
 #
Thread
bk commit into 5.0 tree (gkodinov:1.2099)kgeorge27 Apr