summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.h
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2016-12-09 17:13:43 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2016-12-09 17:13:43 +0400
commit83f7151da5259fa07ab2c26600009d53adef50f3 (patch)
tree39c8f971be55aabd9e294a534fd8b6f448374af9 /sql/sql_statistics.h
parent870d7589c6c4596b0f1a641add5071469e2c94a7 (diff)
downloadmariadb-git-83f7151da5259fa07ab2c26600009d53adef50f3.tar.gz
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.
Diffstat (limited to 'sql/sql_statistics.h')
-rw-r--r--sql/sql_statistics.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sql_statistics.h b/sql/sql_statistics.h
index 20b2eb66449..f46583839d1 100644
--- a/sql/sql_statistics.h
+++ b/sql/sql_statistics.h
@@ -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