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

ROW_NUMBER differs from the number in the error message upon ER_WARN_DATA_OUT_OF_RANGE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: N/A
    • Fix Version/s: 10.7.1
    • Component/s: Server
    • Labels:
      None

      Description

      CREATE OR REPLACE TABLE t (a INT);
      INSERT INTO t VALUES (1),(2);
      SELECT CAST(a AS DECIMAL(2,2)) AS f FROM t;
       
      get diagnostics condition 2 @n = row_number, @m = message_text;
      select @n, @m;
      

      bb-10.7-row_number cb9002bee

      +------+--------------------------------------------+
      | @n   | @m                                         |
      +------+--------------------------------------------+
      |    2 | Out of range value for column 'f' at row 1 |
      +------+--------------------------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> show warnings;
      +---------+------+--------------------------------------------+
      | Level   | Code | Message                                    |
      +---------+------+--------------------------------------------+
      | Warning | 1264 | Out of range value for column 'f' at row 1 |
      | Warning | 1264 | Out of range value for column 'f' at row 1 |
      +---------+------+--------------------------------------------+
      2 rows in set (0.000 sec)
      

      So, ROW_NUMBER looks correct and the error messages don't, but there was a requirement that the error message and the value of ROW_NUMBER must correlate, so probably the message should be fixed. Also, it is suspicious that it differs, if the same counter is supposed to be used.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rucha174 Rucha Deodhar
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration