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

session_track_transaction_info=CHARACTERISTICS disables the query cache

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0
    • 10.4, 10.5, 10.6, 10.11
    • Query Cache
    • None
    • Docker images from dockerhub

    Description

      With this configuration, the query cache is disabled.

      docker run --name=maria --network=host -ti --rm -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 mariadb:10.11 --query-cache-size=$((1024*1024*1024)) --query-cache-type=1 --session-track-transaction-info=CHARACTERISTICS
       
      ... in other window
       
      [markusjm@monolith docker-compose]$ mariadb --host=127.0.0.1 --port=3306 --user=root -e "CREATE DATABASE IF NOT EXISTS test; CREATE TABLE IF NOT EXISTS test.t1 AS SELECT seq FROM test.seq_0_to_50; SELECT COUNT(*) FROM test.t1; SHOW GLOBAL STATUS LIKE 'qcache%'"
      +----------+
      | COUNT(*) |
      +----------+
      |       51 |
      +----------+
      +-------------------------+------------+
      | Variable_name           | Value      |
      +-------------------------+------------+
      | Qcache_free_blocks      | 1          |
      | Qcache_free_memory      | 1073723392 |
      | Qcache_hits             | 0          |
      | Qcache_inserts          | 0          |
      | Qcache_lowmem_prunes    | 0          |
      | Qcache_not_cached       | 0          |
      | Qcache_queries_in_cache | 0          |
      | Qcache_total_blocks     | 1          |
      +-------------------------+------------+
      

      Removing session_track_transaction_info=CHARACTERISTICS makes the query cache work again:

      docker run --name=maria --network=host -ti --rm -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 mariadb:10.11 --query-cache-size=$((1024*1024*1024)) --query-cache-type=1
       
      ... in another window
       
      [markusjm@monolith docker-compose]$ mariadb --host=127.0.0.1 --port=3306 --user=root -e "CREATE DATABASE IF NOT EXISTS test; CREATE TABLE IF NOT EXISTS test.t1 AS SELECT seq FROM test.seq_0_to_50; SELECT COUNT(*) FROM test.t1; SHOW GLOBAL STATUS LIKE 'qcache%'"
      +----------+
      | COUNT(*) |
      +----------+
      |       51 |
      +----------+
      +-------------------------+------------+
      | Variable_name           | Value      |
      +-------------------------+------------+
      | Qcache_free_blocks      | 1          |
      | Qcache_free_memory      | 1073721856 |
      | Qcache_hits             | 0          |
      | Qcache_inserts          | 1          |
      | Qcache_lowmem_prunes    | 0          |
      | Qcache_not_cached       | 0          |
      | Qcache_queries_in_cache | 1          |
      | Qcache_total_blocks     | 4          |
      +-------------------------+------------+
      [markusjm@monolith docker-compose]$ mariadb --host=127.0.0.1 --port=3306 --user=root -e "CREATE DATABASE IF NOT EXISTS test; CREATE TABLE IF NOT EXISTS test.t1 AS SELECT seq FROM test.seq_0_to_50; SELECT COUNT(*) FROM test.t1; SHOW GLOBAL STATUS LIKE 'qcache%'"
      +----------+
      | COUNT(*) |
      +----------+
      |       51 |
      +----------+
      +-------------------------+------------+
      | Variable_name           | Value      |
      +-------------------------+------------+
      | Qcache_free_blocks      | 1          |
      | Qcache_free_memory      | 1073721856 |
      | Qcache_hits             | 1          |
      | Qcache_inserts          | 1          |
      | Qcache_lowmem_prunes    | 0          |
      | Qcache_not_cached       | 0          |
      | Qcache_queries_in_cache | 1          |
      | Qcache_total_blocks     | 4          |
      +-------------------------+------------+
      

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.