diff options
author | Georgi Kodinov <joro@sun.com> | 2009-01-16 12:45:17 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-01-16 12:45:17 +0200 |
commit | b385a2d8a57bfb5958b2b4a6a3c49fbb9cecf226 (patch) | |
tree | 9651bd021695250d0a8b2851a322bc86d200b55a /mysql-test/r/greedy_optimizer.result | |
parent | 637d4880278cd601a9d788442c098466d6773323 (diff) | |
parent | 683542698ffe2be3c6e588d4d99964a5a2041c51 (diff) | |
download | mariadb-git-b385a2d8a57bfb5958b2b4a6a3c49fbb9cecf226.tar.gz |
merged 5.0-bugteam -> 5.1-bugtteam
Diffstat (limited to 'mysql-test/r/greedy_optimizer.result')
-rw-r--r-- | mysql-test/r/greedy_optimizer.result | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/mysql-test/r/greedy_optimizer.result b/mysql-test/r/greedy_optimizer.result index 9e8c66722e3..c0012c297d1 100644 --- a/mysql-test/r/greedy_optimizer.result +++ b/mysql-test/r/greedy_optimizer.result @@ -655,3 +655,80 @@ show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 drop table t1,t2,t3,t4,t5,t6,t7; +CREATE TABLE t1 (a int, b int, d int, i int); +INSERT INTO t1 VALUES (1,1,1,1); +CREATE TABLE t2 (b int, c int, j int); +INSERT INTO t2 VALUES (1,1,1); +CREATE TABLE t2_1 (j int); +INSERT INTO t2_1 VALUES (1); +CREATE TABLE t3 (c int, f int); +INSERT INTO t3 VALUES (1,1); +CREATE TABLE t3_1 (f int); +INSERT INTO t3_1 VALUES (1); +CREATE TABLE t4 (d int, e int, k int); +INSERT INTO t4 VALUES (1,1,1); +CREATE TABLE t4_1 (k int); +INSERT INTO t4_1 VALUES (1); +CREATE TABLE t5 (g int, d int, h int, l int); +INSERT INTO t5 VALUES (1,1,1,1); +CREATE TABLE t5_1 (l int); +INSERT INTO t5_1 VALUES (1); +SET optimizer_search_depth = 3; +SELECT 1 +FROM t1 +LEFT JOIN ( +t2 JOIN t3 ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( +t4 JOIN t5 ON t5.d = t4.d +) ON t4.d = t1.d +; +1 +1 +SELECT 1 +FROM t1 +LEFT JOIN ( +t2 LEFT JOIN (t3 JOIN t3_1 ON t3.f = t3_1.f) ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( +t4 JOIN t5 ON t5.d = t4.d +) ON t4.d = t1.d +; +1 +1 +SELECT 1 +FROM t1 +LEFT JOIN ( +(t2 JOIN t2_1 ON t2.j = t2_1.j) JOIN t3 ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( +t4 JOIN t5 ON t5.d = t4.d +) ON t4.d = t1.d +; +1 +1 +SELECT 1 +FROM t1 +LEFT JOIN ( +t2 JOIN t3 ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( +(t4 JOIN t4_1 ON t4.k = t4_1.k) LEFT JOIN t5 ON t5.d = t4.d +) ON t4.d = t1.d +; +1 +1 +SELECT 1 +FROM t1 +LEFT JOIN ( +t2 JOIN t3 ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( +t4 LEFT JOIN (t5 JOIN t5_1 ON t5.l = t5_1.l) ON t5.d = t4.d +) ON t4.d = t1.d +; +1 +1 +SET optimizer_search_depth = DEFAULT; +DROP TABLE t1,t2,t2_1,t3,t3_1,t4,t4_1,t5,t5_1; +End of 5.0 tests |