[MDEV-2706] LP:724311 - Wrong result with jkl = 8 , BNLH in maria-5.3-mwl90 Created: 2011-02-24  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Philip Stoev (Inactive) Assignee: Sergei Petrunia
Resolution: Not a Bug Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug724311.xml    

 Description   

Not repeatable with maria-5.3. The following query returns no rows when executed with jkl =8 , join_cache_bka=OFF , even though there is 1 row that matches the WHERE predicate.

bzr version-info:

revision-id: <email address hidden>
date: 2011-02-20 11:35:26 +0300
build-date: 2011-02-24 15:30:06 +0200
revno: 2922
branch-nick: maria-5.3-mwl90

explain:

id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 system NULL NULL NULL NULL 1
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 const 1 Using where
1 PRIMARY <subquery3> hash distinct_key distinct_key 5 <subquery2>.COUNT( f3 ) 1 Using where; Using join buffer (flat, BNLH join)
3 SUBQUERY t1 system NULL NULL NULL NULL 1
2 SUBQUERY t2 system NULL NULL NULL NULL 1

test case:

SET SESSION join_cache_level = 8;
SET SESSION optimizer_switch = 'join_cache_bka=off';

CREATE TABLE t1 ( f1 int(11));
INSERT INTO t1 VALUES (1);

CREATE TABLE t2 ( f3 int(11));
INSERT INTO t2 VALUES (7);

CREATE TABLE t3 ( f1 int(11)) ;
INSERT INTO t3 VALUES (1);

SELECT * FROM t3
WHERE f1 IN ( SELECT COUNT( f3 ) FROM t2 )
AND f1 IN ( SELECT MIN( f1 ) FROM t1 );



 Comments   
Comment by Sergei Petrunia [ 2011-03-01 ]

Re: Wrong result with jkl = 8 , BNLH in maria-5.3-mwl90
The same problem as BUG#724228 (and that bug' fix fixes this, too)

Comment by Sergei Petrunia [ 2011-03-01 ]

Re: Wrong result with jkl = 8 , BNLH in maria-5.3-mwl90
Changing status to "Invalid", i.e. "Duplicate".

Comment by Rasmus Johansson (Inactive) [ 2011-03-01 ]

Launchpad bug id: 724311

Generated at Thu Feb 08 06:43:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.