Query Cache Stale Results After DML on Partitioned Tables
0 reputation · 28 May 2025, 20:15 UTC
Problem Context
The MariaDB 10.5.1 release introduced a query cache plugin that stores SELECT results in memory. The plugin is designed to invalidate cached entries when DML operations touch the underlying tables. However, documentation notes a bug that can leave stale cache entries after DML on partitioned tables.
Unresolved Decision
It is unclear whether subsequent MariaDB releases have fully addressed this bug, or whether the cache invalidation logic still fails for certain partitioned table configurations. The behavior directly impacts query correctness and performance tuning decisions.
Specific Questions
1. In MariaDB 10.5.x and later, does the query cache plugin still produce stale SELECT results when an INSERT/UPDATE/DELETE is executed on a partitioned table?
2. If the bug persists, what specific partitioning schemes or table definitions trigger the stale cache condition?
3. Are there recommended configuration workarounds (e.g., disabling the plugin, adjusting query_cache_type) that reliably prevent stale results while maintaining acceptable performance?