1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-10435 crash with bad stat tables.

Functions from sql/statistics.cc don't seem to expect
        stat tables to fail or to have inadequate structure.
        Table open errors suppressed and some validity
        checks added. Invalid tables reported to the server
        log.
This commit is contained in:
Alexey Botchkov
2016-12-09 17:13:43 +04:00
parent 870d7589c6
commit 83f7151da5
8 changed files with 216 additions and 41 deletions

View File

@ -52,7 +52,8 @@ enum enum_table_stat_col
{
TABLE_STAT_DB_NAME,
TABLE_STAT_TABLE_NAME,
TABLE_STAT_CARDINALITY
TABLE_STAT_CARDINALITY,
TABLE_STAT_N_FIELDS
};
enum enum_column_stat_col
@ -67,7 +68,8 @@ enum enum_column_stat_col
COLUMN_STAT_AVG_FREQUENCY,
COLUMN_STAT_HIST_SIZE,
COLUMN_STAT_HIST_TYPE,
COLUMN_STAT_HISTOGRAM
COLUMN_STAT_HISTOGRAM,
COLUMN_STAT_N_FIELDS
};
enum enum_index_stat_col
@ -76,7 +78,8 @@ enum enum_index_stat_col
INDEX_STAT_TABLE_NAME,
INDEX_STAT_INDEX_NAME,
INDEX_STAT_PREFIX_ARITY,
INDEX_STAT_AVG_FREQUENCY
INDEX_STAT_AVG_FREQUENCY,
INDEX_STAT_N_FIELDS
};
inline