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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user