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 /sql/sql_delete.cc | |
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 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 2985f7e04a0..a41831d1317 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -66,6 +66,9 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, DBUG_RETURN(1); } + if (thd->lex.duplicates == DUP_IGNORE) + thd->lex.select_lex.no_error= 1; + /* Test if the user wants to delete all rows */ if (!using_limit && const_cond && (!conds || conds->val_int()) && !(specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE))) |