1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

check that table used in multi-update is unique added (BUG#5455)

This commit is contained in:
bell@sanja.is.com.ua
2004-09-08 13:39:15 +03:00
parent dab8918647
commit 0badc913bb
6 changed files with 70 additions and 20 deletions

View File

@@ -417,3 +417,14 @@ create table t3 (a int, primary key (a));
-- error 1109
delete t1,t3 from t1,t2 where t1.a=t2.a and t2.a=(select t3.a from t3 where t1.a=t3.a);
drop table t1, t2, t3;
#
# multi* unique updating table check
#
create table t1 (col1 int);
create table t2 (col1 int);
-- error 1093
update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1;
-- error 1093
delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1;
drop table t1,t2;