summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorAditya A <aditya.a@oracle.com>2013-07-29 11:41:13 +0530
committerAditya A <aditya.a@oracle.com>2013-07-29 11:41:13 +0530
commit21b42b819fca9a42dd24cbce6fd314f5f5bad956 (patch)
tree2ef866d1a9768c51c22cb3f65e1a0533831050d6 /sql/ha_partition.cc
parenteb152f86af39303a11a58f1912ff4c0484e1a5ac (diff)
downloadmariadb-git-21b42b819fca9a42dd24cbce6fd314f5f5bad956.tar.gz
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 ]
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc2
1 files changed, 1 insertions, 1 deletions
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;