MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jonathan Perkin Date:December 5 2007 11:19am
Subject:bk commit into 6.0 tree (jperkin:1.2739)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of mysqldev. When mysqldev 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-12-05 12:19:45+01:00, jperkin@stripped +5 -0
  Rename PAGESIZE -> NDB_PAGESIZE to avoid clashing on systems which
  define their own PAGESIZE in system headers.

  storage/ndb/src/kernel/blocks/dblqh/redoLogReader/reader.cpp@stripped, 2007-12-05 12:17:19+01:00, jperkin@stripped +26 -26
    PAGESIZE -> NDB_PAGESIZE

  storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp@stripped, 2007-12-05 12:17:52+01:00, jperkin@stripped +1 -1
    PAGESIZE -> NDB_PAGESIZE

  storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp@stripped, 2007-12-05 12:18:18+01:00, jperkin@stripped +1 -1
    PAGESIZE -> NDB_PAGESIZE

  storage/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp@stripped, 2007-12-05 12:16:20+01:00, jperkin@stripped +14 -14
    PAGESIZE -> NDB_PAGESIZE

  storage/ndb/test/ndbapi/celloDb.cpp@stripped, 2007-12-05 12:15:17+01:00, jperkin@stripped +5 -5
    PAGESIZE -> NDB_PAGESIZE

diff -Nrup a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/reader.cpp b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/reader.cpp
--- a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/reader.cpp	2007-05-30 20:27:24 +02:00
+++ b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/reader.cpp	2007-12-05 12:17:19 +01:00
@@ -75,13 +75,13 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
     exit(RETURN_ERROR);
   }
   
-  Uint32 tmpFileOffset = startAtMbyte * PAGESIZE * NO_PAGES_IN_MBYTE * sizeof(Uint32);
+  Uint32 tmpFileOffset = startAtMbyte * NDB_PAGESIZE * NO_PAGES_IN_MBYTE * sizeof(Uint32);
   if (fseek(f, tmpFileOffset, FROM_BEGINNING)) {
     perror("Error: Move in file");
     exit(RETURN_ERROR);
   }
 
-  redoLogPage = new Uint32[PAGESIZE*NO_PAGES_IN_MBYTE];
+  redoLogPage = new Uint32[NDB_PAGESIZE*NO_PAGES_IN_MBYTE];
   Uint32 words_from_previous_page = 0;
 
   // Loop for every mbyte.
@@ -89,7 +89,7 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
   for (Uint32 j = startAtMbyte; j < NO_MBYTE_IN_FILE && !lastPage; j++) {
 
     ndbout_c("mb: %d", j);
-    readFromFile(f, redoLogPage, PAGESIZE*NO_PAGES_IN_MBYTE);
+    readFromFile(f, redoLogPage, NDB_PAGESIZE*NO_PAGES_IN_MBYTE);
 
     words_from_previous_page = 0;
 
@@ -97,7 +97,7 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
     for (int i = 0; i < NO_PAGES_IN_MBYTE; i++) 
     {
       wordIndex = 0;
-      thePageHeader = (PageHeader *) &redoLogPage[i*PAGESIZE];
+      thePageHeader = (PageHeader *) &redoLogPage[i*NDB_PAGESIZE];
       // Print out mbyte number, page number and page index.
       ndbout << j << ":" << i << ":" << wordIndex << endl 
 	     << " " << j*32 + i << ":" << wordIndex << " ";
@@ -117,11 +117,11 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
 	}
 	
 	Uint32 checkSum = 37;
-	for (int ps = 1; ps < PAGESIZE; ps++)
-	  checkSum = redoLogPage[i*PAGESIZE+ps] ^ checkSum;
+	for (int ps = 1; ps < NDB_PAGESIZE; ps++)
+	  checkSum = redoLogPage[i*NDB_PAGESIZE+ps] ^ checkSum;
 
-	if (checkSum != redoLogPage[i*PAGESIZE]){
-	  ndbout << "WRONG CHECKSUM: checksum = " << redoLogPage[i*PAGESIZE]
+	if (checkSum != redoLogPage[i*NDB_PAGESIZE]){
+	  ndbout << "WRONG CHECKSUM: checksum = " << redoLogPage[i*NDB_PAGESIZE]
 		 << " expected = " << checkSum << endl;
 	  doExit();
 	}
@@ -145,7 +145,7 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
 
 
       wordIndex = thePageHeader->getLogRecordSize() - words_from_previous_page;
-      Uint32 *redoLogPagePos = redoLogPage + i*PAGESIZE;
+      Uint32 *redoLogPagePos = redoLogPage + i*NDB_PAGESIZE;
       if (words_from_previous_page)
       {
 	memmove(redoLogPagePos + wordIndex ,
@@ -157,9 +157,9 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
 	if (words_from_previous_page)
 	{
 	  // Print out mbyte number, page number and word index.
-	  ndbout << j << ":" << i-1 << ":" << PAGESIZE-words_from_previous_page << endl 
+	  ndbout << j << ":" << i-1 << ":" << NDB_PAGESIZE-words_from_previous_page << endl 
 		 << j << ":" << i   << ":" << wordIndex+words_from_previous_page << endl 
-		 << " " << j*32 + i-1 << ":" << PAGESIZE-words_from_previous_page << " ";
+		 << " " << j*32 + i-1 << ":" << NDB_PAGESIZE-words_from_previous_page << " ";
 	  words_from_previous_page = 0;
 	}
 	else
@@ -168,7 +168,7 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
 	  ndbout << j << ":" << i << ":" << wordIndex << endl 
 		 << " " << j*32 + i << ":" << wordIndex << " ";
 	}
-	redoLogPagePos = redoLogPage + i*PAGESIZE + wordIndex;
+	redoLogPagePos = redoLogPage + i*NDB_PAGESIZE + wordIndex;
 	oldWordIndex = wordIndex;
 	recordType = *redoLogPagePos;
 	switch(recordType) {
@@ -191,7 +191,7 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
 	case ZNEXT_LOG_RECORD_TYPE:
 	  nlRecord = (NextLogRecord *) redoLogPagePos;
 	  wordIndex += nlRecord->getLogRecordSize(wordIndex);
-	  if (wordIndex <= PAGESIZE) {
+	  if (wordIndex <= NDB_PAGESIZE) {
 	    if (thePrintFlag) ndbout << (*nlRecord);
 	    if (theCheckFlag) {
 	      if(!nlRecord->check()) {
@@ -205,7 +205,7 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
 	case ZCOMPLETED_GCI_TYPE:
 	  cGCIrecord = (CompletedGCIRecord *) redoLogPagePos;
 	  wordIndex += cGCIrecord->getLogRecordSize();
-	  if (wordIndex <= PAGESIZE) {
+	  if (wordIndex <= NDB_PAGESIZE) {
 	    if (thePrintFlag) ndbout << (*cGCIrecord);
 	    if (theCheckFlag) {
 	      if(!cGCIrecord->check()) {
@@ -218,8 +218,8 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
 
 	case ZPREP_OP_TYPE:
 	  poRecord = (PrepareOperationRecord *) redoLogPagePos;
-	  wordIndex += poRecord->getLogRecordSize(PAGESIZE-wordIndex);
-	  if (wordIndex <= PAGESIZE) {
+	  wordIndex += poRecord->getLogRecordSize(NDB_PAGESIZE-wordIndex);
+	  if (wordIndex <= NDB_PAGESIZE) {
 	    if (thePrintFlag) ndbout << (*poRecord);
 	    if (theCheckFlag) {
 	      if(!poRecord->check()) {
@@ -233,7 +233,7 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
 	case ZCOMMIT_TYPE:
 	  ctRecord = (CommitTransactionRecord *) redoLogPagePos;
 	  wordIndex += ctRecord->getLogRecordSize();
-	  if (wordIndex <= PAGESIZE) {
+	  if (wordIndex <= NDB_PAGESIZE) {
 	    if (thePrintFlag) ndbout << (*ctRecord);
 	    if (theCheckFlag) {
 	      if(!ctRecord->check()) {
@@ -247,7 +247,7 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
 	case ZINVALID_COMMIT_TYPE:
 	  ictRecord = (InvalidCommitTransactionRecord *) redoLogPagePos;
 	  wordIndex += ictRecord->getLogRecordSize();
-	  if (wordIndex <= PAGESIZE) {
+	  if (wordIndex <= NDB_PAGESIZE) {
 	    if (thePrintFlag) ndbout << (*ictRecord);
 	    if (theCheckFlag) {
 	      if(!ictRecord->check()) {
@@ -267,7 +267,7 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
 	case ZABORT_TYPE:
 	  atRecord = (AbortTransactionRecord *) redoLogPagePos;
 	  wordIndex += atRecord->getLogRecordSize();
-	  if (wordIndex <= PAGESIZE) {
+	  if (wordIndex <= NDB_PAGESIZE) {
 	    if (thePrintFlag) ndbout << (*atRecord);
 	    if (theCheckFlag) {
 	      if(!atRecord->check()) {
@@ -287,8 +287,8 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
 	  ndbout << " ------ERROR: UNKNOWN RECORD TYPE------" << endl;
 
 	  // Print out remaining data in this page
-	  for (int k = wordIndex; k < PAGESIZE; k++){
-	    Uint32 unknown = redoLogPage[i*PAGESIZE + k];
+	  for (int k = wordIndex; k < NDB_PAGESIZE; k++){
+	    Uint32 unknown = redoLogPage[i*NDB_PAGESIZE + k];
 	    ndbout_c("%-30d%-12u%-12x", k, unknown, unknown);
 	  }
 	  
@@ -302,17 +302,17 @@ NDB_COMMAND(redoLogFileReader,  "redoLog
 	if (theDumpFlag)
 	{
 	  ndbout << " ------PAGE END: DUMPING REST OF PAGE------" << endl;
-	  for (int k = wordIndex > PAGESIZE ? oldWordIndex : wordIndex;
-	       k < PAGESIZE; k++)
+	  for (int k = wordIndex > NDB_PAGESIZE ? oldWordIndex : wordIndex;
+	       k < NDB_PAGESIZE; k++)
 	  {
-	    Uint32 word = redoLogPage[i*PAGESIZE + k];
+	    Uint32 word = redoLogPage[i*NDB_PAGESIZE + k];
 	    ndbout_c("%-30d%-12u%-12x", k, word, word);
 	  }
 	}
 	break;
       }
-      if (wordIndex > PAGESIZE) {
-	words_from_previous_page = PAGESIZE - oldWordIndex;
+      if (wordIndex > NDB_PAGESIZE) {
+	words_from_previous_page = NDB_PAGESIZE - oldWordIndex;
 	ndbout << " ----------- Record continues on next page -----------" << endl;
       } else {
 	wordIndex = 0;
diff -Nrup a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp
--- a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp	2006-12-23 20:20:16 +01:00
+++ b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp	2007-12-05 12:17:52 +01:00
@@ -219,7 +219,7 @@ bool NextLogRecord::check() {
 }
 
 Uint32 NextLogRecord::getLogRecordSize(Uint32 pageIndex) {
-  return PAGESIZE - pageIndex;
+  return NDB_PAGESIZE - pageIndex;
 }
 
 NdbOut& operator<<(NdbOut& no, const NextLogRecord& nl) {
diff -Nrup a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp
--- a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp	2007-02-22 15:49:31 +01:00
+++ b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp	2007-12-05 12:18:18 +01:00
@@ -31,7 +31,7 @@
 #define MAX_FILE_DESCRIPTORS 40
 #define NO_MBYTE_IN_FILE 16
 
-#define PAGESIZE 8192
+#define NDB_PAGESIZE 8192
 #define NO_PAGES_IN_MBYTE 32
 #define NO_MBYTE_IN_FILE 16
 
diff -Nrup a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp
--- a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp	2006-12-23 20:20:18 +01:00
+++ b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp	2007-12-05 12:16:20 +01:00
@@ -40,7 +40,7 @@
 #define MAXFILESIZE 4096
 #define DEFAULT_FILESIZE 2048
 #define FVERSION 0x01000000
-#define PAGESIZE 8192
+#define NDB_PAGESIZE 8192
 
 #define TIMER_START { Uint64 starttick = NdbTick_CurrentMillisecond()
 #define TIMER_PRINT(str, ops) Uint64 stoptick = NdbTick_CurrentMillisecond();\
@@ -64,8 +64,8 @@ AsyncFile* openFiles[MAXFILES];
 Pool<Request>* theRequestPool;
 MemoryChannelMultipleWriter<Request>* theReportChannel;
 
-char WritePages[MAXFILES][PAGESIZE];
-char ReadPages[MAXFILES][PAGESIZE];
+char WritePages[MAXFILES][NDB_PAGESIZE];
+char ReadPages[MAXFILES][NDB_PAGESIZE];
 
 int readArguments(int argc, const char** argv);
 int openFile(int fileNum);
@@ -100,10 +100,10 @@ NDB_COMMAND(aftest, "aftest", "aftest [-
 
   // initialize data to write to files
   for (int i = 0; i < MAXFILES; i++) {
-    for (int j = 0; j < PAGESIZE; j++){
+    for (int j = 0; j < NDB_PAGESIZE; j++){
       WritePages[i][j] = (64+i+j)%256;
     }
-      //      memset(&WritePages[i][0], i+64, PAGESIZE);
+      //      memset(&WritePages[i][0], i+64, NDB_PAGESIZE);
   }
 
   // Set file directory and name
@@ -324,16 +324,16 @@ int writeFile( int fileNum, int pagenum)
 
   // Write only one page, choose the correct page for each file using fileNum
   request->par.readWrite.pages[0].buf = &WritePages[fileNum][0];
-  request->par.readWrite.pages[0].size = PAGESIZE;
+  request->par.readWrite.pages[0].size = NDB_PAGESIZE;
   if (writeFilesReverse == 1)
   {
     // write the last page in the files first
     // This is a normal way for the Blocks in Ndb to write to a file
-     request->par.readWrite.pages[0].offset = (fileSize - pagenum - 1) * PAGESIZE;
+     request->par.readWrite.pages[0].offset = (fileSize - pagenum - 1) * NDB_PAGESIZE;
   }
   else
   {
-     request->par.readWrite.pages[0].offset = pagenum * PAGESIZE;
+     request->par.readWrite.pages[0].offset = pagenum * NDB_PAGESIZE;
   }
   request->par.readWrite.numberOfPages = 1;
   
@@ -361,8 +361,8 @@ int writeSyncFile( int fileNum, int page
 
   // Write only one page, choose the correct page for each file using fileNum
   request->par.readWrite.pages[0].buf = &WritePages[fileNum][0];
-  request->par.readWrite.pages[0].size = PAGESIZE;
-  request->par.readWrite.pages[0].offset = pagenum * PAGESIZE;
+  request->par.readWrite.pages[0].size = NDB_PAGESIZE;
+  request->par.readWrite.pages[0].offset = pagenum * NDB_PAGESIZE;
   request->par.readWrite.numberOfPages = 1;
   
   if (!forward(file,request)) {
@@ -389,8 +389,8 @@ int readFile( int fileNum, int pagenum)
 
   // Read only one page, choose the correct page for each file using fileNum
   request->par.readWrite.pages[0].buf = &ReadPages[fileNum][0];
-  request->par.readWrite.pages[0].size = PAGESIZE;
-  request->par.readWrite.pages[0].offset = pagenum * PAGESIZE;
+  request->par.readWrite.pages[0].size = NDB_PAGESIZE;
+  request->par.readWrite.pages[0].offset = pagenum * NDB_PAGESIZE;
   request->par.readWrite.numberOfPages = 1;
   
   if (!forward(file,request)) {
@@ -558,10 +558,10 @@ int readFileWait()
 #ifdef TESTDEBUG
 	      ndbout << "readFileWait"<<request->theFilePointer<<", " << request->theUserPointer<<" "<< request->file->fileName().c_str() << endl;
 #endif
-	      if (memcmp(&(ReadPages[request->theFilePointer][0]), &(WritePages[request->theFilePointer][0]), PAGESIZE)!=0) 
+	      if (memcmp(&(ReadPages[request->theFilePointer][0]), &(WritePages[request->theFilePointer][0]), NDB_PAGESIZE)!=0) 
 		{
 		  ndbout <<"Verification error!" << endl;
-		  for (int i = 0; i < PAGESIZE; i++ ){
+		  for (int i = 0; i < NDB_PAGESIZE; i++ ){
 		    ndbout <<" Compare Page " <<  i << " : " << ReadPages[request->theFilePointer][i] <<", " <<WritePages[request->theFilePointer][i] << endl;;
 		    if( ReadPages[request->theFilePointer][i] !=WritePages[request->theFilePointer][i])
 		
diff -Nrup a/storage/ndb/test/ndbapi/celloDb.cpp b/storage/ndb/test/ndbapi/celloDb.cpp
--- a/storage/ndb/test/ndbapi/celloDb.cpp	2006-12-23 20:20:25 +01:00
+++ b/storage/ndb/test/ndbapi/celloDb.cpp	2007-12-05 12:15:17 +01:00
@@ -33,7 +33,7 @@ flexBench
 
 #define MAXATTR 4
 #define MAXTABLES 4
-#define PAGESIZE 8192
+#define NDB_PAGESIZE 8192
 #define OVERHEAD 0.02
 #define NUMBEROFRECORDS 10
 #define PKSIZE 1
@@ -189,7 +189,7 @@ createTable_SBMCALL ( Ndb* pMyNdb )
     // Createtable
 
     Uint32 tablesize=(recordsize*NUMBEROFRECORDS + OVERHEAD * NUMBEROFRECORDS)/1024;
-    Uint32 noPages=(pksize*NUMBEROFRECORDS)/PAGESIZE;
+    Uint32 noPages=(pksize*NUMBEROFRECORDS)/NDB_PAGESIZE;
     
     ndbout << "table size " << tablesize << "for table name " << tname << endl;
     
@@ -326,7 +326,7 @@ createTable_RPACCT(Ndb*pMyNdb)
    // Createtable
    
    Uint32 tablesize=(recordsize*NUMBEROFRECORDS + OVERHEAD * NUMBEROFRECORDS)/1024;
-   Uint32 noPages=(pksize*NUMBEROFRECORDS)/PAGESIZE;
+   Uint32 noPages=(pksize*NUMBEROFRECORDS)/NDB_PAGESIZE;
    
    ndbout << "table size " << tablesize << "for table name " << tname << endl;
    
@@ -751,7 +751,7 @@ createTable_IPACCT(Ndb* pMyNdb)
     // Createtable
 
     Uint32 tablesize=(recordsize*NUMBEROFRECORDS + OVERHEAD * NUMBEROFRECORDS)/1024;
-    Uint32 noPages=(pksize*NUMBEROFRECORDS)/PAGESIZE;
+    Uint32 noPages=(pksize*NUMBEROFRECORDS)/NDB_PAGESIZE;
     
     ndbout << "table size " << tablesize << "for table name " << tname << endl;
     
@@ -1000,7 +1000,7 @@ createTable_TODACCT(Ndb* pMyNdb)
     // Createtable
     
     Uint32 tablesize=(recordsize*NUMBEROFRECORDS + OVERHEAD * NUMBEROFRECORDS)/1024;
-    Uint32 noPages=(pksize*NUMBEROFRECORDS)/PAGESIZE;
+    Uint32 noPages=(pksize*NUMBEROFRECORDS)/NDB_PAGESIZE;
     
     ndbout << "table size " << tablesize << "for table name " << tname << endl;
     
Thread
bk commit into 6.0 tree (jperkin:1.2739)Jonathan Perkin5 Dec