Commit 900c5714 authored by Aditya A's avatar Aditya A

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 ]
parent bf2c49d3
...@@ -5887,7 +5887,7 @@ void ha_partition::get_dynamic_partition_info(PARTITION_STATS *stat_info, ...@@ -5887,7 +5887,7 @@ void ha_partition::get_dynamic_partition_info(PARTITION_STATS *stat_info,
uint part_id) uint part_id)
{ {
handler *file= m_file[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); HA_STATUS_VARIABLE_EXTRA | HA_STATUS_NO_LOCK);
stat_info->records= file->stats.records; stat_info->records= file->stats.records;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment