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

row number incorrect in warning message created by PROCEDURE

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.5.16, 10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL)
    • 10.5, 10.6, 10.11
    • None
    • CentOS Linux release 7.4.1708

    Description

      Reproduction Procedure

      Preparation:

        set global sql_mode="";
       
        CREATE TABLE t1 (
          c1 int(11)
        );
       
        DELIMITER // 
        CREATE definer='rdsAdmin'@'localhost' PROCEDURE add_row(IN c1 INT) SQL SECURITY INVOKER body: BEGIN insert into test.t1(c1) values(c1); END ; 
        // 
        DELIMITER ;
       
        call add_row(1); 
        call add_row(2); 
        call add_row(3);
      

      Normal case

        call add_row(2147483648); 
        show warnings;
      

      Exceptions

        select count(1) from t1
        call add_row(2147483648); 
        show warnings;
      

      The row number should be 1 but not.

      use gdb to debug, find the variable m_current_row_for_warning is not reset or changed by something else

      Attachments

        1. Exceptions.png
          27 kB
          hejieming
        2. Normal case.png
          17 kB
          hejieming

        Activity

          People

            rucha174 Rucha Deodhar
            hejm hejieming
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.