Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL)
-
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 |
|
+-------------------------+------------+
|