From e1cd282ea2d43b68468f22319affd152447919bb Mon Sep 17 00:00:00 2001 From: "ingo@mysql.com" <> Date: Tue, 22 Jun 2004 17:27:57 +0200 Subject: bug#2688 - Wrong index_merge query results for BDB table with variable length primary key. dded code to clear the tail of the reference buffer if the actual key length is less than the maximum key length. --- mysql-test/r/bdb.result | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mysql-test/r/bdb.result') diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index 2ccb5148d58..7d4b42e6a8c 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1190,3 +1190,21 @@ a A a drop table t1; +create table t1 ( +pk1 varchar(8) not null default '', +pk2 varchar(4) not null default '', +key1 int(11) default null, +key2 int(11) default null, +primary key (pk1,pk2), +key key1 (key1), +key key2 (key2)) engine=bdb; +insert into t1 values ('','empt',2,2), ('a','a--a',2,2), +('bb','b--b',2,2), ('ccc','c--c',2,2), ('dddd','d--d',2,2); +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 pk2 key1 key2 + empt 2 2 +a a--a 2 2 +bb b--b 2 2 +ccc c--c 2 2 +dddd d--d 2 2 +drop table t1; -- cgit v1.2.1 From 9f45c9e399ec93239c1caaed94fdf146eac84b46 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Wed, 23 Jun 2004 21:26:34 +0200 Subject: followup to handler cleanup --- mysql-test/r/bdb.result | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysql-test/r/bdb.result') diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index a544bbbf0b7..f15862be5db 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1181,3 +1181,12 @@ a A a drop table t1; +set autocommit=0; +create table t1(b varchar(30)) engine=bdb; +insert into t1 values ('one'); +commit; +select b FROM t1 outer_table where +exists (select 'two' from t1 where 'two' = outer_table.b); +b +drop table t1; +set autocommit=1; -- cgit v1.2.1 From fa86cada0c058773e1826d7dbbbf1e5d39f4f91f Mon Sep 17 00:00:00 2001 From: "ingo@mysql.com" <> Date: Thu, 24 Jun 2004 14:54:28 +0200 Subject: bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash. Added put_length() to get_length() and unpack_key() to pack_key(). Keys were packed with the minimum size of the length field for the key part and unpacked with length size of the base column. For the purpose of optimal key packing we have the method pack_key(), while rows are packed with pack(). Now keys are unpacked with unpack_key() and no longer with unpack() which is used for rows. --- mysql-test/r/bdb.result | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mysql-test/r/bdb.result') diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index 2ccb5148d58..684efa722ff 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1190,3 +1190,19 @@ a A a drop table t1; +create table t1( +pk1 text not null, pk2 text not null, pk3 char(4), +key1 int, key2 int, +primary key(pk1(4), pk2(4), pk3), key(key1), key(key2) +) engine=bdb; +insert into t1 values (concat('aaa-', repeat('A', 4000)), +concat('eee-', repeat('e', 4000)), 'a++a', 1, 1); +insert into t1 values (concat('bbb-', repeat('B', 4000)), +concat('ggg-', repeat('G', 4000)), 'b++b', 1, 1); +select substring(pk1, 1, 4), substring(pk1, 4001), +substring(pk2, 1, 4), substring(pk2, 4001), pk3, key1, key2 +from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +substring(pk1, 1, 4) substring(pk1, 4001) substring(pk2, 1, 4) substring(pk2, 4001) pk3 key1 key2 +aaa- AAAA eee- eeee a++a 1 1 +bbb- BBBB ggg- GGGG b++b 1 1 +drop table t1; -- cgit v1.2.1 From 1ff21a9e64da5ce5b6bc7462e807711859617088 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Thu, 24 Jun 2004 19:46:50 +0200 Subject: bug#4089 - JOIN::join_free calling mysql_unlock w/o index_end() before --- mysql-test/r/bdb.result | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mysql-test/r/bdb.result') diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index f15862be5db..cc6a974b192 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1190,3 +1190,23 @@ exists (select 'two' from t1 where 'two' = outer_table.b); b drop table t1; set autocommit=1; +create table t1(a int primary key, b varchar(30)) engine=bdb; +insert into t1 values (1,'one'), (2,'two'), (3,'three'), (4,'four'); +create table t2 like t1; +insert t2 select * from t1; +select a from t1 where a in (select a from t2); +a +1 +2 +3 +4 +delete from t2; +insert into t2 (a, b) +select a, b from t1 where (a, b) in (select a, b from t1); +select * from t2; +a b +1 one +2 two +3 three +4 four +drop table t1, t2; -- cgit v1.2.1 From c0c1c3200a1dc23e12ef1135f549ad1ec8e524de Mon Sep 17 00:00:00 2001 From: "ram@gw.mysql.r18.ru" <> Date: Tue, 29 Jun 2004 13:49:50 +0500 Subject: a fix (bug #4304: TRUNCATE