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

Procedure call not modifying data is affected by strict SQL mode

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.5, 10.1, 10.2, 10.3, 10.4
    • 10.5
    • Server
    • None

    Description

      create procedure pr(a int) select a;
      set sql_mode='';
      call pr('foo');
      set sql_mode='STRICT_ALL_TABLES';
      call pr('foo');
      drop procedure pr;
      

      10.5 fa843790

      MariaDB [test]> set sql_mode='';
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> call pr('foo');
      +------+
      | a    |
      +------+
      |    0 |
      +------+
      1 row in set (0.000 sec)
       
      Query OK, 0 rows affected, 1 warning (0.000 sec)
       
      MariaDB [test]> set sql_mode='STRICT_ALL_TABLES';
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> call pr('foo');
      ERROR 1366 (22007): Incorrect integer value: 'foo' for column ``.``.`a` at row 1
      

      Note: if it's indeed a bug, feel free to adjust the fix version as you deem fit.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            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.