List:Internals« Previous MessageNext Message »
From:jonas.oreland Date:June 9 2005 7:49am
Subject:bk commit into 4.1 tree (joreland:1.2278) BUG#8918
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of jonas. When jonas 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
  1.2278 05/06/09 07:49:48 joreland@stripped +1 -0
  ndb - uint overflow when running on 64-bit platform with more than 4Gb of mem
  bug#10711
  bug#10058
  bug#9363
  bug#9025
  bug#8918

  ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
    1.15 05/06/09 07:49:45 joreland@stripped +9 -9
    Use UintPtr when computing page address to make sure that Uint32 does not overflow

# 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:	joreland
# Host:	eel.ndb.mysql.com.ndb.mysql.com
# Root:	/home/jonas/src/mysql-4.1

--- 1.14/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp	Thu Mar 10 07:45:15 2005
+++ 1.15/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp	Thu Jun  9 07:49:45 2005
@@ -247,10 +247,10 @@
   AsyncFile* openFile = theOpenFiles.find(filePointer);
 
   const NewVARIABLE *myBaseAddrRef = &getBat(blockNumber)[fsRWReq->varIndex];
-  unsigned int tPageSize;
-  unsigned int tClusterSize;
-  unsigned int tNRR;
-  unsigned int tPageOffset;
+  UintPtr tPageSize;
+  UintPtr tClusterSize;
+  UintPtr tNRR;
+  UintPtr tPageOffset;
   char*        tWA;
   FsRef::NdbfsErrorCodeType errorCode;
 
@@ -294,8 +294,8 @@
     jam();
     for (unsigned int i = 0; i < fsRWReq->numberOfPages; i++) {
       jam();
-      const Uint32 varIndex = fsRWReq->data.listOfPair[i].varIndex;
-      const Uint32 fileOffset = fsRWReq->data.listOfPair[i].fileOffset;
+      const UintPtr varIndex = fsRWReq->data.listOfPair[i].varIndex;
+      const UintPtr fileOffset = fsRWReq->data.listOfPair[i].fileOffset;
       if (varIndex >= tNRR) {
         jam();
         errorCode = FsRef::fsErrInvalidParameters;
@@ -316,8 +316,8 @@
       errorCode = FsRef::fsErrInvalidParameters;
       goto error;
     }//if
-    const Uint32 varIndex = fsRWReq->data.arrayOfPages.varIndex;
-    const Uint32 fileOffset = fsRWReq->data.arrayOfPages.fileOffset;
+    const UintPtr varIndex = fsRWReq->data.arrayOfPages.varIndex;
+    const UintPtr fileOffset = fsRWReq->data.arrayOfPages.fileOffset;
     
     request->par.readWrite.pages[0].offset = fileOffset * tPageSize;
     request->par.readWrite.pages[0].size = tPageSize * fsRWReq->numberOfPages;
@@ -334,7 +334,7 @@
     
     for (unsigned int i = 0; i < fsRWReq->numberOfPages; i++) {
       jam();
-      Uint32 varIndex = fsRWReq->data.listOfMemPages.varIndex[i];
+      UintPtr varIndex = fsRWReq->data.listOfMemPages.varIndex[i];
 
       if (varIndex >= tNRR) {
         jam();
Thread
bk commit into 4.1 tree (joreland:1.2278) BUG#8918jonas.oreland9 Jun