diff options
author | unknown <igor@olga.mysql.com> | 2007-05-01 23:34:14 -0700 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-05-01 23:34:14 -0700 |
commit | 8e8ece72eb0530bee9b200d92ba14a143cd1dec9 (patch) | |
tree | 662ebe3ec338518709adb6c2784b56513fe58c62 /mysql-test/r/join_outer.result | |
parent | 5352b41d29bf3a0ca37d64acfa61527a4944812d (diff) | |
download | mariadb-git-8e8ece72eb0530bee9b200d92ba14a143cd1dec9.tar.gz |
Fixed bug #28188: performance degradation for outer join queries to which
'not exists' optimization is applied.
In fact 'not exists' optimization did not work anymore after the patch
introducing the evaluate_join_record function had been applied.
Corrected the evaluate_join_record function to respect the 'not_exists'
optimization.
mysql-test/r/join_outer.result:
Added a test case for bug #28188.
mysql-test/t/join_outer.test:
Added a test case for bug #28188.
sql/sql_select.cc:
Fixed bug #28188: performance degradation for outer join queries to which
'not exists' optimization is applied.
Corrected the evaluate_join_record function to respect the 'not_exists'
optimization.
Diffstat (limited to 'mysql-test/r/join_outer.result')
-rw-r--r-- | mysql-test/r/join_outer.result | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index df66336bd81..c62601946c2 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -1214,3 +1214,28 @@ SELECT * FROM t1 LEFT JOIN t2 USING(f1) WHERE f1='Bla'; f1 f2 f3 bla blah sheep DROP TABLE t1,t2; +CREATE TABLE t1 (id int PRIMARY KEY, a varchar(8)); +CREATE TABLE t2 (id int NOT NULL, b int NOT NULL, INDEX idx(id)); +INSERT INTO t1 VALUES +(1,'aaaaaaa'), (5,'eeeeeee'), (4,'ddddddd'), (2,'bbbbbbb'), (3,'ccccccc'); +INSERT INTO t2 VALUES +(3,10), (2,20), (5,30), (3,20), (5,10), (3,40), (3,30), (2,10), (2,40); +EXPLAIN +SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +1 SIMPLE t2 ref idx idx 4 test.t1.id 2 Using where; Not exists +flush status; +SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL; +id a +1 aaaaaaa +4 ddddddd +show status like 'Handler_read%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 5 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 6 +DROP TABLE t1,t2; |