[Commits] Rev 3565: Fix bugs in BatchedKeyAccess that show up when working with a in file:///home/psergey/dev2/5.3-look5/

Sergey Petrunya psergey at askmonty.org
Tue Aug 28 12:51:02 EEST 2012


At file:///home/psergey/dev2/5.3-look5/

------------------------------------------------------------
revno: 3565
revision-id: psergey at askmonty.org-20120828095101-ej07uciva11ixq6g
parent: sergii at pisem.net-20120824214318-ra5ipntw7udwfoki
committer: Sergey Petrunya <psergey at askmonty.org>
branch nick: 5.3-look5
timestamp: Tue 2012-08-28 13:51:01 +0400
message:
  Fix bugs in BatchedKeyAccess that show up when working with a 
  storage engine in HA_MRR_NO_ASSOCIATION mode.
  (there is no testcase because we don't ship any such engines currently)
=== modified file 'sql/sql_join_cache.cc'
--- a/sql/sql_join_cache.cc	2012-03-23 16:22:39 +0000
+++ b/sql/sql_join_cache.cc	2012-08-28 09:51:01 +0000
@@ -3875,8 +3875,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);
   }
@@ -4542,7 +4543,7 @@ bool JOIN_CACHE_BKAH::prepare_look_for_m
 {
   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;



More information about the commits mailing list