Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3841 LevelDB storage engine
  3. MDEV-4062

LevelDB works incorrectly with query cache

    XMLWordPrintable

Details

    • Technical task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Possibly LevelDB is not supposed to work with query cache, but then it should be taken care of, since now it returns incorrect results;

      Please note that the test case below needs to be run with query-cache-type=1 (I couldn't find a suitable include file to set it automatically).

      The same test without query cache returns 'updated' in all selects after update, as expected. Same is true for the test case with query cache if it's run for InnoDB.

      Test output:

      create table t1 (pk int primary key, c char(8)) engine=LevelDB;
      insert into t1 values (1,'new'),(2,'new');
      select * from t1;
      pk      c
      1       new
      2       new
       
      connect  con1,localhost,root,,;
       
      update t1 set c = 'updated';
       
      connection default;
       
      flush status;
      show status like 'Qcache_hits';
      Variable_name   Value
      Qcache_hits     0
      show global status like 'Qcache_hits';
      Variable_name   Value
      Qcache_hits     0
      select * from t1;
      pk      c
      1       new
      2       new
      select sql_no_cache * from t1;
      pk      c
      1       new
      2       new
      select * from t1 where pk = 1;
      pk      c
      1       new
      show status like 'Qcache_hits';
      Variable_name   Value
      Qcache_hits     0
      show global status like 'Qcache_hits';
      Variable_name   Value
      Qcache_hits     0
       

      Test case:

      # Important:
      # The test needs to be run with --mysqld=--query-cache-type=1
       
      --enable_connect_log
       
      create table t1 (pk int primary key, c char(8)) engine=LevelDB;
      insert into t1 values (1,'new'),(2,'new');
       
      select * from t1;
       
      --connect (con1,localhost,root,,)
       
      update t1 set c = 'updated';
      #select * from t1;
       
      --connection default
      flush status;
      show status like 'Qcache_hits';
      show global status like 'Qcache_hits';
      select * from t1;
      select sql_no_cache * from t1;
      select * from t1 where pk = 1;
      show status like 'Qcache_hits';
      show global status like 'Qcache_hits';

      revision-id: psergey@askmonty.org-20130115181447-1jfr200qcuqzp1sr
      revno: 4495
      branch-nick: mysql-5.6-leveldb

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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