diff options
author | unknown <jimw@mysql.com> | 2005-12-12 10:11:56 -0800 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-12-12 10:11:56 -0800 |
commit | d6e5fdf08ab5d78b31587f9847d29c8d46f171e6 (patch) | |
tree | bbcd25d2b7951525f91290ea07d709f48525c788 /mysql-test | |
parent | 95cabee1dc3a6d44a7e7a4c74c0bd49e00047f5b (diff) | |
parent | ab597139a7e96d8e3194739299b9dbde5a6cf961 (diff) | |
download | mariadb-git-d6e5fdf08ab5d78b31587f9847d29c8d46f171e6.tar.gz |
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysql-test/r/bdb.result:
Resolve conflicts
mysql-test/t/bdb.test:
Resolve conflicts
sql/sql_delete.cc:
Resolve conflicts
sql/sql_insert.cc:
Resolve conflicts
sql/sql_update.cc:
Resolve conflicts
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/bdb.result | 19 | ||||
-rw-r--r-- | mysql-test/t/bdb.test | 20 |
2 files changed, 38 insertions, 1 deletions
diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index ac14f891622..a564fd1045c 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1289,6 +1289,25 @@ SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterd"); id 4 DROP TABLE t1; +create table t1 (a int, key(a)) engine=bdb; +create table t2 (b int, key(b)) engine=bdb; +insert into t1 values (1),(1),(2),(3),(4); +insert into t2 values (1),(5),(6),(7); +delete from t1 where (a in (select b from t2)); +select count(*) from t1; +count(*) +3 +insert into t1 set a=(select b from t2); +ERROR 21000: Subquery returns more than 1 row +select count(*) from t1; +count(*) +3 +update t1 set a = a + 1 where (a in (select b from t2)); +select count(*) from t1; +count(*) +3 +drop table t1, t2; +End of 4.1 tests create temporary table t1 (a int, primary key(a)) engine=bdb; select * from t1; a diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test index 72b3ee89ed5..d3068b29e28 100644 --- a/mysql-test/t/bdb.test +++ b/mysql-test/t/bdb.test @@ -938,7 +938,25 @@ SELECT id FROM t1 WHERE (list_id = 1) AND (term = "lettera"); SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterd"); DROP TABLE t1; -# End of 4.1 tests +# +# Bug #15536: Crash when DELETE with subquery using BDB tables +# +create table t1 (a int, key(a)) engine=bdb; +create table t2 (b int, key(b)) engine=bdb; +insert into t1 values (1),(1),(2),(3),(4); +insert into t2 values (1),(5),(6),(7); +delete from t1 where (a in (select b from t2)); +select count(*) from t1; +# INSERT also blows up +--error 1242 +insert into t1 set a=(select b from t2); +select count(*) from t1; +# UPDATE also blows up +update t1 set a = a + 1 where (a in (select b from t2)); +select count(*) from t1; +drop table t1, t2; + +--echo End of 4.1 tests # # alter temp table |