diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-12-13 12:15:18 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-12-13 12:15:27 +0200 |
commit | 5ab91f5914cd632a0615c071e38a1bfff4371303 (patch) | |
tree | 085daf62c047099350a17cbcf00f0834efb74a37 | |
parent | 5f5e73f1fe4f34b806b94cf9443348ed6cf14c1e (diff) | |
download | mariadb-git-5ab91f5914cd632a0615c071e38a1bfff4371303.tar.gz |
Remove space before #ifdef
-rw-r--r-- | sql/sql_statistics.cc | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 2a90269e532..a2e6621055d 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -3601,10 +3601,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; @@ -3931,9 +3931,6 @@ bool is_stat_table(const char *db, const char *table) bool is_eits_usable(Field *field) { - #ifdef WITH_PARTITION_STORAGE_ENGINE - partition_info *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 @@ -3942,12 +3939,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) - #ifdef WITH_PARTITION_STORAGE_ENGINE - && (!part_info || !part_info->field_in_partition_expr(field)) //(3) - #endif - ) - 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; } |