summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-01-13 17:43:54 +0100
committerSergei Golubchik <serg@mariadb.org>2016-12-12 20:27:29 +0100
commit4210538122e6e868848c703dab6c1b0d59733d28 (patch)
tree82bb0a57f07ee63d980e4bec398138ad87831366 /sql/sql_statistics.cc
parent03a0623f1e50c94048d23b05ec0411243f73f9f5 (diff)
downloadmariadb-git-4210538122e6e868848c703dab6c1b0d59733d28.tar.gz
cleanup: avoid Field::field_index
prefer x->field over table->field[x->field->field_index]
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r--sql/sql_statistics.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index 83c7db8b510..e557a009686 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -3591,7 +3591,7 @@ double get_column_avg_frequency(Field * field)
return res;
}
- Column_statistics *col_stats= table->s->field[field->field_index]->read_stats;
+ Column_statistics *col_stats= field->read_stats;
if (!col_stats)
res= table->stat_records();
@@ -3629,7 +3629,7 @@ double get_column_range_cardinality(Field *field,
{
double res;
TABLE *table= field->table;
- Column_statistics *col_stats= table->field[field->field_index]->read_stats;
+ Column_statistics *col_stats= field->read_stats;
double tab_records= table->stat_records();
if (!col_stats)