mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user