diff options
author | unknown <timour@askmonty.org> | 2011-02-15 22:17:18 +0200 |
---|---|---|
committer | unknown <timour@askmonty.org> | 2011-02-15 22:17:18 +0200 |
commit | 96efe1cab3861bedc9d1f30812b1d6557d8f1585 (patch) | |
tree | 694317f7d347ba81d63566780e60b4086bd97fa4 /mysql-test/t/subselect_mat_cost.test | |
parent | 6c45d903f009c600ca5df628000eefed0762916b (diff) | |
download | mariadb-git-96efe1cab3861bedc9d1f30812b1d6557d8f1585.tar.gz |
Fix for LP BUG#714808 and LP BUG#719280.
The patch also adjusts several instable test results
to order the result.
Analysis:
The function prev_record_reads() may skip (jump over)
some query plan nodes where record_count < 1. At the
same time, even though get_partial_join_cost() uses
all first N plan nodes after the last constant table,
it may produce a smaller record_count than
prev_record_reads(), because the record count for
some plan nodes may be < 1, and these nodes may not
participate in prev_record_reads.
Solution:
The current solution is to treat the result of
get_partial_join_cost() as the upper bound for the
total number of unique lookup keys.
Diffstat (limited to 'mysql-test/t/subselect_mat_cost.test')
-rw-r--r-- | mysql-test/t/subselect_mat_cost.test | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/mysql-test/t/subselect_mat_cost.test b/mysql-test/t/subselect_mat_cost.test index 0606cec80ed..3c5f1a680f9 100644 --- a/mysql-test/t/subselect_mat_cost.test +++ b/mysql-test/t/subselect_mat_cost.test @@ -366,7 +366,7 @@ EXPLAIN SELECT f2 FROM t3 WHERE ( ) ) IS NULL ; -drop table t1, t2; +drop table t1, t2, t3; --echo # --echo # LP BUG#715034 Item_sum_distinct::clear(): Assertion `tree != 0' failed @@ -437,3 +437,22 @@ WHERE (SELECT t1.f1 ORDER BY field1; drop table t1,t2; + +--echo # +--echo # LP BUG#601124 Bug in eliminate_item_equal +--echo # leads to crash in Item_func::Item_func + +CREATE TABLE t1 ( f1 int(11), f3 varchar(1)) ; +INSERT INTO t1 VALUES (5,'m'),(NULL,'c'); + +CREATE TABLE t2 ( f2 int(11), f3 varchar(1)) ; +INSERT INTO t2 VALUES (6,'f'),(2,'d'); + +CREATE TABLE t3 ( f2 int(11), f3 varchar(1)) ; +INSERT INTO t3 VALUES (6,'f'),(2,'d'); + +SELECT * FROM t3 +WHERE ( f2 ) IN (SELECT t1.f1 + FROM t1 STRAIGHT_JOIN t2 ON t2.f3 = t1.f3 + WHERE t2.f3 = 'c'); +drop table t1,t2,t3; |