List:Commits« Previous MessageNext Message »
From:jonas Date:May 18 2007 8:00am
Subject:bk commit into 5.1 tree (jonas:1.2479)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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-05-18 10:00:10+02:00, jonas@stripped +6 -0
  Merge perch.ndb.mysql.com:/home/jonas/src/50-work
  into  perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
  MERGE: 1.1810.2124.63

  storage/ndb/src/common/transporter/Packer.cpp@stripped, 2007-05-18 09:57:48+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.5.4.2

  storage/ndb/src/common/transporter/Packer.cpp@stripped, 2007-05-18 09:57:48+02:00, jonas@stripped +0 -0
    Merge rename: ndb/src/common/transporter/Packer.cpp -> storage/ndb/src/common/transporter/Packer.cpp

  storage/ndb/src/common/transporter/TCP_Transporter.hpp@stripped, 2007-05-18 09:57:48+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.4.3.2

  storage/ndb/src/common/transporter/TCP_Transporter.hpp@stripped, 2007-05-18 09:57:48+02:00, jonas@stripped +0 -0
    Merge rename: ndb/src/common/transporter/TCP_Transporter.hpp -> storage/ndb/src/common/transporter/TCP_Transporter.hpp

  storage/ndb/src/common/transporter/TransporterRegistry.cpp@stripped, 2007-05-18 09:57:48+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.52.14.2

  storage/ndb/src/common/transporter/TransporterRegistry.cpp@stripped, 2007-05-18 09:57:48+02:00, jonas@stripped +0 -0
    Merge rename: ndb/src/common/transporter/TransporterRegistry.cpp -> storage/ndb/src/common/transporter/TransporterRegistry.cpp

  storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp@stripped, 2007-05-18 09:57:48+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.18.17.2

  storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp@stripped, 2007-05-18 09:57:48+02:00, jonas@stripped +0 -0
    Merge rename: ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp -> storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp

  storage/ndb/test/ndbapi/testNdbApi.cpp@stripped, 2007-05-18 10:00:07+02:00, jonas@stripped +9 -4
    merge
    MERGE: 1.13.10.2

  storage/ndb/test/ndbapi/testNdbApi.cpp@stripped, 2007-05-18 09:57:48+02:00, jonas@stripped +0 -0
    Merge rename: ndb/test/ndbapi/testNdbApi.cpp -> storage/ndb/test/ndbapi/testNdbApi.cpp

  storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-05-18 10:00:08+02:00, jonas@stripped +4 -4
    merge
    MERGE: 1.27.33.2

  storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-05-18 09:57:48+02:00, jonas@stripped +0 -0
    Merge rename: ndb/test/run-test/daily-basic-tests.txt -> storage/ndb/test/run-test/daily-basic-tests.txt

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/51-telco-gca/RESYNC

--- 1.27.33.1/ndb/test/run-test/daily-basic-tests.txt	2007-05-18 10:00:14 +02:00
+++ 1.74/storage/ndb/test/run-test/daily-basic-tests.txt	2007-05-18 10:00:14 +02:00
@@ -81,23 +81,23 @@
 
 max-time: 500
 cmd: testBasic
-args: -n PkReadAndLocker T6 
+args: -n PkReadAndLocker T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n PkReadAndLocker2 T6 
+args: -n PkReadAndLocker2 T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n PkReadUpdateAndLocker T6 
+args: -n PkReadUpdateAndLocker T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n ReadWithLocksAndInserts T6 
+args: -n ReadWithLocksAndInserts T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n PkInsertTwice T1 T6 T10 
+args: -n PkInsertTwice T1 T6 T10 D1 D2
 
 max-time: 1500
 cmd: testBasic
@@ -109,79 +109,79 @@
 
 max-time: 500
 cmd: testBasic
-args: -n NoCommitSleep T6 
+args: -n NoCommitSleep T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n NoCommit626 T6 
+args: -n NoCommit626 T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n NoCommitAndClose T6 
+args: -n NoCommitAndClose T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n Commit626 T6 
+args: -n Commit626 T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n CommitTry626 T6 
+args: -n CommitTry626 T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n CommitAsMuch626 T6 
+args: -n CommitAsMuch626 T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n NoCommit626 T6 
+args: -n NoCommit626 T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n NoCommitRollback626 T1 T6 
+args: -n NoCommitRollback626 T1 T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n Commit630 T1 T6 
+args: -n Commit630 T1 T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n CommitTry630 T1 T6 
+args: -n CommitTry630 T1 T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n CommitAsMuch630 T1 T6 
+args: -n CommitAsMuch630 T1 T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n NoCommit630 T1 T6 
+args: -n NoCommit630 T1 T6 D1 D2
 
 max-time: 500
 cmd: testBasic
-args: -n NoCommitRollback630 T1 T6 
+args: -n NoCommitRollback630 T1 T6 D1 D2 
 
 max-time: 500
 cmd: testBasic
-args: -n NoCommitAndClose T1 T6 
+args: -n NoCommitAndClose T1 T6 D1 D2 
 
 max-time: 500
 cmd: testBasic
-args: -n RollbackUpdate T1 T6 
+args: -n RollbackUpdate T1 T6 D1 D2 
 
 max-time: 500
 cmd: testBasic
-args: -n RollbackDeleteMultiple T1 T6 
+args: -n RollbackDeleteMultiple T1 T6 D1 D2 
 
 max-time: 500
 cmd: testBasic
-args: -n ImplicitRollbackDelete T1 T6 
+args: -n ImplicitRollbackDelete T1 T6 D1 D2 
 
 max-time: 500
 cmd: testBasic
-args: -n CommitDelete T1 T6 
+args: -n CommitDelete T1 T6 D1 D2 
 
 max-time: 500
 cmd: testBasic
-args: -n RollbackNothing T1 T6 
+args: -n RollbackNothing T1 T6 D1 D2 
 
 max-time: 500
 cmd: testBasicAsynch
@@ -199,13 +199,33 @@
 cmd: testBasicAsynch
 args: -n PkDeleteAsynch 
 
+max-time: 1000
+cmd: testBasic
+args: -n MassiveRollback T1 T7 D1 D2
+
+max-time: 500
+cmd: testBasic
+args: -n MassiveRollback2 T1 T7 D1 D2
+
+max-time: 500
+cmd: testBasic
+args: -n MassiveRollback3 T1 T7 D1 D2
+
+max-time: 500
+cmd: testBasic
+args: -n MassiveRollback4 T1 T7 D1 D2
+
 max-time: 500
 cmd: testBasic
-args: -n MassiveRollback T1 T6 T13 
+args: -n TupError
 
 max-time: 500
 cmd: testBasic
-args: -n MassiveRollback2 T1 T6 T13 
+args: -n InsertError T1
+
+max-time: 500
+cmd: testBasic
+args: -n InsertError2 T1
 
 max-time: 500
 cmd: testTimeout
@@ -215,6 +235,18 @@
 cmd: testBasic
 args: -n Bug25090 T1
 
+max-time: 1000
+cmd: testBasic
+args: -n Bug27756
+
+max-time: 500
+cmd: testBasic
+args: -n Bug28073
+
+max-time: 500
+cmd: testBasic
+args: -n Bug20535
+
 max-time: 500
 cmd: testIndex
 args: -n Bug25059 -r 3000 T1
@@ -239,7 +271,7 @@
 
 max-time: 500
 cmd: testScan
-args: -n ScanUpdate2 T6 
+args: -n ScanUpdate2 T6 D1 D2
 
 max-time: 500
 cmd: testScan
@@ -247,47 +279,51 @@
 
 max-time: 500
 cmd: testScan
-args: -n ScanDelete2 T10 
+args: -n ScanDelete2 T10 D1 D2
 
 max-time: 500
 cmd: testScan
-args: -n ScanUpdateAndScanRead T6 
+args: -n ScanUpdateAndScanRead T6 D1 D2
 
 max-time: 500
 cmd: testScan
-args: -n ScanReadAndLocker T6 
+args: -n ScanReadAndLocker T6 D1 D2
 
 max-time: 500
 cmd: testScan
-args: -n ScanReadAndPkRead T6 
+args: -n ScanReadAndPkRead T6 D1 D2
 
 max-time: 500
 cmd: testScan
-args: -n ScanRead488 -l 10 T6 
+args: -n ScanRead488 -l 10 T6 D1 D2
 
 max-time: 500
 cmd: testScan
-args: -n ScanRead488O -l 10 T6 
+args: -n ScanRead488O -l 10 T6 D1 D2 
 
 max-time: 1000
 cmd: testScan
-args: -n ScanRead488_Mixed -l 10 T6 
+args: -n ScanRead488T -l 10 T6 D1 D2 
+
+max-time: 1000
+cmd: testScan
+args: -n ScanRead488_Mixed -l 10 T6 D1 D2
 
 max-time: 500
 cmd: testScan
-args: -n ScanRead488Timeout -l 10 T6 
+args: -n ScanRead488Timeout -l 10 T6 D1 D2
 
 max-time: 600
 cmd: testScan
-args: -n ScanRead40 -l 100 T2 
+args: -n ScanRead40 -l 100 T2 D1 D2 
 
 max-time: 1800
 cmd: testScan
-args: -n ScanRead100 -l 100 T1 
+args: -n ScanRead100 -l 100 T1 D1 D2 
 
 max-time: 600
 cmd: testScan
-args: -n ScanRead40 -l 100 T1 
+args: -n ScanRead40 -l 100 T1 D1 D2 
 
 max-time: 1800
 cmd: testScan
@@ -299,123 +335,135 @@
 
 max-time: 500
 cmd: testScan
-args: -n ScanWithLocksAndInserts T6 
+args: -n ScanWithLocksAndInserts T6 D1 D2
 
 max-time: 500
 cmd: testScan
-args: -n ScanReadAbort T6 
+args: -n ScanReadAbort T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n ScanReadAbort15 T6 
+args: -n ScanReadAbort15 T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n ScanReadAbort240 T6 
+args: -n ScanReadAbort240 T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n ScanUpdateAbort16 T6 
+args: -n ScanUpdateAbort16 T6 D1 D2 
 
 max-time: 3600
 cmd: testScan
-args: -n ScanReadRestart T1 T6 T13 
+args: -n ScanReadRestart T1 T6 T13
 
-max-time: 500
+max-time: 3600
 cmd: testScan
-args: -n ScanUpdateRestart T6 
+args: -n ScanReadRestart D1 D2
 
-max-time: 500
+max-time: 1200
 cmd: testScan
-args: -n CheckGetValue T6 
+args: -n ScanUpdateRestart T6
+
+max-time: 1200
+cmd: testScan
+args: -n ScanUpdateRestart D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n CloseWithoutStop T6 
+args: -n CheckGetValue T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n NextScanWhenNoMore T6 
+args: -n CloseWithoutStop T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n ExecuteScanWithoutOpenScan T6 
+args: -n NextScanWhenNoMore T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n OnlyOpenScanOnce T6 
+args: -n ExecuteScanWithoutOpenScan T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n OnlyOneOpInScanTrans T6 
+args: -n OnlyOpenScanOnce T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n OnlyOneOpBeforeOpenScan T6 
+args: -n OnlyOneOpInScanTrans T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n OnlyOneScanPerTrans T6 
+args: -n OnlyOneOpBeforeOpenScan T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n NoCloseTransaction T6 
+args: -n OnlyOneScanPerTrans T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n CheckInactivityTimeOut T6 
+args: -n NoCloseTransaction T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n CheckInactivityBeforeClose T6 
+args: -n CheckInactivityTimeOut T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n CheckAfterTerror T6 
+args: -n CheckInactivityBeforeClose T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n ScanReadError5021 T1 
+args: -n CheckAfterTerror T6 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n ScanReaderror5022 T1 
+args: -n ScanReadError5021 T1 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n ScanReadError5023 T1 
+args: -n ScanReaderror5022 T1 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n ScanReadError5024 T1 
+args: -n ScanReadError5023 T1 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n ScanReadError5025 T1 
+args: -n ScanReadError5024 T1 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n ScanReadError5030 T1 
+args: -n ScanReadError5025 T1 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n InsertDelete T1 T6
+args: -n ScanReadError5030 T1 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -n CheckAfterTerror T1
+args: -n InsertDelete T1 T6 D1 D2 
 
 max-time: 500
 cmd: testScan
+args: -n CheckAfterTerror T1 D1 D2 
+
+max-time: 1200
+cmd: testScan
 args: -n ScanReadWhileNodeIsDown T1
 
+max-time: 1200
+cmd: testScan
+args: -n ScanReadWhileNodeIsDown D1 D2 
+
 max-time: 500
 cmd: testScan
-args: -n ScanRestart T1
+args: -n ScanRestart T1 D1 D2 
 
 max-time: 500
 cmd: testScan
-args: -l 100 -n Scan-bug8262 T7
+args: -l 100 -n Scan-bug8262 T7 D1 D2
 
 max-time: 500
 cmd: testScan
@@ -433,6 +481,14 @@
 cmd: testNodeRestart
 args: -n Bug27283 T1
 
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug28023 T7 D2
+
+max-time: 500
+cmd: testScan
+args: -n ScanVariants
+
 max-time: 500
 cmd: testNodeRestart
 args: -n Bug15587 T1
@@ -470,6 +526,10 @@
 args: -n Bug20185 T1
 
 max-time: 1000
+cmd: testNodeRestart
+args: -n Bug21271 T6
+
+max-time: 1000
 cmd: testIndex
 args: -n Bug21384
 
@@ -493,15 +553,6 @@
 cmd: testNodeRestart
 args: -n Bug26481 T1
 
-# OLD FLEX
-max-time: 500
-cmd: flexBench
-args: -c 25 -t 10 
-
-max-time: 500
-cmd: flexHammer
-args: -r 5 -t 32 
-
 #
 # DICT TESTS
 max-time: 1500
@@ -518,7 +569,7 @@
 
 max-time: 1500
 cmd: testDict
-args: -n CreateAndDropDuring T6 T10 
+args: -n CreateAndDropDuring T6 T10 D1 D2
 
 max-time: 1500
 cmd: testDict
@@ -550,7 +601,7 @@
 
 max-time: 1500
 cmd: testDict
-args: -n Restart_NR2 T1
+args: -n Restart_NR2 T1 I3
 
 #
 # TEST NDBAPI
@@ -607,23 +658,31 @@
 
 max-time: 500
 cmd: testNdbApi
-args: -n UpdateWithoutKeys T6 
+args: -n UpdateWithoutKeys T6 D1 D2 
+
+max-time: 500
+cmd: testNdbApi
+args: -n UpdateWithoutValues T6 D1 D2 
+
+max-time: 500
+cmd: testNdbApi
+args: -n ReadWithoutGetValue D1 D2 
 
 max-time: 500
 cmd: testNdbApi
-args: -n UpdateWithoutValues T6 
+args: -n Bug_11133 T1 D1 D2 
 
 max-time: 500
 cmd: testNdbApi
-args: -n ReadWithoutGetValue
+args: -n Scan_4006 T1 D1 D2 
 
 max-time: 500
 cmd: testNdbApi
-args: -n Bug_11133 T1 
+args: -n Bug_WritePartialIgnoreError T1 
 
 max-time: 500
 cmd: testNdbApi
-args: -n Scan_4006 T1
+args: -n ExecuteAsynch T1
 
 max-time: 1000
 cmd: testNdbApi
@@ -645,13 +704,21 @@
 cmd: testRestartGci
 args: T6 
 
-max-time: 600
+max-time: 1500
 cmd: testBlobs
 args:
 
 max-time: 5000
 cmd: testOIBasic
-args: 
+args: -case abcdefz
+
+max-time: 2000
+cmd: testOIBasic
+args: -case gz
+
+max-time: 2000
+cmd: testOIBasic
+args: -case hz
 
 max-time: 2500
 cmd: testBitfield
@@ -683,6 +750,14 @@
 
 max-time: 1500
 cmd: testSystemRestart
+args: -n SR1 D1
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR1 D2 
+
+max-time: 1500
+cmd: testSystemRestart
 args: -n SR2 T1 
 
 max-time: 1500
@@ -695,6 +770,14 @@
 
 max-time: 1500
 cmd: testSystemRestart
+args: -n SR2 D1
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n SR2 D2 
+
+max-time: 1500
+cmd: testSystemRestart
 args: -n SR_UNDO T1 
 
 max-time: 1500
@@ -708,6 +791,38 @@
 max-time: 1500
 cmd: testSystemRestart
 args: -n SR_UNDO T8 
+
+max-time: 1000
+cmd: testSRBank
+args: -n SR -l 300 -r 15 T1
+
+max-time: 1000
+cmd: testSRBank
+args: -n NR -l 300 -r 15 T1
+
+max-time: 1000
+cmd: testSRBank
+args: -n Mix -l 300 -r 15 T1
+
+max-time: 300
+cmd: testNodeRestart
+args: -n Bug24543 T1
+
+max-time: 1500
+cmd: testSystemRestart
+args: -n Bug24664
+
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug25468 T1
+
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug27466 T1
+
+max-time: 1000
+cmd: test_event
+args: -l 10 -n Bug27169 T1
 
 # OLD FLEX
 max-time: 500

--- 1.5.4.1/ndb/src/common/transporter/Packer.cpp	2007-05-18 10:00:14 +02:00
+++ 1.10/storage/ndb/src/common/transporter/Packer.cpp	2007-05-18 10:00:14 +02:00
@@ -2,8 +2,7 @@
 
    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; either version 2 of the License, or
-   (at your option) any later version.
+   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
@@ -218,8 +217,8 @@
 			    Uint32 * eodPtr,
 			    NodeId remoteNodeId,
 			    IOState state) {
-  static SignalHeader signalHeader;
-  static LinearSectionPtr ptr[3];
+  SignalHeader signalHeader;
+  LinearSectionPtr ptr[3];
   Uint32 loop_count = 0;
   if(state == NoHalt || state == HaltOutput){
     while ((readPtr < eodPtr) && (loop_count < MAX_RECEIVED_SIGNALS)) {

--- 1.4.3.1/ndb/src/common/transporter/TCP_Transporter.hpp	2007-05-18 10:00:14 +02:00
+++ 1.9/storage/ndb/src/common/transporter/TCP_Transporter.hpp	2007-05-18 10:00:14 +02:00
@@ -2,8 +2,7 @@
 
    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; either version 2 of the License, or
-   (at your option) any later version.
+   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
@@ -157,10 +156,6 @@
   Uint64 sendSize;
 
   ReceiveBuffer receiveBuffer;
-
-#if defined NDB_OSE || defined NDB_SOFTOSE
-  PROCESS theReceiverPid;
-#endif
 };
 
 inline

--- 1.52.14.1/ndb/src/common/transporter/TransporterRegistry.cpp	2007-05-18 10:00:14 +02:00
+++ 1.69/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2007-05-18 10:00:14 +02:00
@@ -2,8 +2,7 @@
 
    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; either version 2 of the License, or
-   (at your option) any later version.
+   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
@@ -27,11 +26,6 @@
 #include "TCP_Transporter.hpp"
 #endif
 
-#ifdef NDB_OSE_TRANSPORTER
-#include "OSE_Receiver.hpp"
-#include "OSE_Transporter.hpp"
-#endif
-
 #ifdef NDB_SCI_TRANSPORTER
 #include "SCI_Transporter.hpp"
 #endif
@@ -80,21 +74,21 @@
 
 TransporterRegistry::TransporterRegistry(void * callback,
 					 unsigned _maxTransporters,
-					 unsigned sizeOfLongSignalMemory)
+					 unsigned sizeOfLongSignalMemory) :
+  m_mgm_handle(0),
+  m_transp_count(0)
 {
   DBUG_ENTER("TransporterRegistry::TransporterRegistry");
 
   nodeIdSpecified = false;
   maxTransporters = _maxTransporters;
   sendCounter = 1;
-  m_mgm_handle= 0;
   
   callbackObj=callback;
 
   theTCPTransporters  = new TCP_Transporter * [maxTransporters];
   theSCITransporters  = new SCI_Transporter * [maxTransporters];
   theSHMTransporters  = new SHM_Transporter * [maxTransporters];
-  theOSETransporters  = new OSE_Transporter * [maxTransporters];
   theTransporterTypes = new TransporterType   [maxTransporters];
   theTransporters     = new Transporter     * [maxTransporters];
   performStates       = new PerformState      [maxTransporters];
@@ -105,21 +99,16 @@
   nTCPTransporters = 0;
   nSCITransporters = 0;
   nSHMTransporters = 0;
-  nOSETransporters = 0;
   
   // Initialize the transporter arrays
   for (unsigned i=0; i<maxTransporters; i++) {
     theTCPTransporters[i] = NULL;
     theSCITransporters[i] = NULL;
     theSHMTransporters[i] = NULL;
-    theOSETransporters[i] = NULL;
     theTransporters[i]    = NULL;
     performStates[i]      = DISCONNECTED;
     ioStates[i]           = NoHalt;
   }
-  theOSEReceiver = 0;
-  theOSEJunkSocketSend = 0;
-  theOSEJunkSocketRecv = 0;
 
   DBUG_VOID_RETURN;
 }
@@ -154,19 +143,11 @@
   delete[] theTCPTransporters;
   delete[] theSCITransporters;
   delete[] theSHMTransporters;
-  delete[] theOSETransporters;
   delete[] theTransporterTypes;
   delete[] theTransporters;
   delete[] performStates;
   delete[] ioStates;
 
-#ifdef NDB_OSE_TRANSPORTER
-  if(theOSEReceiver != NULL){
-    theOSEReceiver->destroyPhantom();
-    delete theOSEReceiver;
-    theOSEReceiver = 0;
-  }
-#endif
   if (m_mgm_handle)
     ndb_mgm_destroy_handle(&m_mgm_handle);
 
@@ -326,60 +307,6 @@
   nTransporters++;
   nTCPTransporters++;
 
-#if defined NDB_OSE || defined NDB_SOFTOSE
-  t->theReceiverPid = theReceiverPid;
-#endif
-  
-  return true;
-#else
-  return false;
-#endif
-}
-
-bool
-TransporterRegistry::createOSETransporter(TransporterConfiguration *conf) {
-#ifdef NDB_OSE_TRANSPORTER
-
-  if(!nodeIdSpecified){
-    init(conf->localNodeId);
-  }
-  
-  if(conf->localNodeId != localNodeId)
-    return false;
-  
-  if(theTransporters[conf->remoteNodeId] != NULL)
-    return false;
-
-  if(theOSEReceiver == NULL){
-    theOSEReceiver = new OSE_Receiver(this,
-				      10,
-				      localNodeId);
-  }
-  
-  OSE_Transporter * t = new OSE_Transporter(conf->ose.prioASignalSize,
-					    conf->ose.prioBSignalSize,
-					    localNodeId,
-					    conf->localHostName,
-					    conf->remoteNodeId,
-					    conf->serverNodeId,
-					    conf->remoteHostName,
-					    conf->checksum,
-					    conf->signalId);
-  if (t == NULL)
-    return false;
-  else if (!t->initTransporter()) {
-    delete t;
-    return false;
-  }
-  // Put the transporter in the transporter arrays
-  theOSETransporters[nOSETransporters]      = t;
-  theTransporters[t->getRemoteNodeId()]     = t;
-  theTransporterTypes[t->getRemoteNodeId()] = tt_OSE_TRANSPORTER;
-  performStates[t->getRemoteNodeId()]       = DISCONNECTED;
-  
-  nTransporters++;
-  nOSETransporters++;
-
   return true;
 #else
   return false;
@@ -457,10 +384,7 @@
      * Make sure to block g_ndb_shm_signum
      *   TransporterRegistry::init is run from "main" thread
      */
-    sigset_t mask;
-    sigemptyset(&mask);
-    sigaddset(&mask, g_ndb_shm_signum);
-    pthread_sigmask(SIG_BLOCK, &mask, 0);
+    NdbThread_set_shm_sigmask(TRUE);
   }
 
   if(config->shm.signum != g_ndb_shm_signum)
@@ -552,19 +476,8 @@
     nSHMTransporters --;
 #endif
     break;
-  case tt_OSE_TRANSPORTER:
-#ifdef NDB_OSE_TRANSPORTER
-    for(; ind < nOSETransporters; ind++)
-      if(theOSETransporters[ind]->getRemoteNodeId() == nodeId)
-	break;
-    ind++;
-    for(; ind<nOSETransporters; ind++)
-      theOSETransporters[ind-1] = theOSETransporters[ind];
-    nOSETransporters --;
-#endif
-    break;
   }
-  
+
   nTransporters--;
 
   // Delete the transporter and remove it from theTransporters array
@@ -744,12 +657,7 @@
 Uint32
 TransporterRegistry::pollReceive(Uint32 timeOutMillis){
   Uint32 retVal = 0;
-#ifdef NDB_OSE_TRANSPORTER
-  retVal |= poll_OSE(timeOutMillis);
-  retVal |= poll_TCP(0);
-  return retVal;
-#endif
-  
+
   if((nSCITransporters) > 0)
   {
     timeOutMillis=0;
@@ -826,18 +734,6 @@
 }
 #endif
 
-#ifdef NDB_OSE_TRANSPORTER
-Uint32
-TransporterRegistry::poll_OSE(Uint32 timeOutMillis)
-{
-  if(theOSEReceiver != NULL){
-    return theOSEReceiver->doReceive(timeOutMillis);
-  }
-  NdbSleep_MilliSleep(timeOutMillis);
-  return 0;
-}
-#endif
-
 #ifdef NDB_TCP_TRANSPORTER
 Uint32 
 TransporterRegistry::poll_TCP(Uint32 timeOutMillis)
@@ -850,20 +746,8 @@
   }
   
   struct timeval timeout;
-#ifdef NDB_OSE
-  // Return directly if there are no TCP transporters configured
-  
-  if(timeOutMillis <= 1){
-    timeout.tv_sec  = 0;
-    timeout.tv_usec = 1025;
-  } else {
-    timeout.tv_sec  = timeOutMillis / 1000;
-    timeout.tv_usec = (timeOutMillis % 1000) * 1000;
-  }
-#else  
   timeout.tv_sec  = timeOutMillis / 1000;
   timeout.tv_usec = (timeOutMillis % 1000) * 1000;
-#endif
 
   NDB_SOCKET_TYPE maxSocketValue = -1;
   
@@ -895,7 +779,7 @@
   
   tcpReadSelectReply = select(maxSocketValue, &tcpReadset, 0, 0, &timeout);  
   if(false && tcpReadSelectReply == -1 && errno == EINTR)
-    ndbout_c("woke-up by signal");
+    g_eventLogger.info("woke-up by signal");
 
 #ifdef NDB_WIN32
   if(tcpReadSelectReply == SOCKET_ERROR)
@@ -912,33 +796,6 @@
 void
 TransporterRegistry::performReceive()
 {
-#ifdef NDB_OSE_TRANSPORTER
-  if(theOSEReceiver != 0)
-  {
-    while(theOSEReceiver->hasData())
-    {
-      NodeId remoteNodeId;
-      Uint32 * readPtr;
-      Uint32 sz = theOSEReceiver->getReceiveData(&remoteNodeId, &readPtr);
-      transporter_recv_from(callbackObj, remoteNodeId);
-      Uint32 szUsed = unpack(readPtr,
-			     sz,
-			     remoteNodeId,
-			     ioStates[remoteNodeId]);
-#ifdef DEBUG_TRANSPORTER
-      /**
-       * OSE transporter can handle executions of
-       *   half signals
-       */
-      assert(sz == szUsed);
-#endif
-      theOSEReceiver->updateReceiveDataPtr(szUsed);
-      theOSEReceiver->doReceive(0);
-      //      checkJobBuffer();
-    }
-  }
-#endif
-
 #ifdef NDB_TCP_TRANSPORTER
   for (int i=0; i<nTCPTransporters; i++) 
   {
@@ -1007,75 +864,14 @@
 #endif
 }
 
-static int x = 0;
 void
 TransporterRegistry::performSend()
 {
   int i; 
   sendCounter = 1;
-  
-#ifdef NDB_OSE_TRANSPORTER
-  for (int i = 0; i < nOSETransporters; i++)
-  {
-    OSE_Transporter *t = theOSETransporters[i]; 
-    if(is_connected(t->getRemoteNodeId()) &&& (t->isConnected()))
-    {
-      t->doSend();
-    }//if
-  }//for
-#endif
-  
-#ifdef NDB_TCP_TRANSPORTER
-#ifdef NDB_OSE
-  {
-    int maxSocketValue = 0;
-    
-    // Needed for TCP/IP connections
-    // The writeset are used by select
-    fd_set writeset;
-    FD_ZERO(&writeset);
-    
-    // Prepare for sending and receiving
-    for (i = 0; i < nTCPTransporters; i++) {
-      TCP_Transporter * t = theTCPTransporters[i];
-      
-      // If the transporter is connected
-      if ((t->hasDataToSend()) && (t->isConnected())) {
-	const int socket = t->getSocket();
-	// Find the highest socket value. It will be used by select
-	if (socket > maxSocketValue) {
-	  maxSocketValue = socket;
-	}//if
-	FD_SET(socket, &writeset);
-      }//if
-    }//for
-    
-    // The highest socket value plus one
-    if(maxSocketValue == 0)
-      return;
-    
-    maxSocketValue++; 
-    struct timeval timeout = { 0, 1025 };
-    Uint32 tmp = select(maxSocketValue, 0, &writeset, 0, &timeout);
-    
-    if (tmp == 0) 
-    {
-      return;
-    }//if
-    for (i = 0; i < nTCPTransporters; i++) {
-      TCP_Transporter *t = theTCPTransporters[i];
-      const NodeId nodeId = t->getRemoteNodeId();
-      const int socket    = t->getSocket();
-      if(is_connected(nodeId)){
-	  if(t->isConnected() && FD_ISSET(socket, &writeset)) {
-	    t->doSend();
-	  }//if
-	}//if
-      }//for
-    }
-#endif
+
 #ifdef NDB_TCP_TRANSPORTER
-  for (i = x; i < nTCPTransporters; i++) 
+  for (i = m_transp_count; i < nTCPTransporters; i++) 
   {
     TCP_Transporter *t = theTCPTransporters[i];
     if (t && t->hasDataToSend() && t->isConnected() &&
@@ -1084,7 +880,7 @@
       t->doSend();
     }
   }
-  for (i = 0; i < x && i < nTCPTransporters; i++) 
+  for (i = 0; i < m_transp_count && i < nTCPTransporters; i++) 
   {
     TCP_Transporter *t = theTCPTransporters[i];
     if (t && t->hasDataToSend() && t->isConnected() &&
@@ -1093,9 +889,8 @@
       t->doSend();
     }
   }
-  x++;
-  if (x == nTCPTransporters) x = 0;
-#endif
+  m_transp_count++;
+  if (m_transp_count == nTCPTransporters) m_transp_count = 0;
 #endif
 #ifdef NDB_SCI_TRANSPORTER
   //scroll through the SCI transporters, 
@@ -1318,12 +1113,12 @@
 	      }
 	      else if(ndb_mgm_is_connected(m_mgm_handle))
 	      {
-		ndbout_c("Failed to get dynamic port to connect to: %d", res);
+		g_eventLogger.info("Failed to get dynamic port to connect to: %d", res);
 		ndb_mgm_disconnect(m_mgm_handle);
 	      }
 	      else
 	      {
-		ndbout_c("Management server closed connection early. "
+		g_eventLogger.info("Management server closed connection early. "
 			 "It is probably being shut down (or has problems). "
 			 "We will retry the connection.");
 	      }
@@ -1421,7 +1216,7 @@
   DBUG_ENTER("TransporterRegistry::start_service");
   if (m_transporter_interface.size() > 0 && !nodeIdSpecified)
   {
-    ndbout_c("TransporterRegistry::startReceiving: localNodeId not specified");
+    g_eventLogger.error("TransporterRegistry::startReceiving: localNodeId not specified");
     DBUG_RETURN(false);
   }
 
@@ -1447,7 +1242,7 @@
 	 * If it wasn't a dynamically allocated port, or
 	 * our attempts at getting a new dynamic port failed
 	 */
-	ndbout_c("Unable to setup transporter service port: %s:%d!\n"
+	g_eventLogger.error("Unable to setup transporter service port: %s:%d!\n"
 		 "Please check if the port is already used,\n"
 		 "(perhaps the node is already running)",
 		 t.m_interface ? t.m_interface : "*", t.m_s_service_port);
@@ -1475,21 +1270,6 @@
 TransporterRegistry::startReceiving()
 {
   DBUG_ENTER("TransporterRegistry::startReceiving");
-#ifdef NDB_OSE_TRANSPORTER
-  if(theOSEReceiver != NULL){
-    theOSEReceiver->createPhantom();
-  }
-#endif
-
-#ifdef NDB_OSE
-  theOSEJunkSocketRecv = socket(AF_INET, SOCK_STREAM, 0);
-#endif
-
-#if defined NDB_OSE || defined NDB_SOFTOSE
-  theReceiverPid = current_process();
-  for(int i = 0; i<nTCPTransporters; i++)
-    theTCPTransporters[i]->theReceiverPid = theReceiverPid;
-#endif
 
 #ifdef NDB_SHM_TRANSPORTER
   m_shm_own_pid = getpid();
@@ -1498,11 +1278,9 @@
     DBUG_PRINT("info",("Install signal handler for signum %d",
 		       g_ndb_shm_signum));
     struct sigaction sa;
+    NdbThread_set_shm_sigmask(FALSE);
     sigemptyset(&sa.sa_mask);
-    sigaddset(&sa.sa_mask, g_ndb_shm_signum);
-    pthread_sigmask(SIG_UNBLOCK, &sa.sa_mask, 0);
     sa.sa_handler = shm_sig_handler;
-    sigemptyset(&sa.sa_mask);
     sa.sa_flags = 0;
     int ret;
     while((ret = sigaction(g_ndb_shm_signum, &sa, 0)) == -1 && errno == EINTR);
@@ -1520,41 +1298,20 @@
 
 void
 TransporterRegistry::stopReceiving(){
-#ifdef NDB_OSE_TRANSPORTER
-  if(theOSEReceiver != NULL){
-    theOSEReceiver->destroyPhantom();
-  }
-#endif
-
   /**
    * Disconnect all transporters, this includes detach from remote node
    * and since that must be done from the same process that called attach
    * it's done here in the receive thread
    */
   disconnectAll();
-
-#if defined NDB_OSE || defined NDB_SOFTOSE
-  if(theOSEJunkSocketRecv > 0)
-    close(theOSEJunkSocketRecv);
-  theOSEJunkSocketRecv = -1;
-#endif
-
 }
 
 void
 TransporterRegistry::startSending(){
-#if defined NDB_OSE || defined NDB_SOFTOSE
-  theOSEJunkSocketSend = socket(AF_INET, SOCK_STREAM, 0);
-#endif
 }
 
 void
 TransporterRegistry::stopSending(){
-#if defined NDB_OSE || defined NDB_SOFTOSE
-  if(theOSEJunkSocketSend > 0)
-    close(theOSEJunkSocketSend);
-  theOSEJunkSocketSend = -1;
-#endif
 }
 
 NdbOut & operator <<(NdbOut & out, SignalHeader & sh){
@@ -1582,13 +1339,13 @@
 
   if(!mgm_nodeid)
   {
-    ndbout_c("%s: %d", __FILE__, __LINE__);
+    g_eventLogger.error("%s: %d", __FILE__, __LINE__);
     return false;
   }
   Transporter * t = theTransporters[mgm_nodeid];
   if (!t)
   {
-    ndbout_c("%s: %d", __FILE__, __LINE__);
+    g_eventLogger.error("%s: %d", __FILE__, __LINE__);
     return false;
   }
   DBUG_RETURN(t->connect_client(connect_ndb_mgmd(h)));
@@ -1604,7 +1361,7 @@
 
   if ( h==NULL || *h == NULL )
   {
-    ndbout_c("%s: %d", __FILE__, __LINE__);
+    g_eventLogger.error("%s: %d", __FILE__, __LINE__);
     return NDB_INVALID_SOCKET;
   }
 
@@ -1617,10 +1374,10 @@
 				   m_transporter_interface[i].m_s_service_port,
 				   &mgm_reply) < 0)
     {
-      ndbout_c("Error: %s: %d",
+      g_eventLogger.error("Error: %s: %d",
 	       ndb_mgm_get_latest_error_desc(*h),
 	       ndb_mgm_get_latest_error(*h));
-      ndbout_c("%s: %d", __FILE__, __LINE__);
+      g_eventLogger.error("%s: %d", __FILE__, __LINE__);
       ndb_mgm_destroy_handle(h);
       return NDB_INVALID_SOCKET;
     }
@@ -1632,10 +1389,10 @@
   NDB_SOCKET_TYPE sockfd= ndb_mgm_convert_to_transporter(h);
   if ( sockfd == NDB_INVALID_SOCKET)
   {
-    ndbout_c("Error: %s: %d",
+    g_eventLogger.error("Error: %s: %d",
 	     ndb_mgm_get_latest_error_desc(*h),
 	     ndb_mgm_get_latest_error(*h));
-    ndbout_c("%s: %d", __FILE__, __LINE__);
+    g_eventLogger.error("%s: %d", __FILE__, __LINE__);
     ndb_mgm_destroy_handle(h);
   }
   return sockfd;

--- 1.18.17.1/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2007-05-18 10:00:14 +02:00
+++ 1.42/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2007-05-18 10:00:14 +02:00
@@ -2,8 +2,7 @@
 
    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; either version 2 of the License, or
-   (at your option) any later version.
+   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
@@ -47,22 +46,23 @@
 EventLogger g_eventLogger;
 extern int simulate_error_during_shutdown;
 
-Cmvmi::Cmvmi(const Configuration & conf) :
-  SimulatedBlock(CMVMI, conf)
-  ,theConfig((Configuration&)conf)
+Cmvmi::Cmvmi(Block_context& ctx) :
+  SimulatedBlock(CMVMI, ctx)
   ,subscribers(subscriberPool)
 {
   BLOCK_CONSTRUCTOR(Cmvmi);
 
   Uint32 long_sig_buffer_size;
-  const ndb_mgm_configuration_iterator * p = conf.getOwnConfigIterator();
+  const ndb_mgm_configuration_iterator * p = 
+    m_ctx.m_config.getOwnConfigIterator();
   ndbrequire(p != 0);
 
   ndb_mgm_get_int_parameter(p, CFG_DB_LONG_SIGNAL_BUFFER,  
 			    &long_sig_buffer_size);
 
   long_sig_buffer_size= long_sig_buffer_size / 256;
-  g_sectionSegmentPool.setSize(long_sig_buffer_size);
+  g_sectionSegmentPool.setSize(long_sig_buffer_size,
+                               false,true,true,CFG_DB_LONG_SIGNAL_BUFFER);
 
   // Add received signals
   addRecSignal(GSN_CONNECT_REP, &Cmvmi::execCONNECT_REP);
@@ -94,8 +94,8 @@
   addRecSignal(GSN_NODE_START_REP, &Cmvmi::execNODE_START_REP, true);
   
   subscriberPool.setSize(5);
-
-  const ndb_mgm_configuration_iterator * db = theConfig.getOwnConfigIterator();
+  
+  const ndb_mgm_configuration_iterator * db = m_ctx.m_config.getOwnConfigIterator();
   for(unsigned j = 0; j<LogLevel::LOGLEVEL_CATEGORIES; j++){
     Uint32 logLevel;
     if(!ndb_mgm_get_int_parameter(db, CFG_MIN_LOGLEVEL+j, &logLevel)){
@@ -104,7 +104,7 @@
     }
   }
   
-  ndb_mgm_configuration_iterator * iter = theConfig.getClusterConfigIterator();
+  ndb_mgm_configuration_iterator * iter = m_ctx.m_config.getClusterConfigIterator();
   for(ndb_mgm_first(iter); ndb_mgm_valid(iter); ndb_mgm_next(iter)){
     jam();
     Uint32 nodeId;
@@ -119,7 +119,6 @@
       break;
     case NodeInfo::API:
     case NodeInfo::MGM:
-    case NodeInfo::REP:
       break;
     default:
       ndbrequire(false);
@@ -133,6 +132,7 @@
 
 Cmvmi::~Cmvmi()
 {
+  m_shared_page_pool.clear();
 }
 
 #ifdef ERROR_INSERT
@@ -341,9 +341,35 @@
   Uint32 senderData = req->senderData;
 
   const ndb_mgm_configuration_iterator * p = 
-    theConfiguration.getOwnConfigIterator();
+    m_ctx.m_config.getOwnConfigIterator();
   ndbrequire(p != 0);
 
+  Uint64 page_buffer = 64*1024*1024;
+  ndb_mgm_get_int64_parameter(p, CFG_DB_DISK_PAGE_BUFFER_MEMORY, &page_buffer);
+  
+  Uint32 pages = 0;
+  pages += page_buffer / GLOBAL_PAGE_SIZE; // in pages
+  pages += LCP_RESTORE_BUFFER;
+  m_global_page_pool.setSize(pages + 64, true);
+  
+  Uint64 shared_mem = 8*1024*1024;
+  ndb_mgm_get_int64_parameter(p, CFG_DB_SGA, &shared_mem);
+  shared_mem /= GLOBAL_PAGE_SIZE;
+  if (shared_mem)
+  {
+    Resource_limit rl;
+    rl.m_min = 0;
+    rl.m_max = shared_mem;
+    rl.m_resource_id = 0;
+    m_ctx.m_mm.set_resource_limit(rl);
+  }
+  
+  ndbrequire(m_ctx.m_mm.init());
+  {
+    void* ptr = m_ctx.m_mm.get_memroot();
+    m_shared_page_pool.set((GlobalPage*)ptr, ~0);
+  }
+  
   ReadConfigConf * conf = (ReadConfigConf*)signal->getDataPtrSend();
   conf->senderRef = reference();
   conf->senderData = senderData;
@@ -359,7 +385,7 @@
   if (theStartPhase == 1){
     jam();
 
-    if(theConfig.lockPagesInMainMemory() == 1)
+    if(m_ctx.m_config.lockPagesInMainMemory() == 1)
     {
       int res = NdbMem_MemLockAll(0);
       if(res != 0){
@@ -382,10 +408,6 @@
     signal->theData[1] = 0; // no id
     signal->theData[2] = NodeInfo::API;
     execOPEN_COMREQ(signal);
-    signal->theData[0] = 0; // no answer
-    signal->theData[1] = 0; // no id
-    signal->theData[2] = NodeInfo::REP;
-    execOPEN_COMREQ(signal);    
     globalData.theStartLevel = NodeState::SL_STARTED;
     sendSTTORRY(signal);
   }
@@ -573,6 +595,7 @@
       /**
        * Dont allow api nodes to connect
        */
+      ndbout_c("%d %d %d", hostId, type, globalData.theStartLevel);
       abort();
       globalTransporterRegistry.do_disconnect(hostId);
     }
@@ -715,6 +738,7 @@
       // Do nothing
       break;
     }
+    globalSignalLoggers.flushSignalLog();
   }
 
 #endif
@@ -806,7 +830,7 @@
   if(globalData.theStartLevel == NodeState::SL_CMVMI){
     jam();
 
-    if(theConfig.lockPagesInMainMemory() == 2)
+    if(m_ctx.m_config.lockPagesInMainMemory() == 2)
     {
       int res = NdbMem_MemLockAll(1);
       if(res != 0)
@@ -914,7 +938,7 @@
   case TimeToWaitAlive:
 
     // QMGR
+  case HeartbeatIntervalDbDb: // TODO possibly Ndbcnt too
   case HeartbeatIntervalDbApi:
   case ArbitTimeout:
     sendSignal(QMGR_REF, GSN_SET_VAR_REQ, signal, 3, JBB);
@@ -981,7 +1005,7 @@
 
   switch (var) {
   case MaxNoOfSavedMessages:
-    theConfig.maxNoOfErrorLogs(val);
+    m_ctx.m_config.maxNoOfErrorLogs(val);
     sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
     break;
     
@@ -1002,12 +1026,12 @@
     break;
 
   case TimeBetweenWatchDogCheck:
-    theConfig.timeBetweenWatchDogCheck(val);
+    m_ctx.m_config.timeBetweenWatchDogCheck(val);
     sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
     break;
 
   case StopOnError:
-    theConfig.stopOnError(val);
+    m_ctx.m_config.stopOnError(val);
     sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
     break;
     
@@ -1067,6 +1091,9 @@
   sendSignal(SUMA_REF, GSN_DUMP_STATE_ORD,    signal, signal->length(), JBB);
   sendSignal(TRIX_REF, GSN_DUMP_STATE_ORD,    signal, signal->length(), JBB);
   sendSignal(DBTUX_REF, GSN_DUMP_STATE_ORD,   signal, signal->length(), JBB);
+  sendSignal(LGMAN_REF, GSN_DUMP_STATE_ORD,   signal, signal->length(), JBB);
+  sendSignal(TSMAN_REF, GSN_DUMP_STATE_ORD,   signal, signal->length(), JBB);
+  sendSignal(PGMAN_REF, GSN_DUMP_STATE_ORD,   signal, signal->length(), JBB);
   
   /**
    *
@@ -1102,9 +1129,6 @@
       case NodeInfo::MGM:
 	nodeTypeStr = "MGM";
 	break;
-      case NodeInfo::REP:
-	nodeTypeStr = "REP";
-	break;
       case NodeInfo::INVALID:
 	nodeTypeStr = 0;
 	break;
@@ -1122,11 +1146,60 @@
     }
   }
   
+  if (arg == DumpStateOrd::CmvmiDumpSubscriptions)
+  {
+    SubscriberPtr ptr;
+    subscribers.first(ptr);  
+    g_eventLogger.info("List subscriptions:");
+    while(ptr.i != RNIL)
+    {
+      g_eventLogger.info("Subscription: %u, nodeId: %u, ref: 0x%x",
+                         ptr.i,  refToNode(ptr.p->blockRef), ptr.p->blockRef);
+      for(Uint32 i = 0; i < LogLevel::LOGLEVEL_CATEGORIES; i++)
+      {
+        Uint32 level = ptr.p->logLevel.getLogLevel((LogLevel::EventCategory)i);
+        g_eventLogger.info("Category %u Level %u", i, level);
+      }
+      subscribers.next(ptr);
+    }
+  }
+
   if (arg == DumpStateOrd::CmvmiDumpLongSignalMemory){
     infoEvent("Cmvmi: g_sectionSegmentPool size: %d free: %d",
 	      g_sectionSegmentPool.getSize(),
 	      g_sectionSegmentPool.getNoOfFree());
   }
+
+  if (dumpState->args[0] == 1000)
+  {
+    Uint32 len = signal->getLength();
+    if (signal->getLength() == 1)
+    {
+      signal->theData[1] = 0;
+      signal->theData[2] = ~0;
+      sendSignal(reference(), GSN_DUMP_STATE_ORD, signal, 3, JBB);
+      return;
+    }
+    Uint32 id = signal->theData[1];
+    Resource_limit rl;
+    if (!m_ctx.m_mm.get_resource_limit(id, rl))
+      len = 2;
+    else
+    {
+      if (rl.m_min || rl.m_curr || rl.m_max)
+	infoEvent("Resource %d min: %d max: %d curr: %d",
+		  id, rl.m_min, rl.m_max, rl.m_curr);
+    }
+
+    if (len == 3)
+    {
+      signal->theData[0] = 1000;
+      signal->theData[1] = id+1;
+      signal->theData[2] = ~0;
+      sendSignal(reference(), GSN_DUMP_STATE_ORD, signal, 3, JBB);
+    }
+    return;
+  }
   
   if (arg == DumpStateOrd::CmvmiSetRestartOnErrorInsert)
   {
@@ -1134,17 +1207,17 @@
     {
       Uint32 val = (Uint32)NRT_NoStart_Restart;
       const ndb_mgm_configuration_iterator * p = 
-	theConfig.getOwnConfigIterator();
+	m_ctx.m_config.getOwnConfigIterator();
       ndbrequire(p != 0);
       
       if(!ndb_mgm_get_int_parameter(p, CFG_DB_STOP_ON_ERROR_INSERT, &val))
       {
-	theConfig.setRestartOnErrorInsert(val);
+        m_ctx.m_config.setRestartOnErrorInsert(val);
       }
     }
     else
     {
-      theConfig.setRestartOnErrorInsert(signal->theData[1]);
+      m_ctx.m_config.setRestartOnErrorInsert(signal->theData[1]);
     }
   }
 
@@ -1187,13 +1260,16 @@
   if (arg == 9001)
   {
     CLEAR_ERROR_INSERT_VALUE;
-    for (Uint32 i = 0; i<MAX_NODES; i++)
+    if (signal->getLength() == 1 || signal->theData[1])
     {
-      if (c_error_9000_nodes_mask.get(i))
+      for (Uint32 i = 0; i<MAX_NODES; i++)
       {
-	signal->theData[0] = 0;
-	signal->theData[1] = i;
-	EXECUTE_DIRECT(CMVMI, GSN_OPEN_COMREQ, signal, 2);
+	if (c_error_9000_nodes_mask.get(i))
+	{
+	  signal->theData[0] = 0;
+	  signal->theData[1] = i;
+	  EXECUTE_DIRECT(CMVMI, GSN_OPEN_COMREQ, signal, 2);
+	}
       }
     }
     c_error_9000_nodes_mask.clear();

--- 1.13.10.1/ndb/test/ndbapi/testNdbApi.cpp	2007-05-18 10:00:14 +02:00
+++ 1.26/storage/ndb/test/ndbapi/testNdbApi.cpp	2007-05-18 10:00:14 +02:00
@@ -2,8 +2,7 @@
 
    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; either version 2 of the License, or
-   (at your option) any later version.
+   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
@@ -1141,6 +1140,21 @@
   return result;
 }
 
+int runBug_WritePartialIgnoreError(NDBT_Context* ctx, NDBT_Step* step){
+  int result = NDBT_OK;
+  const NdbDictionary::Table* pTab = ctx->getTab();
+
+  HugoOperations hugoOps(*pTab);
+
+  Ndb* pNdb = GETNDB(step);
+  C2(hugoOps.startTransaction(pNdb) == 0);
+  C2(hugoOps.pkWritePartialRecord(pNdb, 0, 1) == 0);
+  C2(hugoOps.execute_Commit(pNdb, AO_IgnoreError) == 839);
+  C2(hugoOps.closeTransaction(pNdb) == 0);
+
+  return result;
+}
+
 int runScan_4006(NDBT_Context* ctx, NDBT_Step* step){
   int result = NDBT_OK;
   const Uint32 max= 5;
@@ -1235,6 +1249,76 @@
   return result;
 }
 
+static void
+testExecuteAsynchCallback(int res, NdbTransaction *con, void *data_ptr)
+{
+  int *res_ptr= (int *)data_ptr;
+
+  *res_ptr= res;
+}
+
+int runTestExecuteAsynch(NDBT_Context* ctx, NDBT_Step* step){
+  /* Test that NdbTransaction::executeAsynch() works (BUG#27495). */
+  int result = NDBT_OK;
+  const NdbDictionary::Table* pTab = ctx->getTab();
+
+  Ndb* pNdb = new Ndb(&ctx->m_cluster_connection, "TEST_DB");
+  if (pNdb == NULL){
+    ndbout << "pNdb == NULL" << endl;      
+    return NDBT_FAILED;  
+  }
+  if (pNdb->init(2048)){
+    ERR(pNdb->getNdbError());
+    delete pNdb;
+    return NDBT_FAILED;
+  }
+
+  NdbConnection* pCon = pNdb->startTransaction();
+  if (pCon == NULL){
+    ERR(pNdb->getNdbError());
+    delete pNdb;
+    return NDBT_FAILED;
+  }
+
+  NdbScanOperation* pOp = pCon->getNdbScanOperation(pTab->getName());
+  if (pOp == NULL){
+    ERR(pOp->getNdbError());
+    pNdb->closeTransaction(pCon);
+    delete pNdb;
+    return NDBT_FAILED;
+  }
+
+  if (pOp->readTuples() != 0){
+    ERR(pOp->getNdbError());
+    pNdb->closeTransaction(pCon);
+    delete pNdb;
+    return NDBT_FAILED;
+  }
+
+  if (pOp->getValue(NdbDictionary::Column::FRAGMENT) == 0){
+    ERR(pOp->getNdbError());
+    pNdb->closeTransaction(pCon);
+    delete pNdb;
+    return NDBT_FAILED;
+  }
+  int res= 42;
+  pCon->executeAsynch(NoCommit, testExecuteAsynchCallback, &res);
+  while(pNdb->pollNdb(100000) == 0)
+    ;
+  if (res != 0){
+    ERR(pCon->getNdbError());
+    ndbout << "Error returned from execute: " << res << endl;
+    result= NDBT_FAILED;
+  }
+
+  pNdb->closeTransaction(pCon);
+
+  delete pNdb;
+
+  return result;
+}
+
+
 template class Vector<NdbScanOperation*>;
 
 int 
@@ -1347,11 +1431,20 @@
   INITIALIZER(runBug_11133);
   FINALIZER(runClearTable);
 }
+TESTCASE("Bug_WritePartialIgnoreError", 
+	 "Test WritePartialIgnoreError\n"){ 
+  INITIALIZER(runBug_WritePartialIgnoreError);
+  FINALIZER(runClearTable);
+}
 TESTCASE("Scan_4006", 
 	 "Check that getNdbScanOperation does not get 4006\n"){ 
   INITIALIZER(runLoadTable);
   INITIALIZER(runScan_4006);
   FINALIZER(runClearTable);
+}
+TESTCASE("ExecuteAsynch", 
+	 "Check that executeAsync() works (BUG#27495)\n"){ 
+  INITIALIZER(runTestExecuteAsynch);
 }
 TESTCASE("Bug28443", 
 	 ""){ 
Thread
bk commit into 5.1 tree (jonas:1.2479)jonas18 May