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

Fixed bug mdev-5630.

The function calculate_cond_selectivity_for_table() must consider
the case when the key range tree returned by the call of get_mm_tree()
is of the type SEL_TREE::ALWAYS.
This commit is contained in:
Igor Babaev
2014-02-11 19:22:17 -08:00
parent 50323f1263
commit 80a38b92d4
4 changed files with 63 additions and 0 deletions

View File

@ -3460,6 +3460,11 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item *cond)
table->reginfo.impossible_range= 1;
goto free_alloc;
}
else if (tree->type == SEL_TREE::ALWAYS)
{
rows= table_records;
goto free_alloc;
}
else if (tree->type == SEL_TREE::MAYBE)
{
rows= table_records;