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, rucha174,

            Could you please make a decision and if you decide to change it, push the fix? I'd rather not have it postponed till the last moment.

            elenst Elena Stepanova added a comment - serg , rucha174 , Could you please make a decision and if you decide to change it, push the fix? I'd rather not have it postponed till the last moment.

            rucha174, please, rename ERROR_INDEX to ROW_NUMBER similar to DB2.
            And in MDEV-26635 we'll try to make it 0 when no rows were involved, again, as in DB2.

            serg Sergei Golubchik added a comment - rucha174 , please, rename ERROR_INDEX to ROW_NUMBER similar to DB2. And in MDEV-26635 we'll try to make it 0 when no rows were involved, again, as in DB2.

            I think it would be good to do the renaming before any other feature-related fixes go to 10.7 main branch. It's bad enough that we'll have a scattered git history of this feature (bugfixes detached from the initial push), but now the patches and commit comments also contain the syntax which is about to change, it will be difficult to search and understand later.

            elenst Elena Stepanova added a comment - I think it would be good to do the renaming before any other feature-related fixes go to 10.7 main branch. It's bad enough that we'll have a scattered git history of this feature (bugfixes detached from the initial push), but now the patches and commit comments also contain the syntax which is about to change, it will be difficult to search and understand later.
            rucha174 Rucha Deodhar added a comment - - edited Patch: https://github.com/MariaDB/server/commit/28224147833e59f47491e05f247948a774b4c712

            2822414783 looks ok

            serg Sergei Golubchik added a comment - 2822414783 looks ok

            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.