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

ERROR_INDEX isn't seen in the error message

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Won't Fix
    • None
    • N/A
    • Server
    • None

    Description

      can be discussed

      Is there a reason this row number cannot be a part of the error message itself (in addition to diagnostics property)?
      It wouldn't be anything new, we already have it for some errors, e.g.

      MariaDB [test]> insert into t1 values (1,'foo'),(2,'foobar');
      ERROR 1406 (22001): Data too long for column 'c' at row 2
      

      While diagnostics property is useful to detect the number of the flawed row programmatically, in interactive execution having it in the error text is clearly more user-friendly, especially when many values are involved:

      MariaDB [test]> insert ignore into t1 values (1,'foo'),(2,'foobar'),(2,'bar'),(3,'a'),(4,'qux'),(4,'quux'),(5,'baz');
      Query OK, 5 rows affected, 4 warnings (0.014 sec)
      Records: 7  Duplicates: 2  Warnings: 4
       
      MariaDB [test]> show warnings;
      +---------+------+----------------------------------------+
      | Level   | Code | Message                                |
      +---------+------+----------------------------------------+
      | Warning | 1265 | Data truncated for column 'c' at row 2 |
      | Warning | 1062 | Duplicate entry '2' for key 'PRIMARY'  |
      | Warning | 1265 | Data truncated for column 'c' at row 6 |
      | Warning | 1062 | Duplicate entry '4' for key 'PRIMARY'  |
      +---------+------+----------------------------------------+
      4 rows in set (0.000 sec)
      

      Attachments

        Issue Links

          Activity

            People

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