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

JSON_TABLE: Queries are not inserted into query cache

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • N/A
    • N/A
    • JSON, Query Cache
    • None

    Description

      drop table if exists t;
      create table t (a text);
      insert into t values ('{"a":"foo"}');
      set global query_cache_type= on;
      set query_cache_type= on;
      reset query cache;
      flush status;
      select * from t, json_table(t.a, '$' columns (f varchar(20) path '$.a')) as jt;
      show status like 'qcache%';
      

      bb-10.5-hf 6dfb3fab2

      MariaDB [test]> show status like 'qcache%';
      +-------------------------+---------+
      | Variable_name           | Value   |
      +-------------------------+---------+
      | Qcache_free_blocks      | 1       |
      | Qcache_free_memory      | 1031064 |
      | Qcache_hits             | 0       |
      | Qcache_inserts          | 0       |
      | Qcache_lowmem_prunes    | 0       |
      | Qcache_not_cached       | 1       |
      | Qcache_queries_in_cache | 0       |
      | Qcache_total_blocks     | 1       |
      +-------------------------+---------+
      

      Normal query from t is cached:

      MariaDB [test]> select * from t;
      +-------------+
      | a           |
      +-------------+
      | {"a":"foo"} |
      +-------------+
      1 row in set (0.003 sec)
       
      MariaDB [test]> show status like 'qcache%';
      +-------------------------+---------+
      | Variable_name           | Value   |
      +-------------------------+---------+
      | Qcache_free_blocks      | 1       |
      | Qcache_free_memory      | 1029528 |
      | Qcache_hits             | 0       |
      | Qcache_inserts          | 1       |
      | Qcache_lowmem_prunes    | 0       |
      | Qcache_not_cached       | 1       |
      | Qcache_queries_in_cache | 1       |
      | Qcache_total_blocks     | 4       |
      +-------------------------+---------+
      8 rows in set (0.008 sec)
      

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.