diff options
author | unknown <monty@hundin.mysql.fi> | 2001-09-08 20:45:53 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-09-08 20:45:53 +0300 |
commit | 41f1dceafb4c5ceb40f5ca84b868ccc2b1306326 (patch) | |
tree | ace5d8956a44c55c16f2016294db718ae8fb43a1 /mysql-test/t/bdb.test | |
parent | 4f08177e13116532c71484e197518f1f2faac85b (diff) | |
download | mariadb-git-41f1dceafb4c5ceb40f5ca84b868ccc2b1306326.tar.gz |
Fix bugs when using LOCK TABLES with BDB tables
Optimized remove of key when using internal cursor in BDB tables.
mysql-test/r/bdb.result:
Test for LOCK bug
mysql-test/t/bdb.test:
Test for LOCK bug
sql/ha_berkeley.cc:
Fix bugs when using LOCK TABLES
Optimized remove of key when using internal cursor
sql/ha_berkeley.h:
Initilize of changed_rows
sql/lock.cc:
Fix for BDB tables
Diffstat (limited to 'mysql-test/t/bdb.test')
-rw-r--r-- | mysql-test/t/bdb.test | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test index 5e28c31e051..465dc9634cc 100644 --- a/mysql-test/t/bdb.test +++ b/mysql-test/t/bdb.test @@ -727,13 +727,24 @@ DROP TABLE t1,t2; # Test problem with joining table to itself on a multi-part unique key # -drop table if exists t; -create table t (a int(11) not null, b int(11) not null, unique (a,b)) type=bdb; - -insert into t values (1,1), (1,2); +drop table if exists t1; +create table t1 (a int(11) not null, b int(11) not null, unique (a,b)) type=bdb; +insert into t1 values (1,1), (1,2); +select * from t1 where a = 1; +select t1.*, t2.* from t1, t1 t2 where t1.a = t2.a and t2.a = 1; +select * from t1 where a = 1; +drop table t1; -select * from t where a = 1; -select t1.*, t2.* from t t1, t t2 where t1.a = t2.a and t2.a = 1; -select * from t where a = 1; +# +# This caused a deadlock in BDB internal locks +# -drop table t; +create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=bdb; +insert into t1 values (0,0,0,'ABCDEFGHIJ'); +create table t2 (id int NOT NULL,primary key (id)) type=bdb; +LOCK TABLES t1 WRITE, t2 WRITE; +insert into t2 values(1); +SELECT t1.* FROM t1 WHERE id IN (1); +SELECT t1.* FROM t2 left outer join t1 on (t1.id=t2.id); +delete from t1 where id3 >= 0 and id3 <= 0; +drop table t1,t2; |