diff options
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r-- | sql/sql_statistics.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 0a51346adb2..3c26f58073d 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -2187,7 +2187,10 @@ inline bool statistics_for_command_is_needed(THD *thd) { if (thd->bootstrap || thd->variables.use_stat_tables == NEVER) return FALSE; - + + if (thd->force_read_stats) + return TRUE; + switch(thd->lex->sql_command) { case SQLCOM_SELECT: case SQLCOM_INSERT: @@ -4088,6 +4091,7 @@ bool is_eits_usable(Field *field) partition list of a table. We assume the selecticivity for such columns would be handled during partition pruning. */ + DBUG_ASSERT(field->table->stats_is_read); Column_statistics* col_stats= field->read_stats; return col_stats && !col_stats->no_stat_values_provided() && //(1) field->type() != MYSQL_TYPE_GEOMETRY && //(2) |