diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-04-25 09:04:09 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-04-25 09:04:09 +0300 |
commit | bc145193c164b895a52b943e73fff53952d48a60 (patch) | |
tree | 278a02f85834d7ed8fa6933959e9b3b96655d1e1 /sql/sql_statistics.cc | |
parent | 1f1a61cfc41a01ffa65d568eebdc037a54b5c463 (diff) | |
parent | bfb0726fc24acb896e54bc7ef7536ad1aab9d574 (diff) | |
download | mariadb-git-bc145193c164b895a52b943e73fff53952d48a60.tar.gz |
Merge 10.1 into 10.2
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) |