From 900c5714adece1700dee8727d97dba7de0baf03c Mon Sep 17 00:00:00 2001 From: Aditya A Date: Mon, 29 Jul 2013 11:41:13 +0530 Subject: [PATCH] Bug #11766851 QUERYING I_S.PARTITIONS CHANGES THE CARDINALITY OF THE PARTITIONS. ANALYSIS -------- Whenever we query I_S.partitions, ha_partition::get_dynamic_partition_info() is called which resets the cardinality according to the number of rows in last partition. Fix --- When we call get_dynamic_partition_info() avoid passing the flag HA_STATUS_CONST to info() since HA_STATUS_CONST should ideally not be called for per partition. [Approved by mattiasj rb#2830 ] --- sql/ha_partition.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 17f02c24422..c3f2af27282 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -5887,7 +5887,7 @@ void ha_partition::get_dynamic_partition_info(PARTITION_STATS *stat_info, uint part_id) { handler *file= m_file[part_id]; - file->info(HA_STATUS_CONST | HA_STATUS_TIME | HA_STATUS_VARIABLE | + file->info(HA_STATUS_TIME | HA_STATUS_VARIABLE | HA_STATUS_VARIABLE_EXTRA | HA_STATUS_NO_LOCK); stat_info->records= file->stats.records;