1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Fixed bugs mdev-4357 and mdev-4359.

The values of the column HIST_TYPE from the statistical table
mysql.column_stats were stored in the table and read from the
table incorrectly.
This commit is contained in:
Igor Babaev
2013-04-05 23:48:49 -07:00
parent 503731d80f
commit 1ae352afbe
6 changed files with 121 additions and 28 deletions

View File

@ -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;
}