MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:September 30 2010 12:03pm
Subject:bzr push into mysql-5.1-telco-7.1 branch (jonas:3849 to 3850)
View as plain text  
 3850 Jonas Oreland	2010-09-30 [merge]
      ndb - merge 70 to 71

    added:
      storage/ndb/src/ndbapi/ndb_internal.cpp
    modified:
      storage/ndb/src/mgmsrv/ConfigManager.cpp
      storage/ndb/src/mgmsrv/main.cpp
      storage/ndb/src/ndbapi/API.hpp
      storage/ndb/src/ndbapi/CMakeLists.txt
      storage/ndb/src/ndbapi/ClusterMgr.cpp
      storage/ndb/src/ndbapi/ClusterMgr.hpp
      storage/ndb/src/ndbapi/Makefile.am
      storage/ndb/src/ndbapi/Ndb.cpp
      storage/ndb/src/ndbapi/NdbApiSignal.hpp
      storage/ndb/src/ndbapi/NdbBlob.cpp
      storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
      storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
      storage/ndb/src/ndbapi/NdbImpl.hpp
      storage/ndb/src/ndbapi/NdbInfoScanOperation.cpp
      storage/ndb/src/ndbapi/NdbOperation.cpp
      storage/ndb/src/ndbapi/NdbOperationExec.cpp
      storage/ndb/src/ndbapi/NdbOperationSearch.cpp
      storage/ndb/src/ndbapi/NdbReceiver.cpp
      storage/ndb/src/ndbapi/NdbScanFilter.cpp
      storage/ndb/src/ndbapi/NdbScanOperation.cpp
      storage/ndb/src/ndbapi/NdbTransaction.cpp
      storage/ndb/src/ndbapi/NdbTransactionScan.cpp
      storage/ndb/src/ndbapi/NdbWaiter.hpp
      storage/ndb/src/ndbapi/Ndberr.cpp
      storage/ndb/src/ndbapi/Ndbif.cpp
      storage/ndb/src/ndbapi/Ndbinit.cpp
      storage/ndb/src/ndbapi/Ndblist.cpp
      storage/ndb/src/ndbapi/SignalSender.cpp
      storage/ndb/src/ndbapi/TransporterFacade.cpp
      storage/ndb/src/ndbapi/TransporterFacade.hpp
      storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
      storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp
      storage/ndb/src/ndbapi/ndb_internal.hpp
      storage/ndb/test/src/NDBT_Test.cpp
 3849 Jonas Oreland	2010-09-30 [merge]
      ndb - merge 70 to 71

    modified:
      storage/ndb/src/ndbapi/API.hpp
      storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
=== modified file 'storage/ndb/src/mgmsrv/ConfigManager.cpp'
--- a/storage/ndb/src/mgmsrv/ConfigManager.cpp	2010-09-21 12:02:05 +0000
+++ b/storage/ndb/src/mgmsrv/ConfigManager.cpp	2010-09-30 09:32:28 +0000
@@ -20,6 +20,7 @@
 
 #include <NdbConfig.h>
 #include <NdbSleep.h>
+#include <kernel/GlobalSignalNumbers.h>
 #include <SignalSender.hpp>
 #include <NdbApiSignal.hpp>
 #include <signaldata/NFCompleteRep.hpp>
@@ -27,6 +28,8 @@
 #include <signaldata/ApiRegSignalData.hpp>
 #include <ndb_version.h>
 
+#include <EventLogger.hpp>
+extern EventLogger * g_eventLogger;
 
 extern "C" const char* opt_ndb_connectstring;
 extern "C" int opt_ndb_nodeid;

=== modified file 'storage/ndb/src/mgmsrv/main.cpp'
--- a/storage/ndb/src/mgmsrv/main.cpp	2010-09-23 07:31:51 +0000
+++ b/storage/ndb/src/mgmsrv/main.cpp	2010-09-30 09:32:28 +0000
@@ -34,6 +34,10 @@
 #include <NdbAutoPtr.hpp>
 #include <ndb_mgmclient.hpp>
 
+#include <EventLogger.hpp>
+extern EventLogger * g_eventLogger;
+
+
 const char *load_default_groups[]= { "mysql_cluster","ndb_mgmd",0 };
 
 // copied from mysql.cc to get readline

=== modified file 'storage/ndb/src/ndbapi/API.hpp'
--- a/storage/ndb/src/ndbapi/API.hpp	2010-09-30 07:19:22 +0000
+++ b/storage/ndb/src/ndbapi/API.hpp	2010-09-30 09:32:28 +0000
@@ -26,8 +26,6 @@
 #include <NdbOut.hpp>
 
 #include "NdbApiSignal.hpp"
-
-#include "NdbImpl.hpp"
 #include "NdbDictionaryImpl.hpp"
 #include "NdbRecord.hpp"
 #include "NdbUtil.hpp"
@@ -41,9 +39,15 @@
 #include <NdbRecAttr.hpp>
 #include <NdbReceiver.hpp>
 #include <NdbBlob.hpp>
+#include <NdbBlobImpl.hpp>
 #include <NdbInterpretedCode.hpp>
 
 #include <NdbEventOperation.hpp>
 #include "NdbEventOperationImpl.hpp"
 
+#include <NdbReceiver.hpp>
+#include "NdbImpl.hpp"
+
+#include "TransporterFacade.hpp"
+
 #endif

=== modified file 'storage/ndb/src/ndbapi/CMakeLists.txt'
--- a/storage/ndb/src/ndbapi/CMakeLists.txt	2009-11-08 12:52:27 +0000
+++ b/storage/ndb/src/ndbapi/CMakeLists.txt	2010-09-30 09:32:28 +0000
@@ -56,5 +56,6 @@ ADD_LIBRARY(ndbapi STATIC
             SignalSender.cpp
             ObjectMap.cpp
             NdbInfo.cpp
-            NdbInfoScanOperation.cpp)
+            NdbInfoScanOperation.cpp
+            ndb_internal.cpp)
 

=== modified file 'storage/ndb/src/ndbapi/ClusterMgr.cpp'
--- a/storage/ndb/src/ndbapi/ClusterMgr.cpp	2010-08-03 07:25:36 +0000
+++ b/storage/ndb/src/ndbapi/ClusterMgr.cpp	2010-09-30 09:32:28 +0000
@@ -21,10 +21,11 @@
 #include <util/version.h>
 
 #include "TransporterFacade.hpp"
+#include <kernel/GlobalSignalNumbers.h>
+
 #include "ClusterMgr.hpp"
 #include <IPCConfig.hpp>
 #include "NdbApiSignal.hpp"
-#include "API.hpp"
 #include <NdbSleep.h>
 #include <NdbOut.hpp>
 #include <NdbTick.h>

=== modified file 'storage/ndb/src/ndbapi/ClusterMgr.hpp'
--- a/storage/ndb/src/ndbapi/ClusterMgr.hpp	2010-01-28 15:16:46 +0000
+++ b/storage/ndb/src/ndbapi/ClusterMgr.hpp	2010-09-30 09:32:28 +0000
@@ -19,7 +19,6 @@
 #ifndef ClusterMgr_H
 #define ClusterMgr_H
 
-#include "API.hpp"
 #include <ndb_limits.h>
 #include <NdbThread.h>
 #include <NdbMutex.h>

=== modified file 'storage/ndb/src/ndbapi/Makefile.am'
--- a/storage/ndb/src/ndbapi/Makefile.am	2009-11-08 12:52:27 +0000
+++ b/storage/ndb/src/ndbapi/Makefile.am	2010-09-30 09:32:28 +0000
@@ -60,7 +60,8 @@ libndbapi_la_SOURCES = \
         ObjectMap.cpp \
 	NdbInterpretedCode.cpp \
 	NdbInfo.cpp \
-	NdbInfoScanOperation.cpp
+	NdbInfoScanOperation.cpp \
+        ndb_internal.cpp
 
 INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/src/mgmapi
 

=== modified file 'storage/ndb/src/ndbapi/Ndb.cpp'
--- a/storage/ndb/src/ndbapi/Ndb.cpp	2010-08-26 12:33:33 +0000
+++ b/storage/ndb/src/ndbapi/Ndb.cpp	2010-09-30 09:32:28 +0000
@@ -25,19 +25,11 @@ Name:          Ndb.cpp
 
 #include <ndb_global.h>
 
-
-#include "NdbApiSignal.hpp"
-#include "NdbImpl.hpp"
-#include <NdbOperation.hpp>
-#include <NdbTransaction.hpp>
-#include <NdbEventOperation.hpp>
-#include <NdbEventOperationImpl.hpp>
-#include <NdbRecAttr.hpp>
+#include "API.hpp"
 #include <md5_hash.hpp>
 #include <NdbSleep.h>
 #include <NdbOut.hpp>
 #include <ndb_limits.h>
-#include "API.hpp"
 #include <NdbEnv.h>
 #include <BaseString.hpp>
 #include <NdbSqlUtil.hpp>

=== modified file 'storage/ndb/src/ndbapi/NdbApiSignal.hpp'
--- a/storage/ndb/src/ndbapi/NdbApiSignal.hpp	2010-09-29 13:25:19 +0000
+++ b/storage/ndb/src/ndbapi/NdbApiSignal.hpp	2010-09-30 09:32:28 +0000
@@ -33,27 +33,10 @@
 #define NdbApiSignal_H
 
 #include <kernel_types.h>
-#include "TransporterFacade.hpp"
+#include <RefConvert.hpp>
 #include <TransporterDefinitions.hpp>
-#include "Ndb.hpp"
 
