1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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

@ -2732,38 +2732,6 @@ insert into m1 (a) values ((select max(a) from v1));
insert into m1 (a) values ((select max(a) from tmp, v1));
--error ER_UPDATE_TABLE_USED
update m1 set a = ((select max(a) from m1));
--error ER_UPDATE_TABLE_USED
update m1 set a = ((select max(a) from m2));
--error ER_UPDATE_TABLE_USED
update m1 set a = ((select max(a) from t1));
--error ER_UPDATE_TABLE_USED
update m1 set a = ((select max(a) from t2));
--error ER_UPDATE_TABLE_USED
update m1 set a = ((select max(a) from t3, m1));
--error ER_UPDATE_TABLE_USED
update m1 set a = ((select max(a) from t3, m2));
--error ER_UPDATE_TABLE_USED
update m1 set a = ((select max(a) from t3, t1));
--error ER_UPDATE_TABLE_USED
update m1 set a = ((select max(a) from t3, t2));
--error ER_UPDATE_TABLE_USED
update m1 set a = ((select max(a) from tmp, m1));
--error ER_UPDATE_TABLE_USED
update m1 set a = ((select max(a) from tmp, m2));
--error ER_UPDATE_TABLE_USED
update m1 set a = ((select max(a) from tmp, t1));
--error ER_UPDATE_TABLE_USED
update m1 set a = ((select max(a) from tmp, t2));
--error ER_VIEW_PREVENT_UPDATE
update m1 set a = ((select max(a) from v1));
--error ER_VIEW_PREVENT_UPDATE
update m1 set a = ((select max(a) from tmp, v1));
drop view v1;
drop temporary table tmp;
drop table t1, t2, t3, m1, m2;
@ -2948,4 +2916,3 @@ eval set global storage_engine=$default;
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc