1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed the case when statistics were not getting read because

we had the statistics tables in the FROM list of the select.
The statistics for tables are not read in such cases, so we need
to check this case separately.
This commit is contained in:
Varun Gupta
2019-05-16 13:49:47 +05:30
parent 6ab9d1627a
commit 70a5fb49a7
4 changed files with 29 additions and 1 deletions

View File

@ -3050,7 +3050,7 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
if (thd->variables.optimizer_use_condition_selectivity > 2 &&
!bitmap_is_clear_all(used_fields) &&
thd->variables.use_stat_tables > 0)
thd->variables.use_stat_tables > 0 && table->stats_is_read)
{
PARAM param;
MEM_ROOT alloc;