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

ROW_NUMBER is not set and differs from the message upon ER_WRONG_VALUE_COUNT_ON_ROW for the 1st row

    XMLWordPrintable

Details

    Description

      create or replace table t (a int);
      insert into t values (1,2),(3);
       
      get diagnostics condition 1 @n= row_number, @m= message_text;
      select @n, @m;
      

      bb-10.7-row_number cb9002bee

      MariaDB [test]> select @n, @m;
      +------+-------------------------------------------------+
      | @n   | @m                                              |
      +------+-------------------------------------------------+
      |    0 | Column count doesn't match value count at row 1 |
      +------+-------------------------------------------------+
      1 row in set (0.001 sec)
      

      If, however, the error occurs on the 2nd or further rows, ROW_NUMBER is set all right:

      MariaDB [test]> insert into t values (1),(2,3);
      ERROR 1136 (21S01): Column count doesn't match value count at row 2
      MariaDB [test]> get diagnostics condition 1 @n= row_number, @m= message_text;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> select @n, @m;
      +------+-------------------------------------------------+
      | @n   | @m                                              |
      +------+-------------------------------------------------+
      |    2 | Column count doesn't match value count at row 2 |
      +------+-------------------------------------------------+
      1 row in set (0.001 sec)
      

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.