[MDEV-10766] Queries which start with WITH clause do not get inserted into query cache Created: 2016-09-07  Updated: 2017-03-16  Resolved: 2017-03-15

Status: Closed
Project: MariaDB Server
Component/s: Optimizer - CTE, Query Cache
Affects Version/s: 10.2
Fix Version/s: 10.2.5

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Varun Gupta (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
Sprint: 10.2.6-1

 Description   

MariaDB [test]> create table t1 (i int);
Query OK, 0 rows affected (0.41 sec)
 
MariaDB [test]> with cte as (select * from t1) select * from cte;
Empty set (0.01 sec)
 
MariaDB [test]> show status like 'Qcache%';
+-------------------------+---------+
| Variable_name           | Value   |
+-------------------------+---------+
| Qcache_free_blocks      | 1       |
| Qcache_free_memory      | 1031080 |
| Qcache_hits             | 0       |
| Qcache_inserts          | 0       |
| Qcache_lowmem_prunes    | 0       |
| Qcache_not_cached       | 0       |
| Qcache_queries_in_cache | 0       |
| Qcache_total_blocks     | 1       |
+-------------------------+---------+
8 rows in set (0.00 sec)
 
MariaDB [test]> select @@query_cache_type, @@query_cache_size;
+--------------------+--------------------+
| @@query_cache_type | @@query_cache_size |
+--------------------+--------------------+
| ON                 |            1048576 |
+--------------------+--------------------+
1 row in set (0.00 sec)



 Comments   
Comment by Oleksandr Byelkin [ 2017-02-03 ]

OK to push!

Generated at Thu Feb 08 07:44:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.