From 715dc5f99ddf852a5ef45bcb68c6c86298f6a7c3 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Fri, 30 Sep 2011 18:55:02 -0700 Subject: Fixed a cost estimation bug introduced into in the function best_access_path of the 5.3 code line after a merge with 5.2 on 2010-10-28 in order not to allow the cost to access a joined table to be equal to 0 ever. Expanded data sets for many test cases to get the same execution plans as before. --- mysql-test/suite/vcol/r/vcol_misc.result | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test/suite/vcol/r') diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result index 58bd048ec85..693ea0d9174 100644 --- a/mysql-test/suite/vcol/r/vcol_misc.result +++ b/mysql-test/suite/vcol/r/vcol_misc.result @@ -139,6 +139,9 @@ create table t2 (c int, d int, v int as (d+1), index idx(c)); insert into t2(c,d) values (20, 100), (20, 300), (30, 100), (30, 200), (40, 500), (70, 100), (40, 300), (60, 100), (40, 100), (70, 100); +insert into t2(c,d) values +(120, 100), (150, 300), (130, 100), (130, 200), (140, 500), +(170, 100), (180, 300), (160, 100), (40, 100), (170, 100); set join_cache_level=6; explain select * from t1,t2 where t1.b=t2.c and d <= 100; -- cgit v1.2.1 From 600a03bf53b7a55f8ecab77144c47b539586bb57 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Wed, 2 Nov 2011 19:36:08 +0400 Subject: Change the default @@optimizer_switch settings: - More test result updates --- mysql-test/suite/vcol/r/vcol_select_innodb.result | 8 ++++---- mysql-test/suite/vcol/r/vcol_select_myisam.result | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'mysql-test/suite/vcol/r') diff --git a/mysql-test/suite/vcol/r/vcol_select_innodb.result b/mysql-test/suite/vcol/r/vcol_select_innodb.result index 3e6a95caef1..fb63c6e6739 100644 --- a/mysql-test/suite/vcol/r/vcol_select_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_select_innodb.result @@ -63,8 +63,8 @@ a b c 3 -3 -3 explain select * from t1 where b in (select c from t3); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where -2 DEPENDENT SUBQUERY t3 index_subquery c c 5 func 1 Using index +1 PRIMARY t3 index c c 5 NULL 3 Using index +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) # select_type=PRIMARY, type=range,ref select * from t1 where c in (select c from t3 where c between -2 and -1); a b c @@ -73,8 +73,8 @@ a b c 1 -1 -1 explain select * from t1 where c in (select c from t3 where c between -2 and -1); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where -2 DEPENDENT SUBQUERY t3 index_subquery c c 5 func 1 Using index; Using where +1 PRIMARY t3 index c c 5 NULL 3 Using where; Using index +1 PRIMARY t1 ref c c 5 test.t3.c 1 # select_type=UNION, type=system # select_type=UNION RESULT, type= select * from t1 union select * from t2; diff --git a/mysql-test/suite/vcol/r/vcol_select_myisam.result b/mysql-test/suite/vcol/r/vcol_select_myisam.result index 657b79dc582..6922f59bf7e 100644 --- a/mysql-test/suite/vcol/r/vcol_select_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_select_myisam.result @@ -63,8 +63,8 @@ a b c 3 -3 -3 explain select * from t1 where b in (select c from t3); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where -2 DEPENDENT SUBQUERY t3 index_subquery c c 5 func 2 Using index +1 PRIMARY t3 index c c 5 NULL 3 Using index +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) # select_type=PRIMARY, type=range,ref select * from t1 where c in (select c from t3 where c between -2 and -1); a b c @@ -73,8 +73,8 @@ a b c 1 -1 -1 explain select * from t1 where c in (select c from t3 where c between -2 and -1); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where -2 DEPENDENT SUBQUERY t3 index_subquery c c 5 func 2 Using index; Using where +1 PRIMARY t3 index c c 5 NULL 3 Using where; Using index +1 PRIMARY t1 ref c c 5 test.t3.c 2 # select_type=UNION, type=system # select_type=UNION RESULT, type= select * from t1 union select * from t2; -- cgit v1.2.1