-#include <signaldata/GetTabInfo.hpp>
-#include <signaldata/DictTabInfo.hpp>
-#include <signaldata/CreateTable.hpp>
-#include <signaldata/CreateIndx.hpp>
-#include <signaldata/CreateEvnt.hpp>
-#include <signaldata/SumaImpl.hpp>
-#include <signaldata/DropTable.hpp>
-#include <signaldata/AlterTable.hpp>
-#include <signaldata/DropIndx.hpp>
-#include <signaldata/ListTables.hpp>
-#include <signaldata/DropFilegroup.hpp>
-#include <signaldata/CreateFilegroup.hpp>
-#include <signaldata/WaitGCP.hpp>
-#include <signaldata/SchemaTrans.hpp>
-#include <signaldata/CreateHashMap.hpp>
-#include <signaldata/ApiRegSignalData.hpp>
-#include <signaldata/ArbitSignalData.hpp>
+class Ndb;
 
 /**
  * A NdbApiSignal : public SignalHeader

=== modified file 'storage/ndb/src/ndbapi/NdbBlob.cpp'
--- a/storage/ndb/src/ndbapi/NdbBlob.cpp	2010-02-26 12:44:34 +0000
+++ b/storage/ndb/src/ndbapi/NdbBlob.cpp	2010-09-30 09:32:28 +0000
@@ -16,20 +16,9 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-#include <Ndb.hpp>
-#include <NdbDictionaryImpl.hpp>
-#include <NdbTransaction.hpp>
-#include <NdbOperation.hpp>
-#include <NdbIndexOperation.hpp>
-#include <NdbRecAttr.hpp>
-#include <NdbBlob.hpp>
-#include "NdbBlobImpl.hpp"
-#include <NdbScanOperation.hpp>
+#include "API.hpp"
 #include <signaldata/TcKeyReq.hpp>
-#include <NdbEventOperationImpl.hpp>
 #include <NdbEnv.h>
-#include "NdbRecord.hpp"
-#include "NdbUtil.hpp"
 #include <ndb_version.h>
 
 /*

=== modified file 'storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2010-09-30 07:19:22 +0000
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2010-09-30 09:32:28 +0000
@@ -16,19 +16,11 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-#include "NdbDictionaryImpl.hpp"
 #include "API.hpp"
 #include <NdbOut.hpp>
-#include "NdbApiSignal.hpp"
-#include "TransporterFacade.hpp"
 #include <SimpleProperties.hpp>
 #include <Bitmask.hpp>
 #include <AttributeList.hpp>
-#include <NdbEventOperation.hpp>
-#include "NdbEventOperationImpl.hpp"
-#include <NdbBlob.hpp>
-#include "NdbBlobImpl.hpp"
-#include <NdbInterpretedCode.hpp>
 #include <AttributeHeader.hpp>
 #include <my_sys.h>
 #include <NdbEnv.h>
@@ -36,6 +28,23 @@
 #include <util/version.h>
 #include <NdbSleep.h>
 
+#include <signaldata/GetTabInfo.hpp>
+#include <signaldata/DictTabInfo.hpp>
+#include <signaldata/CreateTable.hpp>
+#include <signaldata/CreateIndx.hpp>
+#include <signaldata/CreateEvnt.hpp>
+#include <signaldata/SumaImpl.hpp>
+#include <signaldata/DropTable.hpp>
+#include <signaldata/AlterTable.hpp>
+#include <signaldata/DropIndx.hpp>
+#include <signaldata/ListTables.hpp>
+#include <signaldata/DropFilegroup.hpp>
+#include <signaldata/CreateFilegroup.hpp>
+#include <signaldata/WaitGCP.hpp>
+#include <signaldata/SchemaTrans.hpp>
+#include <signaldata/CreateHashMap.hpp>
+#include <signaldata/ApiRegSignalData.hpp>
+
 #define DEBUG_PRINT 0
 #define INCOMPATIBLE_VERSION -2
 
@@ -5095,7 +5104,6 @@ NdbDictInterface::execDROP_EVNT_REF(cons
   DBUG_VOID_RETURN;
 }
 
-#include <NdbScanOperation.hpp>
 static int scanEventTable(Ndb* pNdb, 
                           const NdbDictionary::Table* pTab,
                           NdbDictionary::Dictionary::List &list)

=== modified file 'storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2010-09-29 13:25:19 +0000
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2010-09-30 09:32:28 +0000
@@ -20,11 +20,9 @@
 #include <ndb_global.h>
 #include <kernel_types.h>
 
-#include "NdbDictionaryImpl.hpp"
 #include "API.hpp"
 #include <NdbOut.hpp>
-#include "NdbApiSignal.hpp"
-#include "TransporterFacade.hpp"
+
 #include <signaldata/CreateEvnt.hpp>
 #include <signaldata/SumaImpl.hpp>
 #include <SimpleProperties.hpp>
@@ -34,15 +32,7 @@
 #include <NdbError.hpp>
 #include <BaseString.hpp>
 #include <UtilBuffer.hpp>
-#include <NdbDictionary.hpp>
-#include <Ndb.hpp>
-#include "NdbImpl.hpp"
-#include "DictCache.hpp"
 #include <portlib/NdbMem.h>
-#include <NdbRecAttr.hpp>
-#include <NdbBlob.hpp>
-#include <NdbEventOperation.hpp>
-#include "NdbEventOperationImpl.hpp"
 #include <signaldata/AlterTable.hpp>
 #include "ndb_internal.hpp"
 

=== modified file 'storage/ndb/src/ndbapi/NdbImpl.hpp'
--- a/storage/ndb/src/ndbapi/NdbImpl.hpp	2010-01-28 15:16:46 +0000
+++ b/storage/ndb/src/ndbapi/NdbImpl.hpp	2010-09-30 10:36:47 +0000
@@ -20,12 +20,8 @@
 #define NDB_IMPL_HPP
 
 #include <ndb_global.h>
-#include <Ndb.hpp>
+#include "API.hpp"
 #include <NdbOut.hpp>
-#include <NdbError.hpp>
-#include <NdbCondition.h>
-#include <NdbReceiver.hpp>
-#include <NdbOperation.hpp>
 #include <kernel/ndb_limits.h>
 
 #include <NdbTick.h>
@@ -117,6 +113,13 @@ public:
     ndb->theImpl->forceShortRequests = val;
   }
 
+  Uint32 get_waitfor_timeout() const {
+    return m_ndb_cluster_connection.m_config.m_waitfor_timeout;
+  }
+  const NdbApiConfig& get_ndbapi_config_parameters() const {
+    return m_ndb_cluster_connection.m_config;
+  }
+
 
   BaseString m_systemPrefix; // Buffer for preformatted for <sys>/<def>/
 

=== modified file 'storage/ndb/src/ndbapi/NdbInfoScanOperation.cpp'
--- a/storage/ndb/src/ndbapi/NdbInfoScanOperation.cpp	2010-08-17 09:54:53 +0000
+++ b/storage/ndb/src/ndbapi/NdbInfoScanOperation.cpp	2010-09-30 09:32:28 +0000
@@ -18,7 +18,7 @@
 
 #include "NdbInfo.hpp"
 #include "SignalSender.hpp"
-
+#include <kernel/GlobalSignalNumbers.h>
 #include <AttributeHeader.hpp>
 #include <signaldata/DbinfoScan.hpp>
 #include <signaldata/TransIdAI.hpp>

=== modified file 'storage/ndb/src/ndbapi/NdbOperation.cpp'
--- a/storage/ndb/src/ndbapi/NdbOperation.cpp	2010-01-28 15:16:46 +0000
+++ b/storage/ndb/src/ndbapi/NdbOperation.cpp	2010-09-30 09:32:28 +0000
@@ -16,19 +16,8 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-#include <ndb_global.h>
-#include <NdbTransaction.hpp>
-#include <NdbOperation.hpp>
-#include "NdbApiSignal.hpp"
-#include "NdbRecAttr.hpp"
-#include "NdbUtil.hpp"
-#include "NdbBlob.hpp"
-#include "ndbapi_limits.h"
-#include <signaldata/TcKeyReq.hpp>
-#include "NdbDictionaryImpl.hpp"
-
 #include "API.hpp"
-#include <NdbOut.hpp>
+#include <signaldata/TcKeyReq.hpp>
 
 
 /******************************************************************************

=== modified file 'storage/ndb/src/ndbapi/NdbOperationExec.cpp'
--- a/storage/ndb/src/ndbapi/NdbOperationExec.cpp	2010-09-29 13:25:19 +0000
+++ b/storage/ndb/src/ndbapi/NdbOperationExec.cpp	2010-09-30 09:32:28 +0000
@@ -17,14 +17,7 @@
 */
 
 #include <ndb_global.h>
-#include <NdbOperation.hpp>
-#include <NdbTransaction.hpp>
-#include <NdbBlob.hpp>
-#include "NdbApiSignal.hpp"
-#include <Ndb.hpp>
-#include <NdbRecAttr.hpp>
-#include "NdbUtil.hpp"
-#include "NdbInterpretedCode.hpp"
+#include "API.hpp"
 
 #include "Interpreter.hpp"
 #include <AttributeHeader.hpp>

=== modified file 'storage/ndb/src/ndbapi/NdbOperationSearch.cpp'
--- a/storage/ndb/src/ndbapi/NdbOperationSearch.cpp	2009-11-27 14:47:24 +0000
+++ b/storage/ndb/src/ndbapi/NdbOperationSearch.cpp	2010-09-30 09:32:28 +0000
@@ -31,18 +31,10 @@ Adjust:  971022  UABMNST   First version
  *****************************************************************************/
 #include "API.hpp"
 
