Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.1.21
-
None
-
Ubuntu 16.04.2 LTS
Description
The following test case reproduces an issue where an INSERT is silently ignored by MariaDB. Rather than actually inserting the row, or reporting a foreign key error, the insert apparently succeeds with the spurious message "0 rows affected".
Actual result from the last two INSERTs in the attached SQL script:
Query OK, 0 rows affected (0.00 sec) |
|
Query OK, 0 rows affected (0.00 sec) |
After dropping the trigger, the INSERTs work as expected:
Query OK, 1 row affected, 3 warnings (0.01 sec)
|
|
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`test`.`supplierItems`, CONSTRAINT `supplierItems_ibfk_2` FOREIGN KEY (`itemId`) REFERENCES `items` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) |
Attachments
Issue Links
- is duplicated by
-
MDEV-11842 Fail to insert on a table where a field has no default
- Closed