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.2316 05/06/07 13:56:42 bar@stripped +3 -0
Bug#10253: compound index length and utf8 char set
produces invalid query results
mi_key.c:
well_formed_length should be executed before space trimming, not after.
ctype_utf8.test:
ctype_utf8.result:
adding test.
mysql-test/t/ctype_utf8.test
1.54 05/06/07 13:55:46 bar@stripped +14 -0
adding test.
mysql-test/r/ctype_utf8.result
1.54 05/06/07 13:55:38 bar@stripped +11 -0
adding test.
adding test.
myisam/mi_key.c
1.34 05/06/07 13:54:51 bar@stripped +3 -3
Bug#10253: ompound index length and utf8 char set produces invalid query results
well_formed_length should be executed before space trimming, not after.
# 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.33/myisam/mi_key.c 2005-05-14 01:34:05 +05:00
+++ 1.34/myisam/mi_key.c 2005-06-07 13:54:51 +05:00
@@ -84,7 +84,8 @@
pos= (byte*) record+keyseg->start;
if (keyseg->flag & HA_SPACE_PACK)
{
- end=pos+length;
+ FIX_LENGTH(cs, pos, length, char_length);
+ end= pos + char_length;
if (type != HA_KEYTYPE_NUM)
{
while (end > pos && end[-1] == ' ')
@@ -95,8 +96,7 @@
while (pos < end && pos[0] == ' ')
pos++;
}
- length=(uint) (end-pos);
- FIX_LENGTH(cs, pos, length, char_length);
+ char_length= (uint) (end - pos);
store_key_length_inc(key,char_length);
memcpy((byte*) key,(byte*) pos,(size_t) char_length);
key+=char_length;
--- 1.53/mysql-test/r/ctype_utf8.result 2005-06-03 09:36:45 +05:00
+++ 1.54/mysql-test/r/ctype_utf8.result 2005-06-07 13:55:38 +05:00
@@ -891,3 +891,14 @@
create table t1 (a varchar(255)) default character set utf8;
insert into t1 values (1.0);
drop table t1;
+create table t1 (
+id int not null,
+city varchar(20) not null,
+key (city(7),id)
+) character set=utf8;
+insert into t1 values (1,'Durban North');
+insert into t1 values (2,'Durban');
+select * from t1 where city = 'Durban';
+id city
+2 Durban
+drop table t1;
--- 1.53/mysql-test/t/ctype_utf8.test 2005-06-03 09:36:38 +05:00
+++ 1.54/mysql-test/t/ctype_utf8.test 2005-06-07 13:55:46 +05:00
@@ -731,3 +731,17 @@
create table t1 (a varchar(255)) default character set utf8;
insert into t1 values (1.0);
drop table t1;
+
+#
+# Bug#10253 compound index length and utf8 char set
+# produces invalid query results
+#
+create table t1 (
+ id int not null,
+ city varchar(20) not null,
+ key (city(7),id)
+) character set=utf8;
+insert into t1 values (1,'Durban North');
+insert into t1 values (2,'Durban');
+select * from t1 where city = 'Durban';
+drop table t1;
| Thread |
|---|
| • bk commit into 4.1 tree (bar:1.2316) BUG#10253 | bar | 7 Jun |