summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorgshchepa/uchum@host.loc <>2008-04-26 02:45:58 +0500
committergshchepa/uchum@host.loc <>2008-04-26 02:45:58 +0500
commit107b84f9bd34cddb5fa13969d4156e73ccf477bf (patch)
tree168fdf05aa71e4176ac8753ebb98afdbd5b05dca /include
parent0b226a9299493278c612094165a9eec929e00deb (diff)
downloadmariadb-git-107b84f9bd34cddb5fa13969d4156e73ccf477bf.tar.gz
Fixed bug#36006: Optimizer does table scan for SELECT COUNT(*)
for ENGINE=MRG_MYISAM (should be optimized out). Before WL#3281 MERGE engine had the HA_NOT_EXACT_COUNT flag unset, and it worked with COUNT optimization as desired. After the removal of the HA_NOT_EXACT_COUNT flag neither HA_STATS_RECORDS_IS_EXACT (opposite to former HA_NOT_EXACT_COUNT flag) nor modern HA_HAS_RECORDS flag were not added to MERGE table flag mask. 1. The HA_HAS_RECORDS table flag has been set. 2. The ha_myisammrg::records method has been overridden to calculate total number of records in underlying tables.
Diffstat (limited to 'include')
-rw-r--r--include/myisammrg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/myisammrg.h b/include/myisammrg.h
index cc6e6aac6cd..dafae157ee0 100644
--- a/include/myisammrg.h
+++ b/include/myisammrg.h
@@ -112,6 +112,7 @@ extern int myrg_reset(MYRG_INFO *info);
extern void myrg_extrafunc(MYRG_INFO *info,invalidator_by_filename inv);
extern ha_rows myrg_records_in_range(MYRG_INFO *info, int inx,
key_range *min_key, key_range *max_key);
+extern ha_rows myrg_records(MYRG_INFO *info);
extern ulonglong myrg_position(MYRG_INFO *info);
#ifdef __cplusplus