diff options
author | unknown <bell@sanja.is.com.ua> | 2003-11-17 22:45:07 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-11-17 22:45:07 +0200 |
commit | 900d00c866cda6c082b909bc257411f5bd57abd4 (patch) | |
tree | 0afc7fc182790f9282c8f5ecaaf1f5820b073d45 /mysql-test/t/delete.test | |
parent | 8fed6653de2c298704f9ee74f96f17184af46b45 (diff) | |
download | mariadb-git-900d00c866cda6c082b909bc257411f5bd57abd4.tar.gz |
IGNORE option was added for DELETE statement (WL#1334)
mysql-test/r/delete.result:
test of new IGNORE option for DELETE
mysql-test/r/subselect.result:
test moved to delete.test
mysql-test/t/delete.test:
test of new IGNORE option for DELETE
mysql-test/t/subselect.test:
test moved to delete.test
sql/sql_delete.cc:
set errors ignoring for simple delete command
sql/sql_yacc.yy:
add IGNORE option for DELETE command
Diffstat (limited to 'mysql-test/t/delete.test')
-rw-r--r-- | mysql-test/t/delete.test | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index f1f751d728b..c529994f31b 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -3,7 +3,7 @@ # --disable_warnings -drop table if exists t1; +drop table if exists t1,t11,t12,t2; --enable_warnings CREATE TABLE t1 (a tinyint(3), b tinyint(5)); INSERT INTO t1 VALUES (1,1); @@ -71,3 +71,30 @@ delete from t1 where 3 > 2; select count(*) from t1; drop table t1; + +# +# IGNORE option +# +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; +select * from t12; +select * from t2; +-- error 1241 +delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a); +select * from t11; +select * from t12; +delete ignore t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a); +select * from t11; +select * from t12; +insert into t11 values (2, 12); +-- error 1241 +delete from t11 where t11.b <> (select b from t2 where t11.a < t2.a); +select * from t11; +delete ignore from t11 where t11.b <> (select b from t2 where t11.a < t2.a); +select * from t11; +drop table t11, t12, t2; |