List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:June 25 2012 1:05pm
Subject:bzr push into mysql-5.1-telco-7.1 branch (magnus.blaudd:4577 to 4578)
View as plain text  
 4578 magnus.blaudd@stripped	2012-06-25 [merge]
      Merge 7.0 -> 7.1

    modified:
      storage/ndb/test/include/NdbBackup.hpp
      storage/ndb/test/include/NdbConfig.hpp
      storage/ndb/test/ndbapi/testBackup.cpp
      storage/ndb/test/ndbapi/testBasic.cpp
      storage/ndb/test/ndbapi/testSystemRestart.cpp
      storage/ndb/test/ndbapi/testTimeout.cpp
      storage/ndb/test/ndbapi/testUpgrade.cpp
 4577 Jan Wedvik	2012-06-25 [merge]
      Merge 7.0->7.1

    modified:
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
      storage/ndb/test/ndbapi/testBasic.cpp
      storage/ndb/test/run-test/daily-basic-tests.txt
=== modified file 'storage/ndb/test/include/NdbBackup.hpp'
--- a/storage/ndb/test/include/NdbBackup.hpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/test/include/NdbBackup.hpp	2012-06-25 12:55:27 +0000
@@ -26,8 +26,8 @@
 
 class NdbBackup : public NdbConfig {
 public:
-  NdbBackup(int _own_id, const char* _addr = 0) 
-    : NdbConfig(_own_id, _addr) {};
+  NdbBackup(const char* _addr = 0)
+    : NdbConfig(_addr) {};
 
   int start(unsigned & _backup_id,
 	    int flags = 2,

=== modified file 'storage/ndb/test/include/NdbConfig.hpp'
--- a/storage/ndb/test/include/NdbConfig.hpp	2011-02-02 00:40:07 +0000
+++ b/storage/ndb/test/include/NdbConfig.hpp	2012-06-25 12:55:27 +0000
@@ -27,15 +27,12 @@
 
 class NdbConfig : public NdbRestarter {
 public:
-  NdbConfig(int own_id, const char* addr = 0) 
-    : NdbRestarter(addr), 
-      ownNodeId(own_id) {};
+  NdbConfig(const char* addr = 0)
+    : NdbRestarter(addr)
+  {};
 
   bool getProperty(unsigned nodeid, unsigned type, unsigned key, Uint32 * val);
-
   bool getHostName(unsigned int node_id, const char ** hostname);
-  //protected:  
-  int ownNodeId;
 };
 
 #endif

=== modified file 'storage/ndb/test/ndbapi/testBackup.cpp'
--- a/storage/ndb/test/ndbapi/testBackup.cpp	2011-12-08 14:37:07 +0000
+++ b/storage/ndb/test/ndbapi/testBackup.cpp	2012-06-25 12:55:27 +0000
@@ -35,7 +35,7 @@ int
 clearOldBackups(NDBT_Context* ctx, NDBT_Step* step)
 {
   strcpy(tabname, ctx->getTab()->getName());
-  NdbBackup backup(GETNDB(step)->getNodeId());
+  NdbBackup backup;
   backup.clearOldBackups();
   return NDBT_OK;
 }
@@ -70,7 +70,7 @@ int setSlave(NDBT_Context* ctx, NDBT_Ste
 }
 
 int runAbort(NDBT_Context* ctx, NDBT_Step* step){
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
 
   NdbRestarter restarter;
 
@@ -104,7 +104,7 @@ int runAbort(NDBT_Context* ctx, NDBT_Ste
 }
 
 int runFail(NDBT_Context* ctx, NDBT_Step* step){
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
 
   NdbRestarter restarter;
 
@@ -138,7 +138,7 @@ int runFail(NDBT_Context* ctx, NDBT_Step
 }
 
 int runBackupOne(NDBT_Context* ctx, NDBT_Step* step){
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
   unsigned backupId = 0;
 
   if (backup.start(backupId) == -1){
@@ -151,7 +151,7 @@ int runBackupOne(NDBT_Context* ctx, NDBT
 }
 
 int runBackupRandom(NDBT_Context* ctx, NDBT_Step* step){
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
   unsigned backupId = rand() % (MAX_BACKUPS);
 
   if (backup.start(backupId) == -1){
@@ -165,7 +165,7 @@ int runBackupRandom(NDBT_Context* ctx, N
 
 int
 runBackupLoop(NDBT_Context* ctx, NDBT_Step* step){
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
   
   int loops = ctx->getNumLoops();
   while(!ctx->isTestStopped() && loops--)
@@ -233,7 +233,7 @@ int runDropTablesRestart(NDBT_Context* c
 }
 
 int runRestoreOne(NDBT_Context* ctx, NDBT_Step* step){
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
   unsigned backupId = ctx->getProperty("BackupId"); 
 
   ndbout << "Restoring backup " << backupId << endl;
@@ -379,7 +379,7 @@ int runBackupBank(NDBT_Context* ctx, NDB
   int l = 0;
   int maxSleep = 30; // Max seconds between each backup
   Ndb* pNdb = GETNDB(step);
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
   unsigned minBackupId = ~0;
   unsigned maxBackupId = 0;
   unsigned backupId = 0;
@@ -425,7 +425,7 @@ int runBackupBank(NDBT_Context* ctx, NDB
 
 int runRestoreBankAndVerify(NDBT_Context* ctx, NDBT_Step* step){
   NdbRestarter restarter;
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
   unsigned minBackupId = ctx->getProperty("MinBackupId");
   unsigned maxBackupId = ctx->getProperty("MaxBackupId");
   unsigned backupId = minBackupId;
@@ -499,7 +499,7 @@ int runRestoreBankAndVerify(NDBT_Context
   return result;
 }
 int runBackupUndoWaitStarted(NDBT_Context* ctx, NDBT_Step* step){
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
   unsigned backupId = 0;
   int undoError = 10041;
   NdbRestarter restarter;
@@ -567,7 +567,7 @@ int runChangeUndoDataDuringBackup(NDBT_C
   hugoTrans.closeTransaction(pNdb);
 
   // make sure backup have finish
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
 
   // start log event
   if(backup.startLogEvent() != 0) {
@@ -651,7 +651,7 @@ int runVerifyUndoData(NDBT_Context* ctx,
 int
 runBug57650(NDBT_Context* ctx, NDBT_Step* step)
 {
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
   NdbRestarter res;
 
   int node0 = res.getNode(NdbRestarter::NS_RANDOM);

=== modified file 'storage/ndb/test/ndbapi/testBasic.cpp'
--- a/storage/ndb/test/ndbapi/testBasic.cpp	2012-06-25 11:18:06 +0000
+++ b/storage/ndb/test/ndbapi/testBasic.cpp	2012-06-25 12:55:27 +0000
@@ -3023,7 +3023,7 @@ runLeakApiConnectObjects(NDBT_Context* c
 
   Ndb* const ndb = GETNDB(step);
   Uint32 maxTrans = 0;
-  NdbConfig conf(GETNDB(step)->getNodeId()+1);
+  NdbConfig conf;
   ASSERT_ALWAYS(conf.getProperty(conf.getMasterNodeId(),
                                  NODE_TYPE_DB,
                                  CFG_DB_NO_TRANSACTIONS,

=== modified file 'storage/ndb/test/ndbapi/testSystemRestart.cpp'
--- a/storage/ndb/test/ndbapi/testSystemRestart.cpp	2012-01-20 09:30:59 +0000
+++ b/storage/ndb/test/ndbapi/testSystemRestart.cpp	2012-06-25 13:01:40 +0000
@@ -38,7 +38,7 @@ int runLoadTable(NDBT_Context* ctx, NDBT
 int
 clearOldBackups(NDBT_Context* ctx, NDBT_Step* step)
 {
-  NdbBackup backup(GETNDB(step)->getNodeId());
+  NdbBackup backup;
   backup.clearOldBackups();
   return NDBT_OK;
 }
@@ -1391,7 +1391,7 @@ int runSR_DD_1(NDBT_Context* ctx, NDBT_S
   int result = NDBT_OK;
   Uint32 loops = ctx->getNumLoops();
   NdbRestarter restarter;
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
   bool lcploop = ctx->getProperty("LCP", (unsigned)0);
   bool all = ctx->getProperty("ALL", (unsigned)0);
 
@@ -1491,7 +1491,7 @@ int runSR_DD_2(NDBT_Context* ctx, NDBT_S
   Uint32 loops = ctx->getNumLoops();
   Uint32 rows = ctx->getNumRecords();
   NdbRestarter restarter;
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
   bool lcploop = ctx->getProperty("LCP", (unsigned)0);
   bool all = ctx->getProperty("ALL", (unsigned)0);
   int error = (int)ctx->getProperty("ERROR", (unsigned)0);
@@ -1597,7 +1597,7 @@ int runSR_DD_3(NDBT_Context* ctx, NDBT_S
   Uint32 loops = ctx->getNumLoops();
   Uint32 rows = ctx->getNumRecords();
   NdbRestarter restarter;
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
   bool lcploop = ctx->getProperty("LCP", (unsigned)0);
   bool all = ctx->getProperty("ALL", (unsigned)0);
   int error = (int)ctx->getProperty("ERROR", (unsigned)0);

=== modified file 'storage/ndb/test/ndbapi/testTimeout.cpp'
--- a/storage/ndb/test/ndbapi/testTimeout.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/test/ndbapi/testTimeout.cpp	2012-06-25 12:55:27 +0000
@@ -32,9 +32,8 @@ setTransactionTimeout(NDBT_Context* ctx,
   NdbRestarter restarter;
   int timeout = ctx->getProperty("TransactionInactiveTimeout",TIMEOUT);
 
-  NdbConfig conf(GETNDB(step)->getNodeId()+1);
-  unsigned int nodeId = conf.getMasterNodeId();
-  if (!conf.getProperty(nodeId,
+  NdbConfig conf;
+  if (!conf.getProperty(conf.getMasterNodeId(),
 			NODE_TYPE_DB, 
 			CFG_DB_TRANSACTION_INACTIVE_TIMEOUT,
 			&g_org_timeout)){
@@ -66,9 +65,8 @@ setDeadlockTimeout(NDBT_Context* ctx, ND
   NdbRestarter restarter;
   int timeout = ctx->getProperty("TransactionDeadlockTimeout", TIMEOUT);
   
-  NdbConfig conf(GETNDB(step)->getNodeId()+1);
-  unsigned int nodeId = conf.getMasterNodeId();
-  if (!conf.getProperty(nodeId,
+  NdbConfig conf;
+  if (!conf.getProperty(conf.getMasterNodeId(),
 			NODE_TYPE_DB, 
 			CFG_DB_TRANSACTION_DEADLOCK_TIMEOUT,
 			&g_org_deadlock))
@@ -88,9 +86,8 @@ getDeadlockTimeout(NDBT_Context* ctx, ND
   NdbRestarter restarter;
   
   Uint32 val = 0;
-  NdbConfig conf(GETNDB(step)->getNodeId()+1);
-  unsigned int nodeId = conf.getMasterNodeId();
-  if (!conf.getProperty(nodeId,
+  NdbConfig conf;
+  if (!conf.getProperty(conf.getMasterNodeId(),
 			NODE_TYPE_DB, 
 			CFG_DB_TRANSACTION_DEADLOCK_TIMEOUT,
 			&val))
@@ -308,9 +305,8 @@ int runDeadlockTimeoutTrans(NDBT_Context
   int stepNo = step->getStepNo();
 
   Uint32 deadlock_timeout;
-  NdbConfig conf(GETNDB(step)->getNodeId()+1);
-  unsigned int nodeId = conf.getMasterNodeId();
-  if (!conf.getProperty(nodeId,
+  NdbConfig conf;
+  if (!conf.getProperty(conf.getMasterNodeId(),
                         NODE_TYPE_DB,
                         CFG_DB_TRANSACTION_DEADLOCK_TIMEOUT,
                         &deadlock_timeout)){

=== modified file 'storage/ndb/test/ndbapi/testUpgrade.cpp'
--- a/storage/ndb/test/ndbapi/testUpgrade.cpp	2012-05-03 09:54:05 +0000
+++ b/storage/ndb/test/ndbapi/testUpgrade.cpp	2012-06-25 12:55:27 +0000
@@ -896,7 +896,7 @@ runPostUpgradeChecks(NDBT_Context* ctx, 
    *   automatically by NDBT...
    *   so when we enter here, this is already tested
    */
-  NdbBackup backup(GETNDB(step)->getNodeId()+1);
+  NdbBackup backup;
 
   ndbout << "Starting backup..." << flush;
   if (backup.start() != 0)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.1 branch (magnus.blaudd:4577 to 4578) magnus.blaudd25 Jun