IGNORE is not a standalone command but an optional modifier supported by MySQL (and MariaDB) for INSERT, UPDATE, DELETE, LOAD DATA, ALTER TABLE, CREATE TABLE ... SELECT, and LOAD XML. When present, MySQL suppresses specific run-time errors (typically duplicate-key, foreign-key, or data-conversion violations) and continues executing the statement. Conflicting rows are discarded, and warnings are recorded in the client session (retrievable with SHOW WARNINGS). IGNORE is respected only if the server is not running in STRICT mode (sql_mode contains STRICT_*) or if strict checks are selectively disabled. If strict mode is enabled, IGNORE silently downgrades many errors to warnings but still aborts on problems that cannot be ignored (for example, out-of-range auto-increment values in InnoDB). Because IGNORE discards problematic rows, it can hide data issues; use with caution in production environments where data integrity is critical.
INSERT, REPLACE, ON DUPLICATE KEY UPDATE, sql_mode, SHOW WARNINGS, STRICT_ALL_TABLES
MySQL 3.23
REPLACE deletes the conflicting row and reinserts the new one, which can reset auto-increment values and trigger ON DELETE cascades. IGNORE simply skips the new row, leaving the existing data untouched.
Yes. DELETE IGNORE suppresses foreign-key constraint errors and deletes rows that can be removed, skipping those that cannot.
The client returns an affected-rows number that excludes ignored rows. Run SHOW WARNINGS to see each skipped row.
A small overhead exists for generating warnings, but it is usually negligible compared to the cost of the data operation itself.