diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-12-13 13:37:21 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-12-13 13:37:21 +0200 |
commit | 621041b67698b040080b33928883336967687e1e (patch) | |
tree | 75b5591e343f313dab07998b06ddeb4aa76233e3 /sql/sql_statistics.cc | |
parent | 541500295abdba7fa619065069291ac9c1dd6e83 (diff) | |
parent | 8e613458e1ad797b5e2c7870ffe1c3d5100dbbee (diff) | |
download | mariadb-git-621041b67698b040080b33928883336967687e1e.tar.gz |
Merge 10.0 into 10.1
Also, apply the MDEV-17957 changes to encrypted page checksums,
and remove error message output from the checksum function,
because these messages would be useless noise when mariabackup
is retrying reads of corrupted-looking pages, and not that
useful during normal server operation either.
The error messages in fil_space_verify_crypt_checksum()
should be refactored separately.
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r-- | sql/sql_statistics.cc | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 7d73a894bdc..f4dcafdb7c3 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -3734,10 +3734,10 @@ void set_statistics_for_table(THD *thd, TABLE *table) Ideally, EITS should provide per-partition statistics but this is not implemented currently. */ - #ifdef WITH_PARTITION_STORAGE_ENGINE +#ifdef WITH_PARTITION_STORAGE_ENGINE if (table->part_info) table->used_stat_records= table->file->stats.records; - #endif +#endif KEY *key_info, *key_info_end; for (key_info= table->key_info, key_info_end= key_info+table->s->keys; @@ -4064,10 +4064,6 @@ bool is_stat_table(const char *db, const char *table) bool is_eits_usable(Field *field) { - partition_info *part_info= NULL; - #ifdef WITH_PARTITION_STORAGE_ENGINE - part_info= field->table->part_info; - #endif /* (1): checks if we have EITS statistics for a particular column (2): Don't use EITS for GEOMETRY columns @@ -4076,9 +4072,11 @@ bool is_eits_usable(Field *field) such columns would be handled during partition pruning. */ Column_statistics* col_stats= field->read_stats; - if (col_stats && !col_stats->no_stat_values_provided() && //(1) - field->type() != MYSQL_TYPE_GEOMETRY && //(2) - (!part_info || !part_info->field_in_partition_expr(field))) //(3) - return TRUE; - return FALSE; + return col_stats && !col_stats->no_stat_values_provided() && //(1) + field->type() != MYSQL_TYPE_GEOMETRY && //(2) +#ifdef WITH_PARTITION_STORAGE_ENGINE + (!field->table->part_info || + !field->table->part_info->field_in_partition_expr(field)) && //(3) +#endif + true; } |