Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
N/A
-
None
-
None
-
None
Description
Query with reversed executable comment will be in cache, but never used. And such queries could pollute the cache.
in test - added to compare reversed and "normal" executable comment:
--source include/have_query_cache.inc
|
set @@global.query_cache_type=1; |
set @@global.query_cache_size=1024*1024; |
|
|
CREATE TABLE t1(c1 INT); |
INSERT INTO t1 values (1),(2),(3); |
|
|
SELECT /*!!999999 c1 */ FROM t1; |
SELECT /*!!999999 c1 */ FROM t1; |
|
|
SHOW STATUS LIKE 'Qcache_hits'; |
|
|
SELECT /*M!50300 c1 */ FROM t1; |
SELECT /*M!50300 c1 */ FROM t1; |
|
|
SHOW STATUS LIKE 'Qcache_hits'; |
|
|
DROP TABLE t1; |
SELECT /*!!999999 c1 */ FROM t1;
|
c1
|
1
|
2
|
3
|
SELECT /*!!999999 c1 */ FROM t1;
|
c1
|
1
|
2
|
3
|
SHOW STATUS LIKE 'Qcache_hits';
|
Variable_name Value
|
Qcache_hits 0
|
SELECT /*M!50300 c1 */ FROM t1;
|
c1
|
1
|
2
|
3
|
SELECT /*M!50300 c1 */ FROM t1;
|
c1
|
1
|
2
|
3
|
SHOW STATUS LIKE 'Qcache_hits';
|
Variable_name Value
|
Qcache_hits 1
|
Attachments
Issue Links
- relates to
-
MDEV-7381 Reversed executable comments
-
- Closed
-