Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • 10.7.1
    • Server
    • None

    Description

      can be discussed

      The initially suggested ROW_NUMBER was intuitively understandable, but ERROR_INDEX in the final implementation is not. It is not necessarily an error, and it is certainly not its index.

      MariaDB [test]> insert ignore into t1 (pk) values (1),(1);
      Query OK, 1 row affected, 1 warning (0.017 sec)
      Records: 2  Duplicates: 1  Warnings: 1
       
      MariaDB [test]> show warnings;
      +---------+------+---------------------------------------+
      | Level   | Code | Message                               |
      +---------+------+---------------------------------------+
      | Warning | 1062 | Duplicate entry '1' for key 'PRIMARY' |
      +---------+------+---------------------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [test]>  get diagnostics condition 1 @num = ERROR_INDEX, @msg = MESSAGE_TEXT; select @num, @msg;
      Query OK, 0 rows affected (0.000 sec)
       
      +------+---------------------------------------+
      | @num | @msg                                  |
      +------+---------------------------------------+
      |    2 | Duplicate entry '1' for key 'PRIMARY' |
      +------+---------------------------------------+
      1 row in set (0.000 sec)
      

      If something is an "index" here, it's the condition number (1), but the failing row number is 2. And it's a warning.

      Attachments

        Issue Links

          Activity

            serg Sergei Golubchik created issue -
            serg Sergei Golubchik made changes -
            Field Original Value New Value
            serg Sergei Golubchik made changes -
            Description _can be discussed_
            {quote}
            A note unrelated to the previous one
            The initially suggested {{ROW_NUMBER}} was intuitively understandable, but {{ERROR_INDEX}} in the final implementation is not. It is not necessarily an error, and it is certainly not its index.
            {code:sql}
            MariaDB [test]> insert ignore into t1 (pk) values (1),(1);
            Query OK, 1 row affected, 1 warning (0.017 sec)
            Records: 2 Duplicates: 1 Warnings: 1

            MariaDB [test]> show warnings;
            +---------+------+---------------------------------------+
            | Level | Code | Message |
            +---------+------+---------------------------------------+
            | Warning | 1062 | Duplicate entry '1' for key 'PRIMARY' |
            +---------+------+---------------------------------------+
            1 row in set (0.000 sec)

            MariaDB [test]> get diagnostics condition 1 @num = ERROR_INDEX, @msg = MESSAGE_TEXT; select @num, @msg;
            Query OK, 0 rows affected (0.000 sec)

            +------+---------------------------------------+
            | @num | @msg |
            +------+---------------------------------------+
            | 2 | Duplicate entry '1' for key 'PRIMARY' |
            +------+---------------------------------------+
            1 row in set (0.000 sec)
            {code}

            If something is an "index" here, it's the condition number (1), but the failing row number is 2. And it's a warning.
            {quote}
            _can be discussed_
            {quote}
            The initially suggested {{ROW_NUMBER}} was intuitively understandable, but {{ERROR_INDEX}} in the final implementation is not. It is not necessarily an error, and it is certainly not its index.
            {code:sql}
            MariaDB [test]> insert ignore into t1 (pk) values (1),(1);
            Query OK, 1 row affected, 1 warning (0.017 sec)
            Records: 2 Duplicates: 1 Warnings: 1

            MariaDB [test]> show warnings;
            +---------+------+---------------------------------------+
            | Level | Code | Message |
            +---------+------+---------------------------------------+
            | Warning | 1062 | Duplicate entry '1' for key 'PRIMARY' |
            +---------+------+---------------------------------------+
            1 row in set (0.000 sec)

            MariaDB [test]> get diagnostics condition 1 @num = ERROR_INDEX, @msg = MESSAGE_TEXT; select @num, @msg;
            Query OK, 0 rows affected (0.000 sec)

            +------+---------------------------------------+
            | @num | @msg |
            +------+---------------------------------------+
            | 2 | Duplicate entry '1' for key 'PRIMARY' |
            +------+---------------------------------------+
            1 row in set (0.000 sec)
            {code}

            If something is an "index" here, it's the condition number (1), but the failing row number is 2. And it's a warning.
            {quote}
            elenst Elena Stepanova made changes -
            Labels preview-10.7
            serg Sergei Golubchik made changes -
            Priority Critical [ 2 ] Blocker [ 1 ]
            julien.fritsch Julien Fritsch made changes -
            Priority Blocker [ 1 ] Critical [ 2 ]
            julien.fritsch Julien Fritsch made changes -
            Labels preview-10.7
            julien.fritsch Julien Fritsch made changes -
            Comment [ A comment with security level 'Developers' was removed. ]
            rucha174 Rucha Deodhar made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            rucha174 Rucha Deodhar made changes -
            Assignee Rucha Deodhar [ rucha174 ] Sergei Golubchik [ serg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Rucha Deodhar [ rucha174 ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            rucha174 Rucha Deodhar made changes -
            Fix Version/s 10.7.1 [ 26120 ]
            Fix Version/s 10.7 [ 24805 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 125062 ] MariaDB v4 [ 159688 ]
            rob.schwyzer@mariadb.com Rob Schwyzer (Inactive) made changes -
            rob.schwyzer@mariadb.com Rob Schwyzer (Inactive) made changes -

            People

              rucha174 Rucha Deodhar
              serg Sergei Golubchik
              Votes:
              1 Vote for this issue
              Watchers:
              7 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.