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

Queries using RANDOM_BYTES get stored in query cache

    XMLWordPrintable

Details

    Description

      set @qcache= @@global.query_cache_type;
      set global query_cache_type= 1;
      set query_cache_type= 1;
       
      create table t1 (a int);
      insert into t1 values (1),(2);
       
      flush status;
      select hex(random_bytes(a)) from t1;
      select * from information_schema.global_status where variable_name in ('Qcache_inserts','Qcache_hits');
      select hex(random_bytes(a)) from t1;
      select * from information_schema.global_status where variable_name in ('Qcache_inserts','Qcache_hits');
       
      # Cleanup
      drop table t1;
      set global query_cache_type= @qcache;
      

      bb-10.10-MDEV-25704 1303dfde02

      select hex(random_bytes(a)) from t1;
      hex(random_bytes(a))
      10
      A6EF
      select * from information_schema.global_status where variable_name in ('Qcache_inserts','Qcache_hits');
      VARIABLE_NAME	VARIABLE_VALUE
      QCACHE_HITS	0
      QCACHE_INSERTS	1
      select hex(random_bytes(a)) from t1;
      hex(random_bytes(a))
      10
      A6EF
      select * from information_schema.global_status where variable_name in ('Qcache_inserts','Qcache_hits');
      VARIABLE_NAME	VARIABLE_VALUE
      QCACHE_HITS	1
      QCACHE_INSERTS	1
      

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              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.