diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-10-04 10:28:20 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-10-04 10:28:20 +0200 |
commit | 9584c6753e7e63ca18aaea59cde4efaa036b6944 (patch) | |
tree | 965d81a9a3bbddf554e802b6ba3258349ce8c22d | |
parent | 61b2618d3aae78950f1b8dbe8d4482573c77875d (diff) | |
download | mariadb-git-9584c6753e7e63ca18aaea59cde4efaa036b6944.tar.gz |
MDEV-12874 UPDATE statements with the same source and target
update engine tests
4 files changed, 0 insertions, 18 deletions
diff --git a/mysql-test/suite/engines/funcs/r/sq_error.result b/mysql-test/suite/engines/funcs/r/sq_error.result index 2090f4b9cd4..6b00bf6c921 100644 --- a/mysql-test/suite/engines/funcs/r/sq_error.result +++ b/mysql-test/suite/engines/funcs/r/sq_error.result @@ -15,8 +15,6 @@ ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOM SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); ERROR 21000: Subquery returns more than 1 row UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); -UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); -ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data DROP TABLE t1; DROP TABLE t2; CREATE TABLE t1 (c1 INT, c2 VARCHAR(100),c3 FLOAT); @@ -34,8 +32,6 @@ ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOM SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); ERROR 21000: Subquery returns more than 1 row UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); -UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); -ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data DROP TABLE t1; DROP TABLE t2; CREATE TABLE t1 (c1 INT, c2 BINARY(100),c3 FLOAT); @@ -53,8 +49,6 @@ ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOM SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); ERROR 21000: Subquery returns more than 1 row UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); -UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); -ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data DROP TABLE t1; DROP TABLE t2; CREATE TABLE t1 (c1 INT, c2 VARBINARY(100),c3 FLOAT); @@ -72,7 +66,5 @@ ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOM SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); ERROR 21000: Subquery returns more than 1 row UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); -UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); -ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/engines/funcs/t/sq_error.test b/mysql-test/suite/engines/funcs/t/sq_error.test index a9b72008c74..6776e92be63 100644 --- a/mysql-test/suite/engines/funcs/t/sq_error.test +++ b/mysql-test/suite/engines/funcs/t/sq_error.test @@ -19,8 +19,6 @@ SELECT (SELECT c1, c2 FROM t2) FROM t1; --error 1242 SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); ---error 1093 -UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); DROP TABLE t1; DROP TABLE t2; CREATE TABLE t1 (c1 INT, c2 VARCHAR(100),c3 FLOAT); @@ -38,8 +36,6 @@ SELECT (SELECT c1, c2 FROM t2) FROM t1; --error 1242 SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); ---error 1093 -UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); DROP TABLE t1; DROP TABLE t2; CREATE TABLE t1 (c1 INT, c2 BINARY(100),c3 FLOAT); @@ -57,8 +53,6 @@ SELECT (SELECT c1, c2 FROM t2) FROM t1; --error 1242 SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); ---error 1093 -UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); DROP TABLE t1; DROP TABLE t2; CREATE TABLE t1 (c1 INT, c2 VARBINARY(100),c3 FLOAT); @@ -76,8 +70,6 @@ SELECT (SELECT c1, c2 FROM t2) FROM t1; --error 1242 SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); ---error 1093 -UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/engines/iuds/r/update_delete_number.result b/mysql-test/suite/engines/iuds/r/update_delete_number.result index ef9d9ff0d34..b091d27d1e6 100644 --- a/mysql-test/suite/engines/iuds/r/update_delete_number.result +++ b/mysql-test/suite/engines/iuds/r/update_delete_number.result @@ -980,7 +980,6 @@ drop table mt1, mt2, mt3; create table mt1 (col1 int); create table mt2 (col1 int); update mt1,mt2 set mt1.col1 = (select max(col1) from mt1) where mt1.col1 = mt2.col1; -ERROR HY000: Table 'mt1' is specified twice, both as a target for 'UPDATE' and as a separate source for data delete mt1 from mt1,mt2 where mt1.col1 < (select max(col1) from mt1) and mt1.col1 = mt2.col1; ERROR HY000: Table 'mt1' is specified twice, both as a target for 'DELETE' and as a separate source for data drop table mt1,mt2; diff --git a/mysql-test/suite/engines/iuds/t/update_delete_number.test b/mysql-test/suite/engines/iuds/t/update_delete_number.test index c58746d59f4..ce3f90140b2 100644 --- a/mysql-test/suite/engines/iuds/t/update_delete_number.test +++ b/mysql-test/suite/engines/iuds/t/update_delete_number.test @@ -495,7 +495,6 @@ drop table mt1, mt2, mt3; # multi* unique updating table check create table mt1 (col1 int); create table mt2 (col1 int); --- error ER_UPDATE_TABLE_USED update mt1,mt2 set mt1.col1 = (select max(col1) from mt1) where mt1.col1 = mt2.col1; -- error ER_UPDATE_TABLE_USED delete mt1 from mt1,mt2 where mt1.col1 < (select max(col1) from mt1) and mt1.col1 = mt2.col1; |