diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2012-05-12 12:27:26 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2012-05-12 12:27:26 +0400 |
commit | 4dff59a31b38b9cdd299f72b443f4c3ebf1c97b1 (patch) | |
tree | dec1eed48bf452365b6e9c7ac1f49573079937cf | |
parent | e10fecc02f57980ddc27bafb9d1f620e8533f4a3 (diff) | |
parent | e1b6e1b899b48fd6ebdaa4a8bf8d89757e784481 (diff) | |
download | mariadb-git-4dff59a31b38b9cdd299f72b443f4c3ebf1c97b1.tar.gz |
Merge 5.2->5.3
-rw-r--r-- | mysql-test/r/table_elim.result | 21 | ||||
-rw-r--r-- | mysql-test/t/table_elim.test | 24 |
2 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/r/table_elim.result b/mysql-test/r/table_elim.result index 9b2656c17e4..35acd30d76d 100644 --- a/mysql-test/r/table_elim.result +++ b/mysql-test/r/table_elim.result @@ -570,6 +570,27 @@ id select_type table type possible_keys key key_len ref rows Extra # as that violates the "no interleaving of outer join nests" rule. DROP TABLE t1,t2,t3,t4,t5; # +# BUG#997747: Assertion `join->best_read < ((double)1.79..5e+308L)' +# failed in greedy_search with LEFT JOINs and unique keys +# +CREATE TABLE t1 (a1 INT); +CREATE TABLE t2 (b1 INT); +CREATE TABLE t3 (c1 INT, UNIQUE KEY(c1)); +CREATE TABLE t4 (d1 INT, UNIQUE KEY(d1)); +CREATE TABLE t5 (e1 INT); +INSERT INTO t1 VALUES (1),(2); +INSERT INTO t2 VALUES (2),(3); +INSERT INTO t3 VALUES (3),(4); +INSERT INTO t4 VALUES (4),(5); +INSERT INTO t5 VALUES (5),(6); +SELECT a1 FROM t1 LEFT JOIN t2 LEFT JOIN t3 LEFT JOIN t4 +ON c1 = d1 ON d1 = b1 ON a1 = b1 +LEFT JOIN t5 ON a1 = e1 ; +a1 +1 +2 +DROP TABLE t1,t2,t3,t4,t5; +# # BUG#884184: Wrong result with RIGHT JOIN + derived_merge # CREATE TABLE t1 (a int(11), b varchar(1)) ; diff --git a/mysql-test/t/table_elim.test b/mysql-test/t/table_elim.test index dc32618eb8c..a957e24e393 100644 --- a/mysql-test/t/table_elim.test +++ b/mysql-test/t/table_elim.test @@ -504,6 +504,28 @@ WHERE t3.f2 ; DROP TABLE t1,t2,t3,t4,t5; --echo # +--echo # BUG#997747: Assertion `join->best_read < ((double)1.79..5e+308L)' +--echo # failed in greedy_search with LEFT JOINs and unique keys +--echo # +CREATE TABLE t1 (a1 INT); +CREATE TABLE t2 (b1 INT); +CREATE TABLE t3 (c1 INT, UNIQUE KEY(c1)); +CREATE TABLE t4 (d1 INT, UNIQUE KEY(d1)); +CREATE TABLE t5 (e1 INT); + +INSERT INTO t1 VALUES (1),(2); +INSERT INTO t2 VALUES (2),(3); +INSERT INTO t3 VALUES (3),(4); +INSERT INTO t4 VALUES (4),(5); +INSERT INTO t5 VALUES (5),(6); + +SELECT a1 FROM t1 LEFT JOIN t2 LEFT JOIN t3 LEFT JOIN t4 +ON c1 = d1 ON d1 = b1 ON a1 = b1 +LEFT JOIN t5 ON a1 = e1 ; + +DROP TABLE t1,t2,t3,t4,t5; + +--echo # --echo # BUG#884184: Wrong result with RIGHT JOIN + derived_merge --echo # CREATE TABLE t1 (a int(11), b varchar(1)) ; @@ -521,4 +543,6 @@ EXPLAIN SELECT alias1.* FROM t3 LEFT JOIN v1 as alias1 ON ( t3.a = alias1.b ); drop view v1; DROP TABLE t1,t2,t3; + + SET optimizer_switch=@save_optimizer_switch; |