MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:July 4 2010 3:47pm
Subject:bzr commit into mysql-next-mr-opt-backporting branch (guilhem:3209) Bug#54359
View as plain text  
#At file:///home/mysql_src/bzrrepos_new/opt-back-54359/ based on revid:epotemkin@stripped

 3209 Guilhem Bichot	2010-07-04
      Fix for BUG#54359 "Extra rows with join_cache_level=7,8 and two joins
      --and multi-column index"; pushed index condition wasn't correctly checked
      in BKA_UNIQUE.
     @ mysql-test/include/join_cache.inc
        test for bug
     @ mysql-test/r/join_cache_jcl1.result
        correct result
     @ mysql-test/r/join_cache_jcl7.result
        without the code fix, result of SELECT would be 5,5,9,9 instead of 9,9
     @ mysql-test/r/join_cache_jcl8.result
        without the code fix, result of SELECT would be 5,5,9,9 instead of 9,9
     @ sql/sql_join_cache.cc
        See added doxygen comments.
        Without this fix, in the testcase (see join_cache.inc) we had this:
        - this is BKA_UNIQUE, which prepares distinct keys for lookup in table3's index,
        which lookup will satisfy
          table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`
        - the two cached records of table2 have the same distinct key prefix 'k'
        - the index condition pushed to table3 is
          table3 .`col_int_key`  >= table2 .`pk`
        - a lookup for 'k' in table3 is done using the available index, the
        found index tuples also provide the value of table3.col_int_key: we have
        (9,'k') and (5,'k')
        - both index tuples are not eliminated by bka_unique_skip_index_tuple() as
        each of them satisfies the pushed condition when paired with at least
        one table2's cached record: (9,'k') paired with (4,9,'k','k'), (5,'k')
        paired with (4,9,'k','k')
        - the two table3 records corresponding to the accepted index tuples are
        retrieved
        - and, in join_matching_records(), joined with the two table2 records
        having distinct key 'k'; the mistake is here; we had determined in
        bka_unique_skip_index_tuple() than the two table3 records 
        would join with at least one cached table2 record; it doesn't mean that
        they join with all cached table2 records. A re-check of the index
        condition is needed. We do it in check_match().
     @ sql/sql_select.h
        subclasses of JOIN_CACHE can now specialize check_match():
        BKA_UNIQUE does so.

    modified:
      mysql-test/include/join_cache.inc
      mysql-test/r/join_cache_jcl1.result
      mysql-test/r/join_cache_jcl2.result
      mysql-test/r/join_cache_jcl3.result
      mysql-test/r/join_cache_jcl4.result
      mysql-test/r/join_cache_jcl5.result
      mysql-test/r/join_cache_jcl6.result
      mysql-test/r/join_cache_jcl7.result
      mysql-test/r/join_cache_jcl8.result
      sql/sql_join_cache.cc
      sql/sql_select.h
=== modified file 'mysql-test/include/join_cache.inc'
--- a/mysql-test/include/join_cache.inc	2010-06-20 07:16:27 +0000
+++ b/mysql-test/include/join_cache.inc	2010-07-04 15:46:57 +0000
@@ -1500,3 +1500,29 @@ explain SELECT t2.a FROM t1 LEFT JOIN t2
 SELECT t2.a FROM t1 LEFT JOIN t2 ON t2.b  = t1.b;
 
 DROP TABLE t1,t2;
+
+--echo #
+--echo # BUG#54359 "Extra rows with join_cache_level=7,8 and two joins
+--echo # --and multi-column index"
+--echo #
+
+CREATE TABLE t1 (
+  `pk` int(11) NOT NULL,
+  `col_int_key` int(11) DEFAULT NULL,
+  `col_varchar_key` varchar(1) DEFAULT NULL,
+  `col_varchar_nokey` varchar(1) DEFAULT NULL,
+  KEY `col_varchar_key` (`col_varchar_key`,`col_int_key`))
+;
+
+INSERT INTO t1 VALUES (4,9,'k','k');
+INSERT INTO t1 VALUES (12,5,'k','k');
+
+let $query_i= SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+ and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+
+eval explain $query_i;
+eval $query_i;
+
+drop table t1;

=== modified file 'mysql-test/r/join_cache_jcl1.result'
--- a/mysql-test/r/join_cache_jcl1.result	2010-06-20 07:27:25 +0000
+++ b/mysql-test/r/join_cache_jcl1.result	2010-07-04 15:46:57 +0000
@@ -2165,4 +2165,32 @@ a
 NULL
 NULL
 DROP TABLE t1,t2;
+#
+# BUG#54359 "Extra rows with join_cache_level=7,8 and two joins
+# --and multi-column index"
+#
+CREATE TABLE t1 (
+`pk` int(11) NOT NULL,
+`col_int_key` int(11) DEFAULT NULL,
+`col_varchar_key` varchar(1) DEFAULT NULL,
+`col_varchar_nokey` varchar(1) DEFAULT NULL,
+KEY `col_varchar_key` (`col_varchar_key`,`col_int_key`))
+;
+INSERT INTO t1 VALUES (4,9,'k','k');
+INSERT INTO t1 VALUES (12,5,'k','k');
+explain SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	table2	ALL	NULL	NULL	NULL	NULL	2	Using where
+1	SIMPLE	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_nokey	1	Using index condition; Using where
+SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+col_int_key
+9
+9
+drop table t1;
 set optimizer_join_cache_level = default;

=== modified file 'mysql-test/r/join_cache_jcl2.result'
--- a/mysql-test/r/join_cache_jcl2.result	2010-06-20 07:16:27 +0000
+++ b/mysql-test/r/join_cache_jcl2.result	2010-07-04 15:46:57 +0000
@@ -2165,4 +2165,32 @@ a
 NULL
 NULL
 DROP TABLE t1,t2;
+#
+# BUG#54359 "Extra rows with join_cache_level=7,8 and two joins
+# --and multi-column index"
+#
+CREATE TABLE t1 (
+`pk` int(11) NOT NULL,
+`col_int_key` int(11) DEFAULT NULL,
+`col_varchar_key` varchar(1) DEFAULT NULL,
+`col_varchar_nokey` varchar(1) DEFAULT NULL,
+KEY `col_varchar_key` (`col_varchar_key`,`col_int_key`))
+;
+INSERT INTO t1 VALUES (4,9,'k','k');
+INSERT INTO t1 VALUES (12,5,'k','k');
+explain SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	table2	ALL	NULL	NULL	NULL	NULL	2	Using where
+1	SIMPLE	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_nokey	1	Using index condition; Using where
+SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+col_int_key
+9
+9
+drop table t1;
 set optimizer_join_cache_level = default;

=== modified file 'mysql-test/r/join_cache_jcl3.result'
--- a/mysql-test/r/join_cache_jcl3.result	2010-06-20 07:16:27 +0000
+++ b/mysql-test/r/join_cache_jcl3.result	2010-07-04 15:46:57 +0000
@@ -2165,4 +2165,32 @@ a
 NULL
 NULL
 DROP TABLE t1,t2;
+#
+# BUG#54359 "Extra rows with join_cache_level=7,8 and two joins
+# --and multi-column index"
+#
+CREATE TABLE t1 (
+`pk` int(11) NOT NULL,
+`col_int_key` int(11) DEFAULT NULL,
+`col_varchar_key` varchar(1) DEFAULT NULL,
+`col_varchar_nokey` varchar(1) DEFAULT NULL,
+KEY `col_varchar_key` (`col_varchar_key`,`col_int_key`))
+;
+INSERT INTO t1 VALUES (4,9,'k','k');
+INSERT INTO t1 VALUES (12,5,'k','k');
+explain SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	table2	ALL	NULL	NULL	NULL	NULL	2	Using where
+1	SIMPLE	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_nokey	1	Using index condition; Using where
+SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+col_int_key
+9
+9
+drop table t1;
 set optimizer_join_cache_level = default;

=== modified file 'mysql-test/r/join_cache_jcl4.result'
--- a/mysql-test/r/join_cache_jcl4.result	2010-06-20 07:16:27 +0000
+++ b/mysql-test/r/join_cache_jcl4.result	2010-07-04 15:46:57 +0000
@@ -2165,4 +2165,32 @@ a
 NULL
 NULL
 DROP TABLE t1,t2;
+#
+# BUG#54359 "Extra rows with join_cache_level=7,8 and two joins
+# --and multi-column index"
+#
+CREATE TABLE t1 (
+`pk` int(11) NOT NULL,
+`col_int_key` int(11) DEFAULT NULL,
+`col_varchar_key` varchar(1) DEFAULT NULL,
+`col_varchar_nokey` varchar(1) DEFAULT NULL,
+KEY `col_varchar_key` (`col_varchar_key`,`col_int_key`))
+;
+INSERT INTO t1 VALUES (4,9,'k','k');
+INSERT INTO t1 VALUES (12,5,'k','k');
+explain SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	table2	ALL	NULL	NULL	NULL	NULL	2	Using where
+1	SIMPLE	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_nokey	1	Using index condition; Using where
+SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+col_int_key
+9
+9
+drop table t1;
 set optimizer_join_cache_level = default;

=== modified file 'mysql-test/r/join_cache_jcl5.result'
--- a/mysql-test/r/join_cache_jcl5.result	2010-06-20 07:16:27 +0000
+++ b/mysql-test/r/join_cache_jcl5.result	2010-07-04 15:46:57 +0000
@@ -2165,4 +2165,32 @@ a
 NULL
 NULL
 DROP TABLE t1,t2;
+#
+# BUG#54359 "Extra rows with join_cache_level=7,8 and two joins
+# --and multi-column index"
+#
+CREATE TABLE t1 (
+`pk` int(11) NOT NULL,
+`col_int_key` int(11) DEFAULT NULL,
+`col_varchar_key` varchar(1) DEFAULT NULL,
+`col_varchar_nokey` varchar(1) DEFAULT NULL,
+KEY `col_varchar_key` (`col_varchar_key`,`col_int_key`))
+;
+INSERT INTO t1 VALUES (4,9,'k','k');
+INSERT INTO t1 VALUES (12,5,'k','k');
+explain SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	table2	ALL	NULL	NULL	NULL	NULL	2	Using where
+1	SIMPLE	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_nokey	1	Using index condition; Using where; Using join buffer (BKA, regular buffers)
+SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+col_int_key
+9
+9
+drop table t1;
 set optimizer_join_cache_level = default;

=== modified file 'mysql-test/r/join_cache_jcl6.result'
--- a/mysql-test/r/join_cache_jcl6.result	2010-06-20 07:16:27 +0000
+++ b/mysql-test/r/join_cache_jcl6.result	2010-07-04 15:46:57 +0000
@@ -2165,4 +2165,32 @@ a
 NULL
 NULL
 DROP TABLE t1,t2;
+#
+# BUG#54359 "Extra rows with join_cache_level=7,8 and two joins
+# --and multi-column index"
+#
+CREATE TABLE t1 (
+`pk` int(11) NOT NULL,
+`col_int_key` int(11) DEFAULT NULL,
+`col_varchar_key` varchar(1) DEFAULT NULL,
+`col_varchar_nokey` varchar(1) DEFAULT NULL,
+KEY `col_varchar_key` (`col_varchar_key`,`col_int_key`))
+;
+INSERT INTO t1 VALUES (4,9,'k','k');
+INSERT INTO t1 VALUES (12,5,'k','k');
+explain SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	table2	ALL	NULL	NULL	NULL	NULL	2	Using where
+1	SIMPLE	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_nokey	1	Using index condition; Using where; Using join buffer (BKA, incremental buffers)
+SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+col_int_key
+9
+9
+drop table t1;
 set optimizer_join_cache_level = default;

=== modified file 'mysql-test/r/join_cache_jcl7.result'
--- a/mysql-test/r/join_cache_jcl7.result	2010-06-20 07:16:27 +0000
+++ b/mysql-test/r/join_cache_jcl7.result	2010-07-04 15:46:57 +0000
@@ -2165,4 +2165,32 @@ a
 NULL
 NULL
 DROP TABLE t1,t2;
+#
+# BUG#54359 "Extra rows with join_cache_level=7,8 and two joins
+# --and multi-column index"
+#
+CREATE TABLE t1 (
+`pk` int(11) NOT NULL,
+`col_int_key` int(11) DEFAULT NULL,
+`col_varchar_key` varchar(1) DEFAULT NULL,
+`col_varchar_nokey` varchar(1) DEFAULT NULL,
+KEY `col_varchar_key` (`col_varchar_key`,`col_int_key`))
+;
+INSERT INTO t1 VALUES (4,9,'k','k');
+INSERT INTO t1 VALUES (12,5,'k','k');
+explain SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	table2	ALL	NULL	NULL	NULL	NULL	2	Using where
+1	SIMPLE	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_nokey	1	Using index condition; Using where; Using join buffer (BKA_UNIQUE, regular buffers)
+SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+col_int_key
+9
+9
+drop table t1;
 set optimizer_join_cache_level = default;

=== modified file 'mysql-test/r/join_cache_jcl8.result'
--- a/mysql-test/r/join_cache_jcl8.result	2010-06-20 07:16:27 +0000
+++ b/mysql-test/r/join_cache_jcl8.result	2010-07-04 15:46:57 +0000
@@ -2165,4 +2165,32 @@ a
 NULL
 NULL
 DROP TABLE t1,t2;
+#
+# BUG#54359 "Extra rows with join_cache_level=7,8 and two joins
+# --and multi-column index"
+#
+CREATE TABLE t1 (
+`pk` int(11) NOT NULL,
+`col_int_key` int(11) DEFAULT NULL,
+`col_varchar_key` varchar(1) DEFAULT NULL,
+`col_varchar_nokey` varchar(1) DEFAULT NULL,
+KEY `col_varchar_key` (`col_varchar_key`,`col_int_key`))
+;
+INSERT INTO t1 VALUES (4,9,'k','k');
+INSERT INTO t1 VALUES (12,5,'k','k');
+explain SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	table2	ALL	NULL	NULL	NULL	NULL	2	Using where
+1	SIMPLE	table3	ref	col_varchar_key	col_varchar_key	4	test.table2.col_varchar_nokey	1	Using index condition; Using where; Using join buffer (BKA_UNIQUE, incremental buffers)
+SELECT table2 .`col_int_key` FROM t1 table2,
+t1 table3 force index (`col_varchar_key`)
+where table3 .`pk` and table3 .`col_int_key`  >= table2 .`pk`  
+and table3 .`col_varchar_key`  = table2 .`col_varchar_nokey`;
+col_int_key
+9
+9
+drop table t1;
 set optimizer_join_cache_level = default;

=== modified file 'sql/sql_join_cache.cc'
--- a/sql/sql_join_cache.cc	2010-06-20 08:20:59 +0000
+++ b/sql/sql_join_cache.cc	2010-07-04 15:46:57 +0000
@@ -1985,7 +1985,7 @@ enum_nested_loop_state JOIN_CACHE::gener
     FALSE  there is no match
 */ 
 
-inline bool JOIN_CACHE::check_match(uchar *rec_ptr)
+bool JOIN_CACHE::check_match(uchar *rec_ptr)
 {
   /* Check whether pushdown conditions are satisfied */
   if (join_tab->select && join_tab->select->skip_record())
@@ -3037,35 +3037,43 @@ bool bka_unique_range_seq_skip_record(ra
 }
 
  
-/*
+/**
   Check if the record combination matches the index condition
 
-  SYNOPSIS
-    JOIN_CACHE_BKA_UNIQUE::skip_index_tuple()
-      rseq             Value returned by bka_range_seq_init()
-      range_info       MRR range association data
-    
-  DESCRIPTION
-    See JOIN_CACHE_BKA::skip_index_tuple().
-    This function is the variant for use with
-    JOIN_CACHE_BKA_UNIQUE. The difference from JOIN_CACHE_BKA case is that
-    there may be multiple previous table record combinations that share the
-    same key, i.e. they map to the same MRR range.
-    As a consequence, we need to loop through all previous table record
-    combinations that match the given MRR range key range_info until we find
-    one that satisfies the index condition.
+  @param  rseq             Value returned by bka_range_seq_init()
+  @param  range_info       MRR range association data
 
-  NOTE
-    Possible optimization:
-    Before we unpack the record from a previous table
-    check if this table is used in the condition.
-    If so then unpack the record otherwise skip the unpacking.
-    This should be done by a special virtual method
-    get_partial_record_by_pos().
+  @sa JOIN_CACHE_BKA::skip_index_tuple().
+  This function is the variant for use with
+  JOIN_CACHE_BKA_UNIQUE. The difference from JOIN_CACHE_BKA case is that
+  there may be multiple previous table record combinations that share the
+  same key, i.e. they map to the same MRR range. And for all of those
+  records, we have just done one single key lookup in the current table,
+  found an index tuple. If in this function we discard this index tuple, all
+  those records will be eliminated from the result. Thus, in this function
+  we can discard the index tuple only if _all_ those cached records and the
+  index tuple don't match the pushed index condition. It's a "group-wide
+  decision".
+  Thus we must here loop through all previous table records combinations
+  that match the given MRR range key range_info, searching for a single one
+  matching the index condition.
+  If we find none, we can safely discard the index tuple here, which avoids
+  retrieving the record from the current table.
+  If we instead find one, we cannot discard the index tuple here; later in
+  execution, in join_matching_records(), we can finally take one
+  "case-by-case decision" per cached record, by checking again the index
+  condition (@sa JOIN_CACHE_BKA_UNIQUE::check_match).
+
+  @note
+  Possible optimization:
+  Before we unpack the record from a previous table
+  check if this table is used in the condition.
+  If so then unpack the record otherwise skip the unpacking.
+  This should be done by a special virtual method
+  get_partial_record_by_pos().
 
-  RETURN
-    0    The record combination satisfies the index condition
-    1    Otherwise
+  @retval false  The record combination satisfies the index condition
+  @retval true   Otherwise
 
 
 */
@@ -3337,6 +3345,28 @@ uint JOIN_CACHE_BKA_UNIQUE::get_next_key
 }
 
 
+/**
+  Check matching to a partial join record from the join buffer, an
+  implementation specialized for JOIN_CACHE_BKA_UNIQUE.
+  Only JOIN_CACHE_BKA_UNIQUE needs that, because it's the only cache using
+  distinct keys.
+  JOIN_CACHE_BKA, on the other hand, does one key lookup per cached
+  record, so can take a per-record individualized decision for the pushed
+  index condition as soon as it has the index tuple.
+  @sa JOIN_CACHE_BKA_UNIQUE::skip_index_tuple
+  @sa JOIN_CACHE::check_match
+ */
+bool JOIN_CACHE_BKA_UNIQUE::check_match(uchar *rec_ptr)
+{
+  /* recheck pushed down index condition */
+  if (join_tab->cache_idx_cond != NULL &&
+      !join_tab->cache_idx_cond->val_int())
+      return FALSE;
+  /* continue with generic tests */
+  return JOIN_CACHE_BKA::check_match(rec_ptr);
+}
+
+
 /****************************************************************************
  * Join cache module end
  ****************************************************************************/

=== modified file 'sql/sql_select.h'
--- a/sql/sql_select.h	2010-07-02 11:19:19 +0000
+++ b/sql/sql_select.h	2010-07-04 15:46:57 +0000
@@ -805,7 +805,7 @@ protected:
   enum_nested_loop_state generate_full_extensions(uchar *rec_ptr);
 
   /* Check matching to a partial join record from the join buffer */
-  bool check_match(uchar *rec_ptr);
+  virtual bool check_match(uchar *rec_ptr);
 
   /** @returns whether we should check only the first match for this table */
   bool calc_check_only_first_match(const JOIN_TAB *t) const
@@ -1271,6 +1271,8 @@ protected:
   /* Search for a key in the hash table of the join buffer */
   bool key_search(uchar *key, uint key_len, uchar **key_ref_ptr);
 
+  virtual bool check_match(uchar *rec_ptr);
+
 public:
 
   /* 


Attachment: [text/bzr-bundle] bzr/guilhem@mysql.com-20100704154657-ertpakr039a0tgo3.bundle
Thread
bzr commit into mysql-next-mr-opt-backporting branch (guilhem:3209) Bug#54359Guilhem Bichot4 Jul