-#include <NdbOperation.hpp>
-#include "NdbApiSignal.hpp"
-#include <NdbTransaction.hpp>
-#include <Ndb.hpp>
-#include "NdbImpl.hpp"
-#include <NdbOut.hpp>
-#include "NdbBlob.hpp"
 
 #include <AttributeHeader.hpp>
 #include <signaldata/TcKeyReq.hpp>
 #include <signaldata/KeyInfo.hpp>
-#include "NdbDictionaryImpl.hpp"
 #include <md5_hash.hpp>
 
 /******************************************************************************

=== modified file 'storage/ndb/src/ndbapi/NdbReceiver.cpp'
--- a/storage/ndb/src/ndbapi/NdbReceiver.cpp	2010-09-29 13:25:19 +0000
+++ b/storage/ndb/src/ndbapi/NdbReceiver.cpp	2010-09-30 10:36:47 +0000
@@ -140,10 +140,10 @@ NdbReceiver::calculate_batch_size(Uint32
                                   Uint32& first_batch_size,
                                   const NdbRecord *record)
 {
-  TransporterFacade *tp= m_ndb->theImpl->m_transporter_facade;
-  Uint32 max_scan_batch_size= tp->get_scan_batch_size();
-  Uint32 max_batch_byte_size= tp->get_batch_byte_size();
-  Uint32 max_batch_size= tp->get_batch_size();
+  const NdbApiConfig & cfg = m_ndb->theImpl->get_ndbapi_config_parameters();
+  Uint32 max_scan_batch_size= cfg.m_scan_batch_size;
+  Uint32 max_batch_byte_size= cfg.m_batch_byte_size;
+  Uint32 max_batch_size= cfg.m_batch_size;
   Uint32 tot_size= (key_size ? (key_size + 32) : 0); //key + signal overhead
 
   if (record)

=== modified file 'storage/ndb/src/ndbapi/NdbScanFilter.cpp'
--- a/storage/ndb/src/ndbapi/NdbScanFilter.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/src/ndbapi/NdbScanFilter.cpp	2010-09-30 09:32:28 +0000
@@ -16,18 +16,12 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
+#include "API.hpp"
 #include <NdbScanFilter.hpp>
-#include <Ndb.hpp>
-#include <NdbOperation.hpp>
-#include <NdbScanOperation.hpp>
-#include "NdbDictionaryImpl.hpp"
 #include <Vector.hpp>
 #include <NdbOut.hpp>
 #include <Interpreter.hpp>
 #include <signaldata/AttrInfo.hpp>
-#include "NdbApiSignal.hpp"
-#include "NdbUtil.hpp"
-#include <NdbInterpretedCode.hpp>
 
 #ifdef VM_TRACE
 #include <NdbEnv.h>

=== modified file 'storage/ndb/src/ndbapi/NdbScanOperation.cpp'
--- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp	2010-09-29 13:25:19 +0000
+++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp	2010-09-30 10:36:47 +0000
@@ -1829,6 +1829,7 @@ NdbScanOperation::nextResultNdbRecord(co
 
   /* Now we have to wait for more rows (or end-of-file on all receivers). */
   Uint32 nodeId = theNdbCon->theDBnode;
+  Uint32 timeout= theNdb->theImpl->get_waitfor_timeout();
   TransporterFacade* tp = theNdb->theImpl->m_transporter_facade;
   int retVal= 2;
   Uint32 idx, last;
@@ -1851,7 +1852,6 @@ NdbScanOperation::nextResultNdbRecord(co
   {
     idx= m_current_api_receiver;
     last= m_api_receivers_count;
-    Uint32 timeout= tp->m_waitfor_timeout;
 
     do {
       if (theError.code){
@@ -3709,6 +3709,7 @@ NdbIndexScanOperation::ordered_insert_re
 int
 NdbIndexScanOperation::ordered_send_scan_wait_for_all(bool forceSend)
 {
+  Uint32 timeout= theNdb->theImpl->get_waitfor_timeout();
   TransporterFacade* tp= theNdb->theImpl->m_transporter_facade;
 
   PollGuard poll_guard(tp, &theNdb->theImpl->theWaiter,
@@ -3718,7 +3719,6 @@ NdbIndexScanOperation::ordered_send_scan
 
   Uint32 seq= theNdbCon->theNodeSequence;
   Uint32 nodeId= theNdbCon->theDBnode;
-  Uint32 timeout= tp->m_waitfor_timeout;
   if (seq == tp->getNodeSequence(nodeId) &&
       !send_next_scan_ordered(m_current_api_receiver))
   {
@@ -3808,6 +3808,7 @@ int
 NdbScanOperation::close_impl(TransporterFacade* tp, bool forceSend,
                              PollGuard *poll_guard)
 {
+  Uint32 timeout= theNdb->theImpl->get_waitfor_timeout();
   Uint32 seq = theNdbCon->theNodeSequence;
   Uint32 nodeId = theNdbCon->theDBnode;
   
@@ -3817,7 +3818,6 @@ NdbScanOperation::close_impl(Transporter
     return -1;
   }
   
-  Uint32 timeout = tp->m_waitfor_timeout;
   /**
    * Wait for outstanding
    */

=== modified file 'storage/ndb/src/ndbapi/NdbTransaction.cpp'
--- a/storage/ndb/src/ndbapi/NdbTransaction.cpp	2010-09-29 13:25:19 +0000
+++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp	2010-09-30 10:36:47 +0000
@@ -18,17 +18,7 @@
 
 #include <ndb_global.h>
 #include <NdbOut.hpp>
-#include <NdbTransaction.hpp>
-#include <NdbOperation.hpp>
-#include <NdbScanOperation.hpp>
-#include <NdbIndexScanOperation.hpp>
-#include <NdbIndexOperation.hpp>
-#include <NdbDictionaryImpl.hpp>
-#include "NdbApiSignal.hpp"
-#include "TransporterFacade.hpp"
 #include "API.hpp"
-#include "NdbBlob.hpp"
-#include "NdbUtil.hpp"
 
 #include <AttributeHeader.hpp>
 #include <signaldata/TcKeyConf.hpp>
@@ -535,7 +525,7 @@ NdbTransaction::executeNoBlobs(NdbTransa
 //------------------------------------------------------------------------
   Ndb* tNdb = theNdb;
 
-  Uint32 timeout = theNdb->theImpl->m_transporter_facade->m_waitfor_timeout;
+  Uint32 timeout = theNdb->theImpl->get_waitfor_timeout();
   m_waitForReply = false;
   executeAsynchPrepare(aTypeOfExec, NULL, NULL, abortOption);
   if (m_waitForReply){

=== modified file 'storage/ndb/src/ndbapi/NdbTransactionScan.cpp'
--- a/storage/ndb/src/ndbapi/NdbTransactionScan.cpp	2010-09-29 13:25:19 +0000
+++ b/storage/ndb/src/ndbapi/NdbTransactionScan.cpp	2010-09-30 09:32:28 +0000
@@ -19,15 +19,7 @@
 
 #include <ndb_global.h>
 
-#include <Ndb.hpp>
-#include <NdbTransaction.hpp>
-#include <NdbOperation.hpp>
-#include <NdbScanOperation.hpp>
-#include "NdbApiSignal.hpp"
-#include "TransporterFacade.hpp"
-#include "NdbUtil.hpp"
 #include "API.hpp"
-#include "NdbImpl.hpp"
 
 #include <signaldata/ScanTab.hpp>
 

=== modified file 'storage/ndb/src/ndbapi/NdbWaiter.hpp'
--- a/storage/ndb/src/ndbapi/NdbWaiter.hpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/src/ndbapi/NdbWaiter.hpp	2010-09-30 09:32:28 +0000
@@ -20,14 +20,9 @@
 #define NDB_WAITER_HPP
 
 #include <ndb_global.h>
-#include <NdbOut.hpp>
-#include <NdbError.hpp>
-#include <NdbCondition.h>
-#include <NdbReceiver.hpp>
-#include <NdbOperation.hpp>
-#include <kernel/ndb_limits.h>
-
 #include <NdbTick.h>
+#include <NdbCondition.h>
+#include <NdbOut.hpp>
 
 enum WaitSignalType { 
   NO_WAIT           = 0,

=== modified file 'storage/ndb/src/ndbapi/Ndberr.cpp'
--- a/storage/ndb/src/ndbapi/Ndberr.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/ndbapi/Ndberr.cpp	2010-09-30 09:32:28 +0000
@@ -16,14 +16,7 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-
-#include <NdbError.hpp>
-#include "NdbImpl.hpp"
-#include "NdbDictionaryImpl.hpp"
-#include <NdbOperation.hpp>
-#include <NdbTransaction.hpp>
-#include <NdbBlob.hpp>
-#include "NdbEventOperationImpl.hpp"
+#include "API.hpp"
 
 static void
 update(const NdbError & _err){

=== modified file 'storage/ndb/src/ndbapi/Ndbif.cpp'
--- a/storage/ndb/src/ndbapi/Ndbif.cpp	2010-09-29 13:25:19 +0000
+++ b/storage/ndb/src/ndbapi/Ndbif.cpp	2010-09-30 11:52:49 +0000
@@ -19,16 +19,7 @@
 
 #include <ndb_global.h>
 
-#include "NdbApiSignal.hpp"
-#include "NdbImpl.hpp"
-#include <NdbTransaction.hpp>
-#include <NdbOperation.hpp>
-#include <NdbIndexOperation.hpp>
-#include <NdbScanOperation.hpp>
-#include <NdbRecAttr.hpp>
-#include <NdbReceiver.hpp>
 #include "API.hpp"
-#include "NdbEventOperationImpl.hpp"
 
 #include <signaldata/TcCommit.hpp>
 #include <signaldata/TcKeyFailConf.hpp>
@@ -150,7 +141,7 @@ error_handler:
   ndbout << "error_handler" << endl;
   releaseTransactionArrays();
   delete theDictionary;
-  theImpl->m_transporter_facade->close(theNdbBlockNumber, 0);
+  theImpl->m_transporter_facade->close(theNdbBlockNumber);
   DBUG_RETURN(-1);
 }
 
@@ -199,9 +190,8 @@ void Ndb::connected(Uint32 ref)
   }
   theImpl->theNoOfDBnodes = n;
   
-  theFirstTransId = ((Uint64)tBlockNo << 52)+
+  theFirstTransId += ((Uint64)tBlockNo << 52)+
     ((Uint64)tmpTheNode << 40);
-  theFirstTransId += theFacade->m_max_trans_id;
   //      assert(0);
   DBUG_PRINT("info",("connected with ref=%x, id=%d, no_db_nodes=%d, first_trans_id: 0x%lx",
 		     theMyRef,
@@ -1094,7 +1084,7 @@ Ndb::pollCompleted(NdbTransaction** aCop
 void
 Ndb::check_send_timeout()
 {
-  Uint32 timeout = theImpl->m_transporter_facade->m_waitfor_timeout;
+  Uint32 timeout = theImpl->get_ndbapi_config_parameters().m_waitfor_timeout;
   NDB_TICKS current_time = NdbTick_CurrentMillisecond();
   assert(current_time >= the_last_check_time);
   if (current_time - the_last_check_time > 1000) {

=== modified file 'storage/ndb/src/ndbapi/Ndbinit.cpp'
--- a/storage/ndb/src/ndbapi/Ndbinit.cpp	2010-01-28 15:16:46 +0000
+++ b/storage/ndb/src/ndbapi/Ndbinit.cpp	2010-09-30 11:52:49 +0000
@@ -19,23 +19,15 @@
 
 #include <ndb_global.h>
 
+#include "API.hpp"
 #include "NdbApiSignal.hpp"
 #include "NdbImpl.hpp"
-#include <NdbOperation.hpp>
-#include <NdbTransaction.hpp>
-#include <NdbRecAttr.hpp>
-#include <IPCConfig.hpp>
-#include "TransporterFacade.hpp"
 #include <ConfigRetriever.hpp>
 #include <ndb_limits.h>
 #include <NdbOut.hpp>
 #include <NdbSleep.h>
 #include "ObjectMap.hpp"
-#include <NdbIndexScanOperation.hpp>
-#include <NdbIndexOperation.hpp>
 #include "NdbUtil.hpp"
-#include <NdbBlob.hpp>
-#include "NdbEventOperationImpl.hpp"
 
 #include <EventLogger.hpp>
 extern EventLogger * g_eventLogger;
@@ -153,7 +145,7 @@ Ndb::~Ndb()
 
   /* Disconnect from transporter to stop signals from coming in */
   if (theImpl->m_transporter_facade != NULL && theNdbBlockNumber > 0){
-    theImpl->m_transporter_facade->close(theNdbBlockNumber, theFirstTransId);
+    theImpl->m_transporter_facade->close(theNdbBlockNumber);
   }
 
   delete theEventBuffer;

=== modified file 'storage/ndb/src/ndbapi/Ndblist.cpp'
--- a/storage/ndb/src/ndbapi/Ndblist.cpp	2010-01-28 15:16:46 +0000
+++ b/storage/ndb/src/ndbapi/Ndblist.cpp	2010-09-30 09:32:28 +0000
@@ -16,16 +16,7 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-#include <NdbOut.hpp>
-#include <Ndb.hpp>
-#include <NdbOperation.hpp>
-#include <NdbIndexOperation.hpp>
-#include <NdbIndexScanOperation.hpp>
-#include "NdbApiSignal.hpp"
-#include <NdbRecAttr.hpp>
-#include "NdbUtil.hpp"
 #include "API.hpp"
-#include "NdbBlob.hpp"
 
 void
 Ndb::checkFailedNode()

=== modified file 'storage/ndb/src/ndbapi/SignalSender.cpp'
--- a/storage/ndb/src/ndbapi/SignalSender.cpp	2010-09-29 13:25:19 +0000
+++ b/storage/ndb/src/ndbapi/SignalSender.cpp	2010-09-30 11:52:49 +0000
@@ -17,6 +17,7 @@
 */
 
 #include "SignalSender.hpp"
+#include <kernel/GlobalSignalNumbers.h>
 #include <NdbSleep.h>
 #include <SignalLoggerManager.hpp>
 #include <signaldata/NFCompleteRep.hpp>
@@ -99,7 +100,7 @@ SignalSender::~SignalSender(){
   int i;
   if (m_lock)
     unlock();
-  theFacade->close(m_blockNo,0);
+  theFacade->close(m_blockNo);
   // free these _after_ closing theFacade to ensure that
   // we delete all signals
   for (i= m_jobBuffer.size()-1; i>= 0; i--)

=== modified file 'storage/ndb/src/ndbapi/TransporterFacade.cpp'
--- a/storage/ndb/src/ndbapi/TransporterFacade.cpp	2010-08-20 08:35:41 +0000
+++ b/storage/ndb/src/ndbapi/TransporterFacade.cpp	2010-09-30 11:52:49 +0000
@@ -25,11 +25,12 @@
 #include <TransporterCallback.hpp>
 #include <TransporterRegistry.hpp>
 #include "NdbApiSignal.hpp"
+#include "NdbWaiter.hpp"
 #include <NdbOut.hpp>
 #include <NdbEnv.h>
 #include <NdbSleep.h>
 
-#include "API.hpp"
+#include <kernel/GlobalSignalNumbers.h>
 #include <mgmapi_config_parameters.h>
 #include <mgmapi_configuration.hpp>
 #include <NdbConfig.h>
@@ -724,13 +725,9 @@ TransporterFacade::TransporterFacade(Glo
   theArbitMgr(NULL),
   checkCounter(4),
   currentSendLimit(1),
-  m_scan_batch_size(MAX_SCAN_BATCH_SIZE),
-  m_batch_byte_size(SCAN_BATCH_SIZE),
-  m_batch_size(DEF_BATCH_SIZE),
   theStopReceive(0),
   theSendThread(NULL),
   theReceiveThread(NULL),
-  m_max_trans_id(0),
   m_fragmented_signal_id(0),
   m_globalDictCache(cache)
 {
@@ -848,20 +845,6 @@ TransporterFacade::configure(NodeId node
     theArbitMgr= NULL;
   }
 
-  // Configure scan settings
-  Uint32 scan_batch_size= 0;
-  if (!iter.get(CFG_MAX_SCAN_BATCH_SIZE, &scan_batch_size)) {
-    m_scan_batch_size= scan_batch_size;
-  }
-  Uint32 batch_byte_size= 0;
-  if (!iter.get(CFG_BATCH_BYTE_SIZE, &batch_byte_size)) {
-    m_batch_byte_size= batch_byte_size;
-  }
-  Uint32 batch_size= 0;
-  if (!iter.get(CFG_BATCH_SIZE, &batch_size)) {
-    m_batch_size= batch_size;
-  }
-
   Uint32 auto_reconnect=1;
   iter.get(CFG_AUTO_RECONNECT, &auto_reconnect);
 
@@ -879,19 +862,6 @@ TransporterFacade::configure(NodeId node
     theClusterMgr->m_auto_reconnect = auto_reconnect;
   }
   
-  // Configure timeouts
-  Uint32 timeout = 120000;
-  for (iter.first(); iter.valid(); iter.next())
-  {
-    Uint32 tmp1 = 0, tmp2 = 0;
-    iter.get(CFG_DB_TRANSACTION_CHECK_INTERVAL, &tmp1);
-    iter.get(CFG_DB_TRANSACTION_DEADLOCK_TIMEOUT, &tmp2);
-    tmp1 += tmp2;
-    if (tmp1 > timeout)
-      timeout = tmp1;
-  }
-  m_waitfor_timeout = timeout;
-
 #ifdef API_TRACE
   signalLogger.logOn(true, 0, SignalLoggerManager::LogInOut);
 #endif
@@ -1005,11 +975,9 @@ TransporterFacade::ReportNodeAlive(NodeI
 }
 
 int 
-TransporterFacade::close(BlockNumber blockNumber, Uint64 trans_id)
+TransporterFacade::close(BlockNumber blockNumber)
 {
   NdbMutex_Lock(theMutexPtr);
-  Uint32 low_bits = (Uint32)trans_id;
-  m_max_trans_id = m_max_trans_id > low_bits ? m_max_trans_id : low_bits;
   close_local(blockNumber);
   NdbMutex_Unlock(theMutexPtr);
   return 0;

=== modified file 'storage/ndb/src/ndbapi/TransporterFacade.hpp'
--- a/storage/ndb/src/ndbapi/TransporterFacade.hpp	2010-09-29 13:25:19 +0000
+++ b/storage/ndb/src/ndbapi/TransporterFacade.hpp	2010-09-30 11:52:49 +0000
@@ -42,7 +42,6 @@ typedef void (* NodeStatusFunction)(void
 extern "C" {
   void* runSendRequest_C(void*);
   void* runReceiveResponse_C(void*);
-  void atexit_stop_instance();
 }
 
 class TransporterFacade : public TransporterCallback
@@ -74,7 +73,7 @@ public:
            int blockNo = -1);
   
   // Close this block number
-  int close(BlockNumber blockNumber, Uint64 trans_id);
+  int close(BlockNumber blockNumber);
   Uint32 get_active_ndb_objects() const;
 
   // Only sends to nodes which are alive
@@ -131,12 +130,6 @@ public:
   // Close this block number
   int close_local(BlockNumber blockNumber);
 
-  // Scan batch configuration parameters
-  Uint32 get_scan_batch_size();
-  Uint32 get_batch_byte_size();
-  Uint32 get_batch_size();
-  Uint32 m_waitfor_timeout; // in milli seconds...
-
   TransporterRegistry* get_registry() { return theTransporterRegistry;};
 
 /*
@@ -244,11 +237,6 @@ private:
   
   void calculateSendLimit();
 
-  // Scan batch configuration parameters
-  Uint32 m_scan_batch_size;
-  Uint32 m_batch_byte_size;
-  Uint32 m_batch_size;
-
   // Declarations for the receive and send thread
   int  theStopReceive;
 
@@ -259,7 +247,6 @@ private:
 
   friend void* runSendRequest_C(void*);
   friend void* runReceiveResponse_C(void*);
-  friend void atexit_stop_instance();
 
   bool do_connect_mgm(NodeId, const ndb_mgm_configuration*);
 
@@ -316,7 +303,6 @@ private:
   } m_threads;
 
   Uint32 m_fixed2dynamic[NO_API_FIXED_BLOCKS];
-  Uint32 m_max_trans_id;
   Uint32 m_fragmented_signal_id;
 
 public:
@@ -456,24 +442,6 @@ TransporterFacade::getMinDbNodeVersion()
     return 0;
 }
 
-inline
-Uint32
-TransporterFacade::get_scan_batch_size() {
-  return m_scan_batch_size;
-}
-
-inline
-Uint32
-TransporterFacade::get_batch_byte_size() {
-  return m_batch_byte_size;
-}
-
-inline
-Uint32
-TransporterFacade::get_batch_size() {
-  return m_batch_size;
-}
-
 /** 
  * LinearSectionIterator
  *

=== modified file 'storage/ndb/src/ndbapi/ndb_cluster_connection.cpp'
--- a/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp	2010-05-04 14:34:54 +0000
+++ b/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp	2010-09-30 11:52:49 +0000
@@ -23,7 +23,7 @@
 #include "ndb_cluster_connection_impl.hpp"
 #include <mgmapi_configuration.hpp>
 #include <mgmapi_config_parameters.h>
-#include <TransporterFacade.hpp>
+#include "TransporterFacade.hpp"
 #include <NdbOut.hpp>
 #include <NdbSleep.h>
 #include <NdbThread.h>
@@ -33,6 +33,8 @@
 #include <mgmapi_debug.h>
 #include <mgmapi_internal.h>
 #include <md5_hash.hpp>
+#include "NdbImpl.hpp"
+#include "NdbDictionaryImpl.hpp"
 
 #include <NdbMutex.h>
 #ifdef VM_TRACE
@@ -302,7 +304,8 @@ Ndb_cluster_connection_impl(const char *
     m_latest_trans_gci(0),
     m_first_ndb_object(0),
     m_latest_error_msg(),
-    m_latest_error(0)
+    m_latest_error(0),
+    m_max_trans_id(0)
 {
   DBUG_ENTER("Ndb_cluster_connection");
   DBUG_PRINT("enter",("Ndb_cluster_connection this=0x%lx", (long) this));
@@ -453,6 +456,7 @@ Ndb_cluster_connection_impl::link_ndb_ob
   p->theImpl->m_next_ndb_object = m_first_ndb_object;
   m_first_ndb_object = p;
   
+  p->theFirstTransId += m_max_trans_id;
   unlock_ndb_objects();
 }
 
@@ -481,6 +485,12 @@ Ndb_cluster_connection_impl::unlink_ndb_
   p->theImpl->m_prev_ndb_object = 0;
   p->theImpl->m_next_ndb_object = 0;
 
+  Uint32 transId = (Uint32)p->theFirstTransId;
+  if (transId > m_max_trans_id)
+  {
+    m_max_trans_id = transId;
+  }
+
   unlock_ndb_objects();  
 }
 
@@ -590,6 +600,46 @@ Ndb_cluster_connection_impl::init_nodes_
   DBUG_RETURN(0);
 }
 
+int
+Ndb_cluster_connection_impl::configure(Uint32 nodeId,
+                                       const ndb_mgm_configuration &config)
+{
+  DBUG_ENTER("Ndb_cluster_connection_impl::configure");
+  {
+    ndb_mgm_configuration_iterator iter(config, CFG_SECTION_NODE);
+    if(iter.find(CFG_NODE_ID, nodeId))
+      DBUG_RETURN(-1);
+
+    // Configure scan settings
+    Uint32 scan_batch_size= 0;
+    if (!iter.get(CFG_MAX_SCAN_BATCH_SIZE, &scan_batch_size)) {
+      m_config.m_scan_batch_size= scan_batch_size;
+    }
+    Uint32 batch_byte_size= 0;
+    if (!iter.get(CFG_BATCH_BYTE_SIZE, &batch_byte_size)) {
+      m_config.m_batch_byte_size= batch_byte_size;
+    }
+    Uint32 batch_size= 0;
+    if (!iter.get(CFG_BATCH_SIZE, &batch_size)) {
+      m_config.m_batch_size= batch_size;
+    }
+
+    // Configure timeouts
+    Uint32 timeout = 120000;
+    for (iter.first(); iter.valid(); iter.next())
+    {
+      Uint32 tmp1 = 0, tmp2 = 0;
+      iter.get(CFG_DB_TRANSACTION_CHECK_INTERVAL, &tmp1);
+      iter.get(CFG_DB_TRANSACTION_DEADLOCK_TIMEOUT, &tmp2);
+      tmp1 += tmp2;
+      if (tmp1 > timeout)
+        timeout = tmp1;
+    }
+    m_config.m_waitfor_timeout = timeout;
+  }
+  DBUG_RETURN(init_nodes_vector(nodeId, config));
+}
+
 void
 Ndb_cluster_connection_impl::do_test()
 {
@@ -684,16 +734,16 @@ int Ndb_cluster_connection_impl::connect
     if(props == 0)
       break;
 
-    if (m_transporter_facade->start_instance(nodeId, props) < 0)
+    if (configure(nodeId, *props))
     {
       ndb_mgm_destroy_configuration(props);
+      DBUG_PRINT("exit", ("malloc failure, ret: -1"));
       DBUG_RETURN(-1);
     }
 
-    if (init_nodes_vector(nodeId, *props))
+    if (m_transporter_facade->start_instance(nodeId, props) < 0)
     {
       ndb_mgm_destroy_configuration(props);
-      DBUG_PRINT("exit", ("malloc failure, ret: -1"));
       DBUG_RETURN(-1);
     }
 

=== modified file 'storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp'
--- a/storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp	2010-05-04 14:34:54 +0000
+++ b/storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp	2010-09-30 11:52:49 +0000
@@ -37,6 +37,21 @@ extern "C" {
   void* run_ndb_cluster_connection_connect_thread(void*);
 }
 
+struct NdbApiConfig
+{
+  NdbApiConfig() :
+    m_scan_batch_size(MAX_SCAN_BATCH_SIZE),
+    m_batch_byte_size(SCAN_BATCH_SIZE),
+    m_batch_size(DEF_BATCH_SIZE),
+    m_waitfor_timeout(120000)
+    {}
+
+  Uint32 m_scan_batch_size;
+  Uint32 m_batch_byte_size;
+  Uint32 m_batch_size;
+  Uint32 m_waitfor_timeout; // in milli seconds...
+};
+
 class Ndb_cluster_connection_impl : public Ndb_cluster_connection
 {
   Ndb_cluster_connection_impl(const char *connectstring,
@@ -75,6 +90,7 @@ private:
 
   Vector<Node> m_all_nodes;
   int init_nodes_vector(Uint32 nodeid, const ndb_mgm_configuration &config);
+  int configure(Uint32 nodeid, const ndb_mgm_configuration &config);
   void connect_thread();
   void set_name(const char *name);
 
@@ -101,6 +117,12 @@ private:
 
   BaseString m_latest_error_msg;
   unsigned m_latest_error;
+
+  // Scan batch configuration parameters
+  NdbApiConfig m_config;
+  
+  // keep initial transId's increasing...
+  Uint32 m_max_trans_id;
 };
 
 #endif

=== added file 'storage/ndb/src/ndbapi/ndb_internal.cpp'
--- a/storage/ndb/src/ndbapi/ndb_internal.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/src/ndbapi/ndb_internal.cpp	2010-09-30 09:32:28 +0000
@@ -0,0 +1,34 @@
+/*
+   Copyright (C) 2007 MySQL AB
+    All rights reserved. Use is subject to license terms.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 of the License.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+
+#include "API.hpp"
+#include "ndb_internal.hpp"
+
+int
+Ndb_internal::send_event_report(bool has_lock, 
+                                Ndb *ndb, Uint32 *data, Uint32 length)
+{
+  return ndb->theImpl->send_event_report(has_lock, data, length);
+}
+
+void
+Ndb_internal::setForceShortRequests(Ndb* ndb, bool val)
+{
+  ndb->theImpl->forceShortRequests = val;
+}
+                                    

=== modified file 'storage/ndb/src/ndbapi/ndb_internal.hpp'
--- a/storage/ndb/src/ndbapi/ndb_internal.hpp	2009-06-22 08:23:35 +0000
+++ b/storage/ndb/src/ndbapi/ndb_internal.hpp	2010-09-30 09:32:28 +0000
@@ -16,15 +16,19 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-#include "NdbImpl.hpp"
+#ifndef NDB_INTERNAL_HPP
+#define NDB_INTERNAL_HPP
 
-class Ndb_internal
+/**
+ * This class exposes non-public funcionality to various test/utility programs
+ */
+struct Ndb_internal
 {
-private:
-  friend class NdbEventBuffer;
-  friend class BackupRestore;
   Ndb_internal() {}
   virtual ~Ndb_internal() {}
-  static int send_event_report(bool has_lock, Ndb *ndb, Uint32 *data, Uint32 length)
-    { return ndb->theImpl->send_event_report(has_lock, data, length); }
+
+  static int send_event_report(bool has_lock, Ndb *ndb, Uint32*data,Uint32 len);
+  static void setForceShortRequests(Ndb*, bool val);
 };
+
+#endif

=== modified file 'storage/ndb/test/src/NDBT_Test.cpp'
--- a/storage/ndb/test/src/NDBT_Test.cpp	2010-08-16 17:02:58 +0000
+++ b/storage/ndb/test/src/NDBT_Test.cpp	2010-09-30 09:32:28 +0000
@@ -260,7 +260,7 @@ NDBT_Step::NDBT_Step(NDBT_TestCase* ptes
 {
 }
 
-#include <../../src/ndbapi/NdbImpl.hpp>
+#include "../../src/ndbapi/ndb_internal.hpp"
 
 int
 NDBT_Step::setUp(Ndb_cluster_connection& con){
@@ -275,8 +275,8 @@ NDBT_Step::setUp(Ndb_cluster_connection&
     m_ndb = new Ndb(&con, "TEST_DB" );
     m_ndb->init(1024);
 
-    NdbImpl::setForceShortRequests(m_ndb, 
-                                   m_ctx->suite->getForceShort());
+    Ndb_internal::setForceShortRequests(m_ndb, 
+                                        m_ctx->suite->getForceShort());
 
     int result = m_ndb->waitUntilReady(300); // 5 minutes
     if (result != 0){
@@ -931,7 +931,7 @@ NDBT_TestSuite::executeOneCtx(Ndb_cluste
     Ndb ndb(&con, "TEST_DB");
     ndb.init(1024);
 
-    NdbImpl::setForceShortRequests(&ndb, m_forceShort);
+    Ndb_internal::setForceShortRequests(&ndb, m_forceShort);
 
     int result = ndb.waitUntilReady(300); // 5 minutes
     if (result != 0){


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20100930115605-tg5tlpdh7133vxp1.bundle
Thread
bzr push into mysql-5.1-telco-7.1 branch (jonas:3849 to 3850) Jonas Oreland30 Sep