Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram 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.1871 05/04/21 21:06:08 ramil@stripped +3 -0
A fix (Bug #9489: Problem with BIT_OR and MySQL 5.0.3)
mysql-test/t/type_varchar.test
1.5 05/04/21 21:06:02 ramil@stripped +13 -1
A fix (Bug #9489: Problem with BIT_OR and MySQL 5.0.3)
mysql-test/r/type_varchar.result
1.5 05/04/21 21:06:02 ramil@stripped +10 -1
A fix (Bug #9489: Problem with BIT_OR and MySQL 5.0.3)
heap/hp_hash.c
1.39 05/04/21 21:06:02 ramil@stripped +11 -0
A fix (Bug #9489: Problem with BIT_OR and MySQL 5.0.3).
Should take into account key pack length.
# 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: ramil
# Host: gw.mysql.r18.ru
# Root: /usr/home/ram/work/5.0.b9489
--- 1.38/heap/hp_hash.c 2004-12-18 07:19:14 +04:00
+++ 1.39/heap/hp_hash.c 2005-04-21 21:06:02 +05:00
@@ -255,6 +255,9 @@
if (*pos) /* Found null */
{
nr^= (nr << 1) | 1;
+ /* Add key pack length (2) to key for VARCHAR segments */
+ if (seg->type == HA_KEYTYPE_VARTEXT1)
+ key+= 2;
continue;
}
pos++;
@@ -390,6 +393,9 @@
if (*pos)
{
nr^= (nr << 1) | 1;
+ /* Add key pack length (2) to key for VARCHAR segments */
+ if (seg->type == HA_KEYTYPE_VARTEXT1)
+ key+= 2;
continue;
}
pos++;
@@ -584,7 +590,12 @@
if (found_null != (int) *key++)
return 1;
if (found_null)
+ {
+ /* Add key pack length (2) to key for VARCHAR segments */
+ if (seg->type == HA_KEYTYPE_VARTEXT1)
+ key+= 2;
continue;
+ }
}
if (seg->type == HA_KEYTYPE_TEXT)
{
--- 1.4/mysql-test/r/type_varchar.result 2005-03-22 23:13:20 +04:00
+++ 1.5/mysql-test/r/type_varchar.result 2005-04-21 21:06:02 +05:00
@@ -1,4 +1,4 @@
-drop table if exists t1;
+drop table if exists t1, t2;
create table t1 (v varchar(30), c char(3), e enum('abc','def','ghi'), t text);
truncate table vchar;
show create table t1;
@@ -383,3 +383,12 @@
pkcol othercol
test somethingelse
drop table t1;
+create table t1 (a int, b varchar(12));
+insert into t1 values (1, 'A'), (22, NULL);
+create table t2 (a int);
+insert into t2 values (22), (22);
+select t1.a, t1.b, min(t1.b) from t1 inner join t2 ON t2.a = t1.a
+group by t1.b, t1.a;
+a b min(t1.b)
+22 NULL NULL
+drop table t1, t2;
--- 1.4/mysql-test/t/type_varchar.test 2005-03-22 23:12:59 +04:00
+++ 1.5/mysql-test/t/type_varchar.test 2005-04-21 21:06:02 +05:00
@@ -1,5 +1,5 @@
--disable_warnings
-drop table if exists t1;
+drop table if exists t1, t2;
--enable_warnings
create table t1 (v varchar(30), c char(3), e enum('abc','def','ghi'), t text);
@@ -106,3 +106,15 @@
update t1 set othercol='somethingelse' where pkcol='test';
select * from t1;
drop table t1;
+
+#
+# Bug #9489: problems with key handling
+#
+
+create table t1 (a int, b varchar(12));
+insert into t1 values (1, 'A'), (22, NULL);
+create table t2 (a int);
+insert into t2 values (22), (22);
+select t1.a, t1.b, min(t1.b) from t1 inner join t2 ON t2.a = t1.a
+ group by t1.b, t1.a;
+drop table t1, t2;
| Thread |
|---|
| • bk commit into 5.0 tree (ramil:1.1871) BUG#9489 | ramil | 21 Apr |