summaryrefslogtreecommitdiff
path: root/sql/sql_join_cache.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-08-31 14:15:52 +0200
committerSergei Golubchik <sergii@pisem.net>2012-08-31 14:15:52 +0200
commit59408093d1add69dd4cd3d1674a73712528aed92 (patch)
tree85e7d74ddb7c0a74c6c434b9c3dacfe9b7ebe2a3 /sql/sql_join_cache.cc
parenta1fd37b1fd5803188d3f8b44914cca459f6e622f (diff)
parent51e14492e9410718056b0c6d9d4dabd4a96e8070 (diff)
downloadmariadb-git-59408093d1add69dd4cd3d1674a73712528aed92.tar.gz
5.3 merge
Diffstat (limited to 'sql/sql_join_cache.cc')
-rw-r--r--sql/sql_join_cache.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc
index f953cf4df57..91a98d8c6f1 100644
--- a/sql/sql_join_cache.cc
+++ b/sql/sql_join_cache.cc
@@ -3876,8 +3876,9 @@ int JOIN_TAB_SCAN_MRR::next()
If a record in in an incremental cache contains no fields then the
association for the last record in cache will be equal to cache->end_pos
*/
- DBUG_ASSERT(cache->buff <= (uchar *) (*ptr) &&
- (uchar *) (*ptr) <= cache->end_pos);
+ DBUG_ASSERT((!(mrr_mode & HA_MRR_NO_ASSOCIATION))?
+ (cache->buff <= (uchar *) (*ptr) &&
+ (uchar *) (*ptr) <= cache->end_pos): TRUE);
if (join_tab->table->vfield)
update_virtual_fields(join->thd, join_tab->table);
}
@@ -4543,7 +4544,7 @@ bool JOIN_CACHE_BKAH::prepare_look_for_matches(bool skip_last)
{
last_matching_rec_ref_ptr= next_matching_rec_ref_ptr= 0;
if (no_association &&
- (curr_matching_chain= get_matching_chain_by_join_key()))
+ !(curr_matching_chain= get_matching_chain_by_join_key()))
return 1;
last_matching_rec_ref_ptr= get_next_rec_ref(curr_matching_chain);
return 0;