Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-36191

Multi-row insert fails on table with update before trigger

Details

    Description

      Inserting multiple rows into a table from another table fails, when the targeted table has also an update before trigger on another column.

      See following examples where one_row_query inserts one value and works perfectly fine, two_rows_query tries to insert two values and fails with "SQL Error (1048): Column 'Id' cannot be null" and two_values_query inserts the same two values but provided within the query and succeeds.

      The only workaround I found was to delete and readd the trigger like I did in workaround_query.

      This only happens since 10.11.11 in 10.11.10 the two_rows_query works fine.

      Attachments

        1. one_row_query.sql
          0.1 kB
        2. test_database.sql
          2 kB
        3. two_rows_query.sql
          0.1 kB
        4. two_values_query.sql
          0.1 kB
        5. workaround_query.sql
          0.5 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              FBI Fabian Biller
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.