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

Cursor protocol adds junk information in status 'Created_tmp_tables'

    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), 11.2(EOL)
    • 10.5, 10.6
    • None
    • None

    Description

      In case below it is expected that equality "@tmp_tables_after = @tmp_tables_before" will be true :

      Case:

      CREATE TABLE t1 (
        a INT,
        b INT,
        PRIMARY KEY (a),
        KEY ab(a, b)
      );
      INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4);
      INSERT INTO t1 SELECT a + 4, b + 4 FROM t1;
       
      --disable_query_log
      --let $q = `show status like 'Created_tmp_tables';`
      eval set @tmp_tables_before = 
        CAST(REPLACE('$q', 'Created_tmp_tables', '') AS UNSIGNED);
      --enable_query_log
       
      SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (a, ab) GROUP BY a;
       
      --disable_query_log
      --let $q = `show status like 'Created_tmp_tables';`
      eval set @tmp_tables_after = 
        CAST(REPLACE('$q', 'Created_tmp_tables', '') AS UNSIGNED);
      --enable_query_log
       
      SELECT @tmp_tables_after;
      SELECT @tmp_tables_before ;
      SELECT @tmp_tables_after = @tmp_tables_before ;
       
      DROP TABLE t1;
      

      Expected value:

      SELECT @tmp_tables_after;
      @tmp_tables_after
      1
      SELECT @tmp_tables_before ;
      @tmp_tables_before
      1
      SELECT @tmp_tables_after = @tmp_tables_before ;
      @tmp_tables_after = @tmp_tables_before
      1
      

      Actual value:

      SELECT @tmp_tables_after;
      @tmp_tables_after
      2
      SELECT @tmp_tables_before ;
      @tmp_tables_before
      1
      SELECT @tmp_tables_after = @tmp_tables_before ;
      @tmp_tables_after = @tmp_tables_before
      0
      

      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.