[Commits] 645a7ae830b: Fix compile error when building without the partition engine
revision-id: 645a7ae830bc9e308d362a23e10b9df1463be606 (mariadb-10.0.37-24-g645a7ae830b) parent(s): 9eadef013e77e1622c7c527a1cdfa6dcc2e906dd author: Varun Gupta committer: Varun Gupta timestamp: 2018-12-13 00:26:54 +0530 message: Fix compile error when building without the partition engine --- sql/sql_statistics.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 0c359a29431..2a90269e532 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -3931,9 +3931,8 @@ 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; + partition_info *part_info= field->table->part_info; #endif /* (1): checks if we have EITS statistics for a particular column @@ -3944,8 +3943,11 @@ bool is_eits_usable(Field *field) */ 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) + 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; }
participants (1)
-
Varun