1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-12874 UPDATE statements with the same source and target

This commit is contained in:
halfspawn
2017-09-26 11:52:31 +02:00
committed by Sergei Golubchik
parent 26ff92f7ac
commit 1a74d12da6
19 changed files with 1598 additions and 366 deletions

View File

@ -3714,34 +3714,6 @@ insert into m1 (a) values ((select max(a) from v1));
ERROR HY000: The definition of table 'v1' prevents operation INSERT on table 'm1'
insert into m1 (a) values ((select max(a) from tmp, v1));
ERROR HY000: The definition of table 'v1' prevents operation INSERT on table 'm1'
update m1 set a = ((select max(a) from m1));
ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
update m1 set a = ((select max(a) from m2));
ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
update m1 set a = ((select max(a) from t1));
ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
update m1 set a = ((select max(a) from t2));
ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
update m1 set a = ((select max(a) from t3, m1));
ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
update m1 set a = ((select max(a) from t3, m2));
ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
update m1 set a = ((select max(a) from t3, t1));
ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
update m1 set a = ((select max(a) from t3, t2));
ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
update m1 set a = ((select max(a) from tmp, m1));
ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
update m1 set a = ((select max(a) from tmp, m2));
ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
update m1 set a = ((select max(a) from tmp, t1));
ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
update m1 set a = ((select max(a) from tmp, t2));
ERROR HY000: Table 'm1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
update m1 set a = ((select max(a) from v1));
ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'm1'
update m1 set a = ((select max(a) from tmp, v1));
ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'm1'
drop view v1;
drop temporary table tmp;
drop table t1, t2, t3, m1, m2;