summaryrefslogtreecommitdiff
path: root/mysql-test/r/delete.result
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2003-11-17 22:45:07 +0200
committerbell@sanja.is.com.ua <>2003-11-17 22:45:07 +0200
commit5327ec1d09223209411c8329180e3f29267e4427 (patch)
tree0afc7fc182790f9282c8f5ecaaf1f5820b073d45 /mysql-test/r/delete.result
parent74165e729c96dda680f56de8263ba5e841ebbd5d (diff)
downloadmariadb-git-5327ec1d09223209411c8329180e3f29267e4427.tar.gz
IGNORE option was added for DELETE statement (WL#1334)
Diffstat (limited to 'mysql-test/r/delete.result')
-rw-r--r--mysql-test/r/delete.result64
1 files changed, 63 insertions, 1 deletions
diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result
index cd45cf03853..62724c19576 100644
--- a/mysql-test/r/delete.result
+++ b/mysql-test/r/delete.result
@@ -1,4 +1,4 @@
-drop table if exists t1;
+drop table if exists t1,t11,t12,t2;
CREATE TABLE t1 (a tinyint(3), b tinyint(5));
INSERT INTO t1 VALUES (1,1);
INSERT LOW_PRIORITY INTO t1 VALUES (1,2);
@@ -58,3 +58,65 @@ select count(*) from t1;
count(*)
0
drop table t1;
+create table t11 (a int NOT NULL, b int, primary key (a));
+create table t12 (a int NOT NULL, b int, primary key (a));
+create table t2 (a int NOT NULL, b int, primary key (a));
+insert into t11 values (0, 10),(1, 11),(2, 12);
+insert into t12 values (33, 10),(0, 11),(2, 12);
+insert into t2 values (1, 21),(2, 12),(3, 23);
+select * from t11;
+a b
+0 10
+1 11
+2 12
+select * from t12;
+a b
+33 10
+0 11
+2 12
+select * from t2;
+a b
+1 21
+2 12
+3 23
+delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a);
+ERROR 21000: Subquery returns more than 1 row
+select * from t11;
+a b
+0 10
+1 11
+2 12
+select * from t12;
+a b
+33 10
+0 11
+2 12
+delete ignore t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a);
+Warnings:
+Error 1241 Subquery returns more than 1 row
+Error 1241 Subquery returns more than 1 row
+select * from t11;
+a b
+0 10
+1 11
+select * from t12;
+a b
+33 10
+0 11
+insert into t11 values (2, 12);
+delete from t11 where t11.b <> (select b from t2 where t11.a < t2.a);
+ERROR 21000: Subquery returns more than 1 row
+select * from t11;
+a b
+0 10
+1 11
+2 12
+delete ignore from t11 where t11.b <> (select b from t2 where t11.a < t2.a);
+Warnings:
+Error 1241 Subquery returns more than 1 row
+Error 1241 Subquery returns more than 1 row
+select * from t11;
+a b
+0 10
+1 11
+drop table t11, t12, t2;