summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r--sql/sql_statistics.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index b556c37c3fb..6e476b34e0d 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -929,7 +929,8 @@ public:
stat_field->store(table_field->collected_stats->histogram.get_size());
break;
case COLUMN_STAT_HIST_TYPE:
- stat_field->store(table_field->collected_stats->histogram.get_type());
+ stat_field->store(table_field->collected_stats->histogram.get_type() +
+ 1);
break;
case COLUMN_STAT_HISTOGRAM:
const char * col_histogram=
@@ -1011,7 +1012,8 @@ public:
table_field->read_stats->histogram.set_size(stat_field->val_int());
break;
case COLUMN_STAT_HIST_TYPE:
- Histogram_type hist_type= (Histogram_type) (stat_field->val_int());
+ Histogram_type hist_type= (Histogram_type) (stat_field->val_int() -
+ 1);
table_field->read_stats->histogram.set_type(hist_type);
break;
}