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

Provide index of error causing error in array INSERT

    XMLWordPrintable

Details

    Description

      When executing a multi-row INSERT using array notation, i.e.:

      INSERT INTO sometable VALUES(1,'a'),(2,'b'),(3,'c);
      

      If there is an error in this statement for example a PRIMARY KEY error, then there is no way of knowing which element in the array caused the error. This really limits the usefulness of array INSERTs which is an issue as this is a really good way to increase INSERT performance.

      The suggestion is to add the ability to find the index of the value with an issue by adding a new function to the API. This also need to be made available through Stored Procedures so maybe it should be complemented with a SQL-function. In addition, one such function will also be necessary, for the same reason, for prepared statements.

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              karlsson Anders Karlsson
              Votes:
              1 Vote for this issue
              Watchers:
              11 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.