diff options
author | Igor Babaev <igor@askmonty.org> | 2013-12-14 19:13:37 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-12-14 19:13:37 -0800 |
commit | 8efaff4959efe32ff9bc47c1bf1710cfe9ab21b5 (patch) | |
tree | 1271d94adfb6460c54ceb88d34e023516343f907 /sql/opt_range.cc | |
parent | 4bce09c104f5c9ddc3600a77c9db44dfa7fd283c (diff) | |
download | mariadb-git-8efaff4959efe32ff9bc47c1bf1710cfe9ab21b5.tar.gz |
Fixed bug mdev-5415.
Do not calculate selectivity of conditions for the tables of the information schema.
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index d90c8e88704..371d3958e7b 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -3410,6 +3410,9 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item *cond) if (table_records == 0) DBUG_RETURN(FALSE); + + if (table->pos_in_table_list->schema_table) + DBUG_RETURN(FALSE); if (thd->variables.optimizer_use_condition_selectivity > 2 && !bitmap_is_clear_all(used_fields)) |