Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.1.21
    • Fix Version/s: 10.1.22, 10.2.5
    • Component/s: Triggers
    • Labels:
      None
    • Environment:
      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

            Activity

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                crishoj Christian Rishøj
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: