Fix compile error when building without the partition engine
This commit is contained in:
parent
b58f28725b
commit
ce1669af12
@ -3931,9 +3931,8 @@ bool is_stat_table(const char *db, const char *table)
|
|||||||
|
|
||||||
bool is_eits_usable(Field *field)
|
bool is_eits_usable(Field *field)
|
||||||
{
|
{
|
||||||
partition_info *part_info= NULL;
|
|
||||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||||
part_info= field->table->part_info;
|
partition_info *part_info= field->table->part_info;
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
(1): checks if we have EITS statistics for a particular column
|
(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;
|
Column_statistics* col_stats= field->read_stats;
|
||||||
if (col_stats && !col_stats->no_stat_values_provided() && //(1)
|
if (col_stats && !col_stats->no_stat_values_provided() && //(1)
|
||||||
field->type() != MYSQL_TYPE_GEOMETRY && //(2)
|
field->type() != MYSQL_TYPE_GEOMETRY //(2)
|
||||||
(!part_info || !part_info->field_in_partition_expr(field))) //(3)
|
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||||
|
&& (!part_info || !part_info->field_in_partition_expr(field)) //(3)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user