List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:August 17 2010 11:52am
Subject:bzr commit into mysql-5.1-telco-7.1 branch (jonas:3743)
View as plain text  
#At file:///home/jonas/src/telco-7.1/ based on revid:jonas@stripped

 3743 Jonas Oreland	2010-08-17 [merge]
      ndb - merge 70 to 71

    modified:
      storage/ndb/src/kernel/blocks/backup/Backup.cpp
      storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
      storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
      storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp
      storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp
      storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
      storage/ndb/src/kernel/blocks/lgman.cpp
      storage/ndb/src/kernel/blocks/suma/Suma.cpp
      storage/ndb/src/kernel/blocks/trix/Trix.cpp
      storage/ndb/src/kernel/vm/mt.cpp
      storage/ndb/src/ndbapi/TransporterFacade.cpp
=== modified file 'storage/ndb/src/kernel/blocks/backup/Backup.cpp'
--- a/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2010-05-03 04:49:08 +0000
+++ b/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2010-08-17 11:47:55 +0000
@@ -670,7 +670,7 @@ void Backup::execDBINFO_SCANREQ(Signal *
   jamEntry();
   DbinfoScanReq req= *(DbinfoScanReq*)signal->theData;
   const Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+    CAST_CONSTPTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtr(&req));
 
   Ndbinfo::Ratelimit rl;
 

=== modified file 'storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp'
--- a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2010-06-10 14:32:07 +0000
+++ b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2010-08-17 11:47:55 +0000
@@ -1341,8 +1341,8 @@ Cmvmi::execDUMP_STATE_ORD(Signal* signal
 void Cmvmi::execDBINFO_SCANREQ(Signal *signal)
 {
   DbinfoScanReq req= *(DbinfoScanReq*)signal->theData;
-  const Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+  const Ndbinfo::ScanCursor* cursor = 
+    CAST_CONSTPTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtr(&req));
   Ndbinfo::Ratelimit rl;
 
   jamEntry();

=== modified file 'storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp	2010-03-05 15:03:09 +0000
+++ b/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp	2010-08-17 11:47:55 +0000
@@ -8227,7 +8227,7 @@ void Dbacc::execDBINFO_SCANREQ(Signal *s
   jamEntry();
   DbinfoScanReq req= *(DbinfoScanReq*)signal->theData;
   const Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+    CAST_CONSTPTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtr(&req));
 
   Ndbinfo::Ratelimit rl;
 

=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2010-08-13 09:31:43 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2010-08-17 11:47:55 +0000
@@ -278,7 +278,7 @@ void Dbdict::execDBINFO_SCANREQ(Signal *
 {
   DbinfoScanReq req= *(DbinfoScanReq*)signal->theData;
   const Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+    CAST_CONSTPTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtr(&req));
   Ndbinfo::Ratelimit rl;
 
   jamEntry();

=== modified file 'storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp'
--- a/storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp	2010-01-15 11:15:33 +0000
+++ b/storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp	2010-08-17 11:47:55 +0000
@@ -217,9 +217,9 @@ void Dbinfo::execDBINFO_SCANREQ(Signal *
   }
 
   // TODO Check all scan parameters
-
   Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+    CAST_PTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtrSend(&req));
+
   Uint32 signal_length = signal->getLength();
   if (signal_length == DbinfoScanReq::SignalLength)
   {
@@ -367,7 +367,7 @@ void Dbinfo::execDBINFO_SCANCONF(Signal 
 {
   const DbinfoScanConf* conf_ptr= (const DbinfoScanConf*)signal->getDataPtr();
   // Copy signal on stack
-  const DbinfoScanConf conf= *conf_ptr;
+  DbinfoScanConf conf= *conf_ptr;
 
   jamEntry();
 
@@ -387,7 +387,7 @@ void Dbinfo::execDBINFO_SCANCONF(Signal 
   // Copy cursor on stack
   ndbrequire(conf.cursor_sz);
   Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&conf);
+    CAST_PTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtrSend(&conf));
 
   if (Ndbinfo::ScanCursor::getHasMoreData(cursor->flags) || conf.returnedRows)
   {

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-07-04 16:28:36 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-08-17 11:47:55 +0000
@@ -22160,7 +22160,7 @@ void Dblqh::execDBINFO_SCANREQ(Signal *s
 {
   DbinfoScanReq req= *(DbinfoScanReq*)signal->theData;
   const Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+    CAST_CONSTPTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtr(&req));
   Ndbinfo::Ratelimit rl;
 
   jamEntry();

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2010-08-11 09:34:30 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2010-08-17 11:47:55 +0000
@@ -12585,7 +12585,7 @@ void Dbtc::execDBINFO_SCANREQ(Signal *si
 {
   DbinfoScanReq req= *(DbinfoScanReq*)signal->theData;
   const Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+    CAST_CONSTPTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtr(&req));
   Ndbinfo::Ratelimit rl;
 
   jamEntry();

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp	2010-06-10 07:21:34 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp	2010-08-17 11:47:55 +0000
@@ -75,7 +75,7 @@ void Dbtup::execDBINFO_SCANREQ(Signal* s
   jamEntry();
   DbinfoScanReq req= *(DbinfoScanReq*)signal->theData;
   const Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+    CAST_CONSTPTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtr(&req));
 
   Ndbinfo::Ratelimit rl;
 

=== modified file 'storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp	2010-01-19 08:24:03 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp	2010-08-17 11:47:55 +0000
@@ -27,7 +27,7 @@ void Dbtux::execDBINFO_SCANREQ(Signal *s
 {
   DbinfoScanReq req= *(DbinfoScanReq*)signal->theData;
   const Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+    CAST_CONSTPTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtr(&req));
   Ndbinfo::Ratelimit rl;
 
   jamEntry();

=== modified file 'storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp'
--- a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp	2010-05-03 04:49:08 +0000
+++ b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp	2010-08-17 11:47:55 +0000
@@ -760,7 +760,7 @@ void DbUtil::execDBINFO_SCANREQ(Signal *
 {
   DbinfoScanReq req= *(DbinfoScanReq*)signal->theData;
   const Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+    CAST_CONSTPTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtr(&req));
   Ndbinfo::Ratelimit rl;
 
   jamEntry();

=== modified file 'storage/ndb/src/kernel/blocks/lgman.cpp'
--- a/storage/ndb/src/kernel/blocks/lgman.cpp	2010-03-15 09:31:35 +0000
+++ b/storage/ndb/src/kernel/blocks/lgman.cpp	2010-08-17 11:47:55 +0000
@@ -426,8 +426,8 @@ void
 Lgman::execDBINFO_SCANREQ(Signal *signal)
 {
   DbinfoScanReq req= *(DbinfoScanReq*)signal->theData;
-  const Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+  const Ndbinfo::ScanCursor* cursor = 
+    CAST_CONSTPTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtr(&req));
   Ndbinfo::Ratelimit rl;
 
   jamEntry();

=== modified file 'storage/ndb/src/kernel/blocks/suma/Suma.cpp'
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2010-06-14 19:33:54 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2010-08-17 11:47:55 +0000
@@ -1551,7 +1551,7 @@ void Suma::execDBINFO_SCANREQ(Signal *si
 {
   DbinfoScanReq req= *(DbinfoScanReq*)signal->theData;
   const Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+    CAST_CONSTPTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtr(&req));
   Ndbinfo::Ratelimit rl;
 
   jamEntry();

=== modified file 'storage/ndb/src/kernel/blocks/trix/Trix.cpp'
--- a/storage/ndb/src/kernel/blocks/trix/Trix.cpp	2010-01-19 08:24:03 +0000
+++ b/storage/ndb/src/kernel/blocks/trix/Trix.cpp	2010-08-17 11:47:55 +0000
@@ -493,7 +493,7 @@ void Trix::execDBINFO_SCANREQ(Signal *si
 {
   DbinfoScanReq req= *(DbinfoScanReq*)signal->theData;
   const Ndbinfo::ScanCursor* cursor =
-    (Ndbinfo::ScanCursor*)DbinfoScan::getCursorPtr(&req);
+    CAST_CONSTPTR(Ndbinfo::ScanCursor, DbinfoScan::getCursorPtr(&req));
   Ndbinfo::Ratelimit rl;
 
   jamEntry();

=== modified file 'storage/ndb/src/kernel/vm/mt.cpp'
--- a/storage/ndb/src/kernel/vm/mt.cpp	2010-08-12 13:23:11 +0000
+++ b/storage/ndb/src/kernel/vm/mt.cpp	2010-08-17 11:52:31 +0000
@@ -1543,7 +1543,7 @@ void
 trp_callback::reportSendLen(NodeId nodeId, Uint32 count, Uint64 bytes)
 {
   SignalT<3> signalT;
-  Signal &signal= *(Signal*)&signalT;
+  Signal &signal = * new (&signalT) Signal(0);
   memset(&signal.header, 0, sizeof(signal.header));
 
   signal.header.theLength = 3;
@@ -1657,7 +1657,7 @@ link_thread_send_buffers(thr_repository:
   }
 
   Uint64 sentinel[thr_send_page::HEADER_SIZE >> 1];
-  thr_send_page* sentinel_page = (thr_send_page*)sentinel;
+  thr_send_page* sentinel_page = new (&sentinel[0]) thr_send_page;
   sentinel_page->m_next = 0;
 
   struct thr_send_buffer tmp;
@@ -2598,7 +2598,7 @@ static void reportSignalStats(Uint32 sel
                               Uint32 b_count, Uint32 b_size)
 {
   SignalT<6> sT;
-  Signal *s= (Signal *)&sT;
+  Signal *s= new (&sT) Signal(0);
 
   memset(&s->header, 0, sizeof(s->header));
   s->header.theLength = 6;
@@ -3194,7 +3194,7 @@ sendprioa_STOP_FOR_CRASH(const struct th
   signalT.header.theSendersSignalId      = 0;
   signalT.header.theSignalId             = 0;
   signalT.header.theLength               = StopForCrash::SignalLength;
-  StopForCrash * const stopForCrash = (StopForCrash *)&signalT.theData[0];
+  StopForCrash * stopForCrash = CAST_PTR(StopForCrash, &signalT.theData[0]);
   stopForCrash->flags = 0;
 
   thr_job_queue *q = &(dstptr->m_jba);
@@ -3579,7 +3579,7 @@ ThreadConfig::doStart(NodeState::StartLe
   signalT.header.theSignalId             = 0;
   signalT.header.theLength               = StartOrd::SignalLength;
   
-  StartOrd * const  startOrd = (StartOrd *)&signalT.theData[0];
+  StartOrd * startOrd = CAST_PTR(StartOrd, &signalT.theData[0]);
   startOrd->restartInfo = 0;
   
   sendprioa(block2ThreadId(CMVMI, 0), &signalT.header, signalT.theData, 0);

=== modified file 'storage/ndb/src/ndbapi/TransporterFacade.cpp'
--- a/storage/ndb/src/ndbapi/TransporterFacade.cpp	2010-03-23 11:51:32 +0000
+++ b/storage/ndb/src/ndbapi/TransporterFacade.cpp	2010-08-17 11:51:30 +0000
@@ -365,7 +365,7 @@ TransporterFacade::deliver_signal(Signal
        {
 	 Uint32* send= tSignal.getDataPtrSend();
 	 memcpy(send, theData, tSignal.getLength() << 2);
-	 ((SubGcpCompleteAck*)send)->rep.senderRef = 
+	 CAST_PTR(SubGcpCompleteAck, send)->rep.senderRef = 
 	   numberToRef(API_CLUSTERMGR, theOwnId);
 	 Uint32 ref= header->theSendersBlockRef;
 	 Uint32 aNodeId= refToNode(ref);


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20100817115231-880nk60x8q6c9tje.bundle
Thread
bzr commit into mysql-5.1-telco-7.1 branch (jonas:3743) Jonas Oreland17 Aug