summaryrefslogtreecommitdiff
path: root/mysql-test/r/index_intersect.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-04-27 15:29:46 -0700
committerIgor Babaev <igor@askmonty.org>2011-04-27 15:29:46 -0700
commit1556a136acc5086971edad5258493cbf06245f84 (patch)
tree58217829996cf76487ba6177d0f3fcc09a7f984d /mysql-test/r/index_intersect.result
parent24edac2211c46ea9ebeb4a13bc467fb20008916e (diff)
downloadmariadb-git-1556a136acc5086971edad5258493cbf06245f84.tar.gz
Fixed LP bug #754521.
The function test_quick_select by mistake did not update the value of table->quick_condition_rows for index intersection scans though the specification explicitly required to do so from any table access plan once the plan provided a better upper bound for the number of rows selected from the table. It resulted in a bogus, usually very big number saved as the cost of the table access. This, in its turn, in many cases forced the optimizer to make a bad choice of the execution plan for join queries.
Diffstat (limited to 'mysql-test/r/index_intersect.result')
-rw-r--r--mysql-test/r/index_intersect.result7
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/r/index_intersect.result b/mysql-test/r/index_intersect.result
index 33654979d93..713674430cf 100644
--- a/mysql-test/r/index_intersect.result
+++ b/mysql-test/r/index_intersect.result
@@ -998,6 +998,13 @@ ID Name Country Population
1898 Chengdu CHN 3361500
1900 Changchun CHN 2812000
1910 Changsha CHN 1809800
+EXPLAIN
+SELECT * FROM City, Country
+WHERE City.Name LIKE 'C%' AND City.Population > 1000000 AND
+Country.Code=City.Country;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE City index_merge Population,Name,CountryID,CountryName Name,Population 35,4 NULL # Using sort_intersect(Name,Population); Using where
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country #
DROP DATABASE world;
use test;
CREATE TABLE t1 (