mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-32439 INSERT IGNORE on constraints result in ERROR rather than warning
INSERT IGNORE had a pecular undocumented case that when one row was inserted, there was an error rather than a warning. As LOAD DATA IGNORE, UPDATE IGNORE, INSERT IGNORE SELECT, and INSERT IGNORE VALUES (single row, for foreign key violation) all behave the same way with a warning lets keep the behaviour normalized. In compatibility, previously a error was generated, now a warning is generated. This behaviour is now consistent with MySQL-8.0 too.
This commit is contained in:
@ -1129,11 +1129,7 @@ bool mysql_insert(THD *thd, TABLE_LIST *table_list,
|
||||
}
|
||||
}
|
||||
|
||||
if ((res= table_list->view_check_option(thd,
|
||||
(values_list.elements == 1 ?
|
||||
0 :
|
||||
ignore))) ==
|
||||
VIEW_CHECK_SKIP)
|
||||
if ((res= table_list->view_check_option(thd, ignore)) == VIEW_CHECK_SKIP)
|
||||
continue;
|
||||
else if (res == VIEW_CHECK_ERROR)
|
||||
{
|
||||
|
Reference in New Issue
Block a user