List:Commits« Previous MessageNext Message »
From:Martin Skold Date:February 7 2007 11:36am
Subject:bk commit into 5.0 tree (mskold:1.2299) BUG#25821
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of marty. When marty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-02-07 11:36:34+01:00, mskold@stripped +4 -0
  NdbScanOperation.hpp, NdbScanOperation.cpp, ha_ndbcluster.cc:
    bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added
multi_range error checking in end_of_bound
  ha_ndbcluster.h:
    Removed stray mthod declaration

  ndb/include/ndbapi/NdbScanOperation.hpp@stripped, 2007-02-07 11:36:14+01:00,
mskold@stripped +2 -1
    bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added
multi_range error checking in end_of_bound

  ndb/src/ndbapi/NdbScanOperation.cpp@stripped, 2007-02-07 11:36:15+01:00, mskold@stripped +8
-2
    bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added
multi_range error checking in end_of_bound

  sql/ha_ndbcluster.cc@stripped, 2007-02-07 11:36:15+01:00, mskold@stripped +2 -4
    bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added
multi_range error checking in end_of_bound

  sql/ha_ndbcluster.h@stripped, 2007-02-07 11:31:44+01:00, mskold@stripped +0 -1
    Removed stray mthod declaration

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	mskold
# Host:	linux.site
# Root:	/windows/Linux_space/MySQL/mysql-5.0

--- 1.39/ndb/include/ndbapi/NdbScanOperation.hpp	2007-02-07 11:36:44 +01:00
+++ 1.40/ndb/include/ndbapi/NdbScanOperation.hpp	2007-02-07 11:36:44 +01:00
@@ -38,7 +38,8 @@ class NdbScanOperation : public NdbOpera
 public:
   /**
    * Scan flags.  OR-ed together and passed as second argument to
-   * readTuples.
+   * readTuples. Note that SF_MultiRange has to be set if several
+   * ranges (bounds) are to be passed.
    */
   enum ScanFlag {
     SF_TupScan = (1 << 16),     // scan TUP

--- 1.80/ndb/src/ndbapi/NdbScanOperation.cpp	2007-02-07 11:36:44 +01:00
+++ 1.81/ndb/src/ndbapi/NdbScanOperation.cpp	2007-02-07 11:36:44 +01:00
@@ -1718,6 +1718,12 @@ NdbIndexScanOperation::reset_bounds(bool
 int
 NdbIndexScanOperation::end_of_bound(Uint32 no)
 {
+  DBUG_ENTER("end_of_bound");
+  DBUG_PRINT("info", ("Range number %u", no));
+  /* Check that SF_MultiRange has been specified if more
+     than one range is specified */
+  if (no > 0 && !m_multi_range)
+    DBUG_RETURN(-1);
   if(no < (1 << 13)) // Only 12-bits no of ranges
   {
     Uint32 bound_head = * m_first_bound_word;
@@ -1726,9 +1732,9 @@ NdbIndexScanOperation::end_of_bound(Uint
     
     m_first_bound_word = theKEYINFOptr + theTotalNrOfKeyWordInSignal;;
     m_this_bound_start = theTupKeyLen;
-    return 0;
+    DBUG_RETURN(0);
   }
-  return -1;
+  DBUG_RETURN(-1);
 }
 
 int

--- 1.294/sql/ha_ndbcluster.cc	2007-02-07 11:36:44 +01:00
+++ 1.295/sql/ha_ndbcluster.cc	2007-02-07 11:36:44 +01:00
@@ -1996,8 +1996,7 @@ int ha_ndbcluster::set_bounds(NdbIndexSc
           DBUG_PRINT("error", ("key %d unknown flag %d", j, p.key->flag));
           DBUG_ASSERT(FALSE);
           // Stop setting bounds but continue with what we have
-          op->end_of_bound(range_no);
-          DBUG_RETURN(0);
+          DBUG_RETURN(op->end_of_bound(range_no));
         }
       }
     }
@@ -2044,8 +2043,7 @@ int ha_ndbcluster::set_bounds(NdbIndexSc
 
     tot_len+= part_store_len;
   }
-  op->end_of_bound(range_no);
-  DBUG_RETURN(0);
+  DBUG_RETURN(op->end_of_bound(range_no));
 }
 
 /*

--- 1.108/sql/ha_ndbcluster.h	2007-02-07 11:36:44 +01:00
+++ 1.109/sql/ha_ndbcluster.h	2007-02-07 11:36:44 +01:00
@@ -661,7 +661,6 @@ private:
                                       const NdbOperation *first,
                                       const NdbOperation *last,
                                       uint errcode);
-  bool key_fields_not_in_write_set(THD *thd, const KEY* key_info);
   int peek_indexed_rows(const byte *record, bool check_pk);
   int unique_index_read(const byte *key, uint key_len, 
                         byte *buf);
Thread
bk commit into 5.0 tree (mskold:1.2299) BUG#25821Martin Skold7 Feb