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@stripped, 2007-06-06 13:08:49+03:00, gkodinov@stripped +3 -0
Bug#28878: InnoDB tables with UTF8 character set and indexes cause
wrong result for DML
When making key reference buffers over CHAR fields whitespace (0x32)
must be used to fill in the remaining space in the field's buffer.
This is what Field_string::store() does.
Fixed Field_string::get_key_image() to do the same.
mysql-test/r/innodb_mysql.result@stripped, 2007-06-06 13:08:47+03:00, gkodinov@stripped +36 -0
Bug#28878: test case
mysql-test/t/innodb_mysql.test@stripped, 2007-06-06 13:08:47+03:00, gkodinov@stripped +31 -0
Bug#28878: test case
sql/field.cc@stripped, 2007-06-06 13:08:47+03:00, gkodinov@stripped +2 -1
Bug#28878: Fill with space instead of binary zeros.
# 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: magare.gmz
# Root: /home/kgeorge/mysql/work/B28878-5.0-opt
--- 1.350/sql/field.cc 2007-05-30 22:27:51 +03:00
+++ 1.351/sql/field.cc 2007-06-06 13:08:47 +03:00
@@ -6249,7 +6249,8 @@ uint Field_string::get_key_image(char *b
length / field_charset->mbmaxlen);
memcpy(buff, ptr, bytes);
if (bytes < length)
- bzero(buff + bytes, length - bytes);
+ field_charset->cset->fill(field_charset, buff + bytes, length - bytes,
+ field_charset->pad_char);
return bytes;
}
--- 1.21/mysql-test/r/innodb_mysql.result 2007-05-15 23:10:55 +03:00
+++ 1.22/mysql-test/r/innodb_mysql.result 2007-06-06 13:08:47 +03:00
@@ -617,4 +617,40 @@ EXPLAIN SELECT COUNT(*) FROM t2 WHERE st
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range idx1,idx2 idx1 9 NULL 2 Using where; Using index
DROP TABLE t1,t2;
+CREATE TABLE t1 (a CHAR(2), KEY (a)) ENGINE = InnoDB DEFAULT CHARSET=UTF8;
+INSERT INTO t1 VALUES ('uk'),('bg');
+SELECT * FROM t1 WHERE a = 'uk';
+a
+uk
+DELETE FROM t1 WHERE a = 'uk';
+SELECT * FROM t1 WHERE a = 'uk';
+a
+UPDATE t1 SET a = 'us' WHERE a = 'uk';
+SELECT * FROM t1 WHERE a = 'uk';
+a
+CREATE TABLE t2 (a CHAR(2), KEY (a)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES ('uk'),('bg');
+SELECT * FROM t2 WHERE a = 'uk';
+a
+uk
+DELETE FROM t2 WHERE a = 'uk';
+SELECT * FROM t2 WHERE a = 'uk';
+a
+INSERT INTO t2 VALUES ('uk');
+UPDATE t2 SET a = 'us' WHERE a = 'uk';
+SELECT * FROM t2 WHERE a = 'uk';
+a
+CREATE TABLE t3 (a CHAR(2), KEY (a)) ENGINE = MyISAM;
+INSERT INTO t3 VALUES ('uk'),('bg');
+SELECT * FROM t3 WHERE a = 'uk';
+a
+uk
+DELETE FROM t3 WHERE a = 'uk';
+SELECT * FROM t3 WHERE a = 'uk';
+a
+INSERT INTO t3 VALUES ('uk');
+UPDATE t3 SET a = 'us' WHERE a = 'uk';
+SELECT * FROM t3 WHERE a = 'uk';
+a
+DROP TABLE t1,t2,t3;
End of 5.0 tests
--- 1.21/mysql-test/t/innodb_mysql.test 2007-05-15 23:10:55 +03:00
+++ 1.22/mysql-test/t/innodb_mysql.test 2007-06-06 13:08:47 +03:00
@@ -597,4 +597,35 @@ EXPLAIN SELECT COUNT(*) FROM t2 WHERE st
DROP TABLE t1,t2;
+#
+# Bug #25866: Getting "#HY000 Can't find record in..." on and INSERT
+#
+CREATE TABLE t1 (a CHAR(2), KEY (a)) ENGINE = InnoDB DEFAULT CHARSET=UTF8;
+INSERT INTO t1 VALUES ('uk'),('bg');
+SELECT * FROM t1 WHERE a = 'uk';
+DELETE FROM t1 WHERE a = 'uk';
+SELECT * FROM t1 WHERE a = 'uk';
+UPDATE t1 SET a = 'us' WHERE a = 'uk';
+SELECT * FROM t1 WHERE a = 'uk';
+
+CREATE TABLE t2 (a CHAR(2), KEY (a)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES ('uk'),('bg');
+SELECT * FROM t2 WHERE a = 'uk';
+DELETE FROM t2 WHERE a = 'uk';
+SELECT * FROM t2 WHERE a = 'uk';
+INSERT INTO t2 VALUES ('uk');
+UPDATE t2 SET a = 'us' WHERE a = 'uk';
+SELECT * FROM t2 WHERE a = 'uk';
+
+CREATE TABLE t3 (a CHAR(2), KEY (a)) ENGINE = MyISAM;
+INSERT INTO t3 VALUES ('uk'),('bg');
+SELECT * FROM t3 WHERE a = 'uk';
+DELETE FROM t3 WHERE a = 'uk';
+SELECT * FROM t3 WHERE a = 'uk';
+INSERT INTO t3 VALUES ('uk');
+UPDATE t3 SET a = 'us' WHERE a = 'uk';
+SELECT * FROM t3 WHERE a = 'uk';
+
+DROP TABLE t1,t2,t3;
+
--echo End of 5.0 tests
| Thread |
|---|
| • bk commit into 5.0 tree (gkodinov:1.2514) BUG#28878 | kgeorge | 6 Jun |