Commit graph

4 commits

Author SHA1 Message Date
Igor Babaev
f4503f39ee Fixed bug #52394 / LP bug #623209.
When an incremental join cache is used to join a table whose
fields are not referenced anywhere in the query the association
pointer to the last record in the such cache can be the same
as the pointer to the end of the buffer. 
The function JOIN_CACHE_BKA::get_next_key must take into 
consideration this when iterating over the keys of the records
from the join buffer. 
The assertion in JOIN_TAB_SCAN_MRR::next also must take this
into consideration.
Borrowed a slightly changed test case from a patch attached to the
bug #52394.
2010-09-21 16:41:53 -07:00
Igor Babaev
94cfcbd9df The main patch for MWL#128: Implement Block Nested Loop Hash Join. 2010-08-31 09:34:21 -07:00
Igor Babaev
1c7ba7ba2f Fixed bug #51092.
The function JOIN_CACHE::read_all_record_fields could return 0
for an incremental join cache in two cases:
1. there were no more records in the associated join buffer
2. there was no table fields stored in the join buffer.
As a result the function JOIN_CACHE::get_record() could
return prematurely and did not read all needed fields from
join buffers into the record buffer.

Now the function JOIN_CACHE::read_all_record_fields returns
-1 if there are no more records in the associated join buffer.
2010-03-06 11:14:55 -08:00
Igor Babaev
4449a5f489 Backport into MariaDB-5.2 the following:
WL#2771 "Block Nested Loop Join and Batched Key Access Join"
2009-12-20 18:26:15 -08:00