summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2004-06-30 05:54:32 -0700
committerunknown <igor@rurik.mysql.com>2004-06-30 05:54:32 -0700
commitdefef7eec6abe4095df68fc63572d33b158a1927 (patch)
tree847d8aefd2cd8fa8fb332e355923be0b3326f06b /mysql-test
parent62746a7780c9e95e6ea37908393b87312a97b4b4 (diff)
downloadmariadb-git-defef7eec6abe4095df68fc63572d33b158a1927.tar.gz
subselect2.result, select.result:
Post-merge fixes for nested joins. The join_tab_cmp function in sql_select has been changed. join_nested.result: Post-merge fixes for nested joins. The join_tab_cmp function in sql_select has been changed sql_select.cc: Post-merge fixes for nested joins. Avoided re-execution of eliminate_not_funcs and simplify_joins in optimize_cond. Changed the join_tab_cmp function to take into account the dependent relation. sql_lex.cc, sql_lex.h: Added the first_cond_optimization flag to st_select_lex to avoid re-execution of some optimizations in optimize_cond. sql_base.cc: Post-merge fixes for nested joins. Fixed problems with a proper column list substituted for '*' in queries with natural joins. sql/sql_base.cc: Post-merge fixes for nested joins. Fixed problems with a proper column list substituted for '*' in queries with natural joins. sql/sql_lex.h: Added the first_cond_optimization flag to st_select_lex to avoid re-execution of some optimizations in optimize_cond. sql/sql_lex.cc: Added the first_cond_optimization flag to st_select_lex to avoid re-execution of some optimizations in optimize_cond. sql/sql_select.cc: Post-merge fixes for nested joins. Avoided re-execution of eliminate_not_funcs and simplify_joins in optimize_cond. Changed the join_tab_cmp function to take into account the dependent relation. mysql-test/r/join_nested.result: Post-merge fixes for nested joins. The join_tab_cmp function in sql_select has been changed mysql-test/r/select.result: Post-merge fixes for nested joins. The join_tab_cmp function in sql_select has been changed. mysql-test/r/subselect2.result: Post-merge fixes for nested joins. The join_tab_cmp function in sql_select has been changed.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/join_nested.result16
-rw-r--r--mysql-test/r/select.result12
-rw-r--r--mysql-test/r/subselect2.result2
3 files changed, 15 insertions, 15 deletions
diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result
index d9edc841925..dac8f5a5ba6 100644
--- a/mysql-test/r/join_nested.result
+++ b/mysql-test/r/join_nested.result
@@ -216,10 +216,10 @@ SELECT t6.a,t6.b,t7.a,t7.b
FROM t6,t7;
a b a b
3 2 1 1
-6 2 1 1
-6 1 1 1
3 2 2 2
+6 2 1 1
6 2 2 2
+6 1 1 1
6 1 2 2
SELECT t8.a,t8.b
FROM t8;
@@ -234,8 +234,8 @@ LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t6 ALL NULL NULL NULL NULL 3
1 SIMPLE t7 ALL NULL NULL NULL NULL 2
+1 SIMPLE t6 ALL NULL NULL NULL NULL 3
1 SIMPLE t8 ALL NULL NULL NULL NULL 2
SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
FROM t6,
@@ -245,12 +245,12 @@ t8
ON t7.b=t8.b AND t6.b < 10;
a b a b a b
3 2 1 1 NULL NULL
-6 2 1 1 NULL NULL
-6 1 1 1 NULL NULL
3 2 2 2 0 2
3 2 2 2 1 2
+6 2 1 1 NULL NULL
6 2 2 2 0 2
6 2 2 2 1 2
+6 1 1 1 NULL NULL
6 1 2 2 0 2
6 1 2 2 1 2
SELECT t5.a,t5.b
@@ -831,18 +831,18 @@ ON t3.a=1 AND t2.b=t4.b
WHERE t1.a <= 2;
a b a b a b a b
1 3 3 3 1 2 NULL NULL
-2 2 3 3 1 2 NULL NULL
1 3 3 3 2 2 NULL NULL
+2 2 3 3 1 2 NULL NULL
2 2 3 3 2 2 NULL NULL
1 3 4 2 1 2 3 2
1 3 4 2 1 2 4 2
+1 3 4 2 2 2 NULL NULL
2 2 4 2 1 2 3 2
2 2 4 2 1 2 4 2
-1 3 4 2 2 2 NULL NULL
2 2 4 2 2 2 NULL NULL
1 3 5 3 1 2 NULL NULL
-2 2 5 3 1 2 NULL NULL
1 3 5 3 2 2 NULL NULL
+2 2 5 3 1 2 NULL NULL
2 2 5 3 2 2 NULL NULL
CREATE INDEX idx_b ON t2(b);
EXPLAIN
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 0e20d39f4f0..6759702475d 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -2253,10 +2253,10 @@ a a
2 2
3 3
select * from (t1 as t2 left join t1 as t3 using (a)) natural join t1;
-a a a
-1 1 1
-2 2 2
-3 3 3
+a a
+1 1
+2 2
+3 3
drop table t1;
CREATE TABLE t1 ( aa char(2), id int(11) NOT NULL auto_increment, t2_id int(11) NOT NULL default '0', PRIMARY KEY (id), KEY replace_id (t2_id)) ENGINE=MyISAM;
INSERT INTO t1 VALUES ("1",8264,2506),("2",8299,2517),("3",8301,2518),("4",8302,2519),("5",8303,2520),("6",8304,2521),("7",8305,2522);
@@ -2283,8 +2283,8 @@ left join t4 on id3 = id4 where id2 = 1 or id4 = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 system NULL NULL NULL NULL 0 const row not found
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE t4 ALL id4 NULL NULL NULL 1
-1 SIMPLE t2 ALL NULL NULL NULL NULL 1 Using where
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1
+1 SIMPLE t4 ALL id4 NULL NULL NULL 1 Using where
select * from t1 left join t2 on id1 = id2 left join t3 on id1 = id3
left join t4 on id3 = id4 where id2 = 1 or id4 = 1;
id1 id2 id3 id4 id44
diff --git a/mysql-test/r/subselect2.result b/mysql-test/r/subselect2.result
index c2780a08d36..5a0f9db3ceb 100644
--- a/mysql-test/r/subselect2.result
+++ b/mysql-test/r/subselect2.result
@@ -121,8 +121,8 @@ c373e9f5ad07993f3859444553544200 Last Discussion c373e9f5ad079174ff1744455354420
EXPLAIN SELECT t2.*, t4.DOCTYPENAME, t1.CONTENTSIZE,t1.MIMETYPE FROM t2 INNER JOIN t4 ON t2.DOCTYPEID = t4.DOCTYPEID LEFT OUTER JOIN t1 ON t2.DOCID = t1.DOCID WHERE t2.FOLDERID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID='2f6161e879db43c1a5b82c21ddc49089' AND t3.FOLDERNAME = 'Level1') AND t3.FOLDERNAME = 'Level2') AND t3.FOLDERNAME = 'Level3') AND t3.FOLDERNAME = 'CopiedFolder') AND t3.FOLDERNAME = 'Movie Reviews') AND t2.DOCNAME = 'Last Discussion';
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL DDOCTYPEID_IDX NULL NULL NULL 10 Using where
-1 PRIMARY t4 eq_ref PRIMARY PRIMARY 32 test.t2.DOCTYPEID 1
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 32 test.t2.DOCID 1
+1 PRIMARY t4 eq_ref PRIMARY PRIMARY 32 test.t2.DOCTYPEID 1
2 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 32 func 1 Using index; Using where
3 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 32 func 1 Using index; Using where
4 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 32 func 1 Using index; Using where