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

row number incorrect in warning message created by PROCEDURE

    XMLWordPrintable

Details

    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

        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.