List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:February 20 2009 8:54am
Subject:bzr push into mysql-5.1-telco-6.2 branch (jonas:2848 to 2849) Bug#43042
View as plain text  
 2849 Jonas Oreland	2009-02-20
      ndb - bug#43042 - fix %d/%u handling wrt backup-id
modified:
  storage/ndb/src/common/debugger/EventLogger.cpp
  storage/ndb/src/kernel/blocks/backup/Backup.cpp
  storage/ndb/src/kernel/blocks/ndbfs/Filename.cpp
  storage/ndb/src/mgmclient/CommandInterpreter.cpp
  storage/ndb/tools/restore/Restore.cpp
  storage/ndb/tools/restore/restore_main.cpp

 2848 Jonas Oreland	2009-02-19
      ndb - bug#17614 - handle logfile groups wo/ undofiles during restart
modified:
  storage/ndb/src/kernel/blocks/lgman.cpp

=== modified file 'storage/ndb/src/common/debugger/EventLogger.cpp'
--- a/storage/ndb/src/common/debugger/EventLogger.cpp	2008-10-24 11:00:37 +0000
+++ b/storage/ndb/src/common/debugger/EventLogger.cpp	2009-02-20 08:46:10 +0000
@@ -804,7 +804,7 @@ void getTextMemoryUsage(QQQQ) {
 
 void getTextBackupStarted(QQQQ) {
   BaseString::snprintf(m_text, m_text_len, 
-		       "Backup %d started from node %d", 
+		       "Backup %u started from node %d", 
 		       theData[2], refToNode(theData[1]));
 }
 void getTextBackupFailedToStart(QQQQ) {
@@ -839,7 +839,7 @@ void getTextBackupStatus(QQQQ) {
 }
 void getTextBackupAborted(QQQQ) {
   BaseString::snprintf(m_text, m_text_len, 
-		       "Backup %d started from %d has been aborted. Error: %d",
+		       "Backup %u started from %d has been aborted. Error: %d",
 		       theData[2], 
 		       refToNode(theData[1]), 
 		       theData[3]);

=== modified file 'storage/ndb/src/kernel/blocks/backup/Backup.cpp'
--- a/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2009-01-27 14:32:31 +0000
+++ b/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2009-02-20 08:46:10 +0000
@@ -463,7 +463,7 @@ Backup::execDUMP_STATE_ORD(Signal* signa
      */
     BackupRecordPtr ptr LINT_SET_PTR;
     for(c_backups.first(ptr); ptr.i != RNIL; c_backups.next(ptr)){
-      infoEvent("BackupRecord %d: BackupId: %d MasterRef: %x ClientRef: %x",
+      infoEvent("BackupRecord %d: BackupId: %u MasterRef: %x ClientRef: %x",
 		ptr.i, ptr.p->backupId, ptr.p->masterRef, ptr.p->clientRef);
       infoEvent(" State: %d", ptr.p->slaveState.getState());
       BackupFilePtr filePtr;
@@ -639,7 +639,7 @@ Backup::execBACKUP_CONF(Signal* signal)
   jamEntry();
   BackupConf * conf = (BackupConf*)signal->getDataPtr();
   
-  ndbout_c("Backup %d has started", conf->backupId);
+  ndbout_c("Backup %u has started", conf->backupId);
 }
 
 void
@@ -648,7 +648,7 @@ Backup::execBACKUP_REF(Signal* signal)
   jamEntry();
   BackupRef * ref = (BackupRef*)signal->getDataPtr();
 
-  ndbout_c("Backup (%d) has NOT started %d", ref->senderData, ref->errorCode);
+  ndbout_c("Backup (%u) has NOT started %d", ref->senderData, ref->errorCode);
 }
 
 void
@@ -659,7 +659,7 @@ Backup::execBACKUP_COMPLETE_REP(Signal* 
  
   startTime = NdbTick_CurrentMillisecond() - startTime;
   
-  ndbout_c("Backup %d has completed", rep->backupId);
+  ndbout_c("Backup %u has completed", rep->backupId);
   const Uint64 bytes =
     rep->noOfBytesLow + (((Uint64)rep->noOfBytesHigh) << 32);
   const Uint64 records =
@@ -691,7 +691,7 @@ Backup::execBACKUP_ABORT_REP(Signal* sig
   jamEntry();
   BackupAbortRep* rep = (BackupAbortRep*)signal->getDataPtr();
   
-  ndbout_c("Backup %d has been aborted %d", rep->backupId, rep->reason);
+  ndbout_c("Backup %u has been aborted %d", rep->backupId, rep->reason);
 }
 
 const TriggerEvent::Value triggerEventValues[] = {

=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/Filename.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/Filename.cpp	2009-02-17 07:52:13 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/Filename.cpp	2009-02-20 08:46:10 +0000
@@ -120,14 +120,14 @@ Filename::set(const BaseString basepath[
     const Uint32 nodeId = FsOpenReq::v2_getNodeId(filenumber);
     const Uint32 count = FsOpenReq::v2_getCount(filenumber);
     
-    BaseString::snprintf(buf, sizeof(buf), "BACKUP%sBACKUP-%d%s",
+    BaseString::snprintf(buf, sizeof(buf), "BACKUP%sBACKUP-%u%s",
 	     DIR_SEPARATOR, seq, DIR_SEPARATOR); 
     strcat(theName, buf);
     if(count == 0xffffffff) {
-      BaseString::snprintf(buf, sizeof(buf), "BACKUP-%d.%d",
+      BaseString::snprintf(buf, sizeof(buf), "BACKUP-%u.%d",
 	       seq, nodeId); strcat(theName, buf);
     } else {
-      BaseString::snprintf(buf, sizeof(buf), "BACKUP-%d-%d.%d",
+      BaseString::snprintf(buf, sizeof(buf), "BACKUP-%u-%d.%d",
 	       seq, count, nodeId); strcat(theName, buf);
     }
     break;

=== modified file 'storage/ndb/src/mgmclient/CommandInterpreter.cpp'
--- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2008-12-03 13:49:39 +0000
+++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2009-02-20 08:46:10 +0000
@@ -744,7 +744,7 @@ printLogEvent(struct ndb_logevent* event
 #undef  EVENT
 #define EVENT BackupStarted
   case NDB_LE_BackupStarted:
-      ndbout_c("Node %u: Backup %d started from node %d",
+      ndbout_c("Node %u: Backup %u started from node %d",
                R, Q(backup_id), Q(starting_node));
       break;
 #undef EVENT
@@ -784,7 +784,7 @@ printLogEvent(struct ndb_logevent* event
 #undef  EVENT
 #define EVENT BackupAborted
     case NDB_LE_BackupAborted:
-      ndbout_c("Node %u: Backup %d started from %d has been aborted. Error: %d",
+      ndbout_c("Node %u: Backup %u started from %d has been aborted. Error: %d",
                R, Q(backup_id), Q(starting_node), Q(error));
       break;
     /** 

=== modified file 'storage/ndb/tools/restore/Restore.cpp'
--- a/storage/ndb/tools/restore/Restore.cpp	2008-08-05 14:08:40 +0000
+++ b/storage/ndb/tools/restore/Restore.cpp	2009-02-20 08:46:10 +0000
@@ -882,7 +882,7 @@ BackupFile::setCtlFile(Uint32 nodeId, Ui
   m_expectedFileHeader.FileType = BackupFormat::CTL_FILE;
 
   char name[PATH_MAX]; const Uint32 sz = sizeof(name);
-  BaseString::snprintf(name, sz, "BACKUP-%d.%d.ctl", backupId, nodeId);  
+  BaseString::snprintf(name, sz, "BACKUP-%u.%d.ctl", backupId, nodeId);  
   setName(path, name);
 }
 
@@ -893,7 +893,7 @@ BackupFile::setDataFile(const BackupFile
   m_expectedFileHeader.FileType = BackupFormat::DATA_FILE;
   
   char name[PATH_MAX]; const Uint32 sz = sizeof(name);
-  BaseString::snprintf(name, sz, "BACKUP-%d-%d.%d.Data", 
+  BaseString::snprintf(name, sz, "BACKUP-%u-%d.%d.Data", 
 	   m_expectedFileHeader.BackupId, no, m_nodeId);
   setName(bf.m_path, name);
 }
@@ -905,7 +905,7 @@ BackupFile::setLogFile(const BackupFile 
   m_expectedFileHeader.FileType = BackupFormat::LOG_FILE;
   
   char name[PATH_MAX]; const Uint32 sz = sizeof(name);
-  BaseString::snprintf(name, sz, "BACKUP-%d.%d.log", 
+  BaseString::snprintf(name, sz, "BACKUP-%u.%d.log", 
 	   m_expectedFileHeader.BackupId, m_nodeId);
   setName(bf.m_path, name);
 }

=== modified file 'storage/ndb/tools/restore/restore_main.cpp'
--- a/storage/ndb/tools/restore/restore_main.cpp	2008-07-24 09:23:05 +0000
+++ b/storage/ndb/tools/restore/restore_main.cpp	2009-02-20 08:46:10 +0000
@@ -694,7 +694,7 @@ main(int argc, char** argv)
     exitHandler(NDBT_FAILED);
   }
 
-  g_options.appfmt(" -b %d", ga_backupId);
+  g_options.appfmt(" -b %u", ga_backupId);
   g_options.appfmt(" -n %d", ga_nodeId);
   if (_restore_meta)
     g_options.appfmt(" -m");

Thread
bzr push into mysql-5.1-telco-6.2 branch (jonas:2848 to 2849) Bug#43042Jonas Oreland20 Feb