summaryrefslogtreecommitdiff
path: root/sql/sql_join_cache.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-12-13 23:05:12 -0800
committerIgor Babaev <igor@askmonty.org>2012-12-13 23:05:12 -0800
commita06224bd1594ea1da650f748a8956922eafd2363 (patch)
tree99fc4c066ce8e3b9c0037333c62b993a787458d8 /sql/sql_join_cache.cc
parent65820439bdafeead66496b489c076012c334c710 (diff)
downloadmariadb-git-a06224bd1594ea1da650f748a8956922eafd2363.tar.gz
Addressed all remaining issues from the review of the patch
that introduced engine independent persistent statistics. In particular: - added an enumeration type for possible values of the system variable use_stat_tables - renamed KEY::real_rec_per_key to KEY::actual_rec_per_key - optimized the collection of statistical data for any primary key defined only on one column.
Diffstat (limited to 'sql/sql_join_cache.cc')
-rw-r--r--sql/sql_join_cache.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc
index 225bb413195..ac96746c389 100644
--- a/sql/sql_join_cache.cc
+++ b/sql/sql_join_cache.cc
@@ -3812,7 +3812,8 @@ uint JOIN_TAB_SCAN_MRR::aux_buffer_incr(ulong recno)
uint incr= 0;
TABLE_REF *ref= &join_tab->ref;
TABLE *tab= join_tab->table;
- uint rec_per_key= tab->key_info[ref->key].real_rec_per_key(ref->key_parts-1);
+ uint rec_per_key=
+ tab->key_info[ref->key].actual_rec_per_key(ref->key_parts-1);
set_if_bigger(rec_per_key, 1);
if (recno == 1)
incr= ref->key_length + tab->file->ref_length;