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

Second excution of query "select * from t1 where a is null" where a is auto_increment column doesn't return result

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4(EOL), 10.5, 10.6, 10.9(EOL), 10.10(EOL), 11.0(EOL), 11.1(EOL)
    • 10.5, 10.6
    • None
    • None

    Description

      In testcase below expected that LAST_INSERT_ID() and "select * from t1 where a is null" have the same behavior, but "select * from t1 where a is null" doesn't return result on second execution:

      create table t1 (a int auto_increment primary key, b int);
      insert t1 (b) values (10);
      set sql_auto_is_null=1;
      select * from t1 where a is null;
      select * from t1 where a is null;
      drop table t1;
      

      Actual result:

      select LAST_INSERT_ID();
      LAST_INSERT_ID()
      1
      select * from t1 where a is null;
      a	b
      1	10
      select LAST_INSERT_ID();
      LAST_INSERT_ID()
      1
      select * from t1 where a is null;
      a	b
      

      Expected result:

      select LAST_INSERT_ID();
      LAST_INSERT_ID()
      1
      select * from t1 where a is null;
      a	b
      1	10
      select LAST_INSERT_ID();
      LAST_INSERT_ID()
      1
      select * from t1 where a is null;
      a	b
      1	10
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.