maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #02854
bzr commit into file:///home/tsk/mprog/src/5.3-subqueries/ branch (timour:2788)
#At file:///home/tsk/mprog/src/5.3-subqueries/ based on revid:psergey@xxxxxxxxxxxx-20100329200940-9ikx6gpww0gtsx00
2788 timour@xxxxxxxxxxxx 2010-04-02
MWL#68: Subquery optimization: Efficient NOT IN execution with NULLs
Fixed an error where the priority queue for the indexes used for partial
matching was not emptied after each execution in all cases.
modified:
sql/item_subselect.cc
=== modified file 'sql/item_subselect.cc'
--- a/sql/item_subselect.cc 2010-03-29 14:04:35 +0000
+++ b/sql/item_subselect.cc 2010-04-02 14:27:06 +0000
@@ -3882,8 +3882,9 @@ subselect_hash_sj_engine::make_unique_en
cur_ref_buff + test(maybe_null), we could
use that information instead.
*/
+
cur_ref_buff + null_count,
- null_count ? tab->ref.key_buff : 0,
+ null_count ? cur_ref_buff : 0,
cur_key_part->length, tab->ref.items[i]);
cur_ref_buff+= cur_key_part->store_length;
}
@@ -4908,6 +4909,8 @@ bool subselect_rowid_merge_engine::parti
/* If there is a non-NULL key, it must be the first key in the keys array. */
DBUG_ASSERT(!non_null_key || (non_null_key && merge_keys[0] == non_null_key));
+ /* The prioryty queue for keys must be empty. */
+ DBUG_ASSERT(!pq.elements);
/* All data accesses during execution are via handler::ha_rnd_pos() */
tmp_table->file->ha_rnd_init(0);
@@ -5031,6 +5034,7 @@ bool subselect_rowid_merge_engine::parti
DBUG_ASSERT(FALSE);
end:
+ queue_remove_all(&pq);
tmp_table->file->ha_rnd_end();
return res;
}
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: timour@xxxxxxxxxxxx-20100402142706-klcgi39tjzhvy22z
# target_branch: file:///home/tsk/mprog/src/5.3-subqueries/
# testament_sha1: 4fde523e2e0dc9c7d4f88387713d20721fbc0bdd
# timestamp: 2010-04-02 17:27:10 +0300
# source_branch: file:///home/tsk/mprog/src/5.3-mwl68/
# base_revision_id: psergey@xxxxxxxxx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