My Oracle Support Banner

TRUNCATE PARTITION Command does not Clear the Query Cache (Doc ID 1403093.1)

Last updated on MARCH 08, 2017

Applies to:

MySQL Server - Version: 5.1 and later   [Release: 5.1 and later ]
Information in this document applies to any platform.


On : 5.1 and 5.5 versions, Partitioning

Truncating partition not clearing the cache

Using query_cache and innodb_file_per_table=ON then created range partition on date column and after truncating a partition a select still returning the rows for that partition from the query cache

Truncating the partition should clear the cache

The issue can be reproduced at will with the following steps:
1. Create a table with partitions and populate
2. Enable the query cache
3. Perform select statements to populate the cache
4. Truncate one of the populated partitions
5. Repeat the select statement

The issue has the following business impact:
Due to this issue, users cannot trust the state of the data.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.