Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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
1.2397 07/01/23 07:25:24 tomas@stripped +22 -0
Merge poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
into poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
storage/ndb/src/ndbapi/ndberror.c
1.82 07/01/23 07:25:17 tomas@stripped +0 -1
manual merge
mysql-test/t/ndb_basic.test
1.48 07/01/23 07:25:17 tomas@stripped +1 -3
manual merge
mysql-test/r/ndb_basic.result
1.49 07/01/23 07:25:17 tomas@stripped +6 -7
manual merge
storage/ndb/test/run-test/daily-basic-tests.txt
1.63 07/01/23 07:18:03 tomas@stripped +0 -0
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp
1.38 07/01/23 07:18:03 tomas@stripped +0 -0
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp
1.96 07/01/23 07:18:03 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/vm/Configuration.hpp
1.22 07/01/23 07:18:03 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/vm/Configuration.cpp
1.56 07/01/23 07:18:03 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
1.48 07/01/23 07:18:03 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp
1.18 07/01/23 07:18:03 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
1.46 07/01/23 07:18:03 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
1.100 07/01/23 07:18:03 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
1.40 07/01/23 07:18:02 tomas@stripped +0 -0
Auto merged
storage/ndb/src/common/util/File.cpp
1.21 07/01/23 07:18:02 tomas@stripped +0 -0
Auto merged
storage/ndb/src/common/util/ConfigValues.cpp
1.13 07/01/23 07:18:02 tomas@stripped +0 -0
Auto merged
storage/ndb/src/common/portlib/NdbMem.c
1.16 07/01/23 07:18:02 tomas@stripped +0 -0
Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp
1.32 07/01/23 07:18:02 tomas@stripped +0 -0
Auto merged
storage/ndb/include/portlib/NdbMem.h
1.7 07/01/23 07:18:02 tomas@stripped +0 -0
Auto merged
storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp
1.15 07/01/23 07:18:02 tomas@stripped +0 -0
Auto merged
sql/sql_class.cc
1.308 07/01/23 07:18:02 tomas@stripped +0 -0
Auto merged
sql/mysqld.cc
1.606 07/01/23 07:18:02 tomas@stripped +0 -0
Auto merged
storage/ndb/test/run-test/daily-basic-tests.txt
1.27.27.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/test/run-test/daily-basic-tests.txt -> storage/ndb/test/run-test/daily-basic-tests.txt
storage/ndb/test/ndbapi/testNodeRestart.cpp
1.13.16.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/test/ndbapi/testNodeRestart.cpp -> storage/ndb/test/ndbapi/testNodeRestart.cpp
storage/ndb/src/ndbapi/ndberror.c
1.30.37.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/src/ndbapi/ndberror.c -> storage/ndb/src/ndbapi/ndberror.c
storage/ndb/src/mgmsrv/ConfigInfo.cpp
1.60.24.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/src/mgmsrv/ConfigInfo.cpp -> storage/ndb/src/mgmsrv/ConfigInfo.cpp
storage/ndb/src/kernel/vm/Configuration.hpp
1.15.6.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/src/kernel/vm/Configuration.hpp -> storage/ndb/src/kernel/vm/Configuration.hpp
storage/ndb/src/kernel/vm/Configuration.cpp
1.39.13.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/src/kernel/vm/Configuration.cpp -> storage/ndb/src/kernel/vm/Configuration.cpp
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
1.13.27.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/src/kernel/blocks/qmgr/QmgrMain.cpp -> storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
1.26.12.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/src/kernel/blocks/dbtc/Dbtc.hpp -> storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
1.24.64.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/src/kernel/blocks/dbdih/DbdihMain.cpp -> storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
1.18.15.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp -> storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
storage/ndb/src/common/util/File.cpp
1.8.12.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/src/common/util/File.cpp -> storage/ndb/src/common/util/File.cpp
storage/ndb/src/common/util/ConfigValues.cpp
1.8.4.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/src/common/util/ConfigValues.cpp -> storage/ndb/src/common/util/ConfigValues.cpp
storage/ndb/src/common/portlib/NdbMem.c
1.12.3.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/src/common/portlib/NdbMem.c -> storage/ndb/src/common/portlib/NdbMem.c
storage/ndb/src/common/debugger/EventLogger.cpp
1.21.8.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/src/common/debugger/EventLogger.cpp -> storage/ndb/src/common/debugger/EventLogger.cpp
storage/ndb/include/portlib/NdbMem.h
1.3.3.2 07/01/23 07:18:01 tomas@stripped +0 -0
Merge rename: ndb/include/portlib/NdbMem.h -> storage/ndb/include/portlib/NdbMem.h
sql/ha_ndbcluster.cc
1.394 07/01/23 07:18:01 tomas@stripped +6 -16
Auto merged
storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp
1.3.10.2 07/01/23 07:18:00 tomas@stripped +0 -0
Merge rename: ndb/src/kernel/blocks/qmgr/Qmgr.hpp -> storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp
storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp
1.3.8.2 07/01/23 07:18:00 tomas@stripped +0 -0
Merge rename: ndb/include/kernel/signaldata/DumpStateOrd.hpp -> storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp
# 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: tomas
# Host: poseidon.mysql.com
# Root: /home/tomas/mysql-5.1-new-ndb/RESYNC
--- 1.27.27.1/ndb/test/run-test/daily-basic-tests.txt 2007-01-12 03:10:15 +07:00
+++ 1.63/storage/ndb/test/run-test/daily-basic-tests.txt 2007-01-23 07:18:03 +07: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 MassiveRollback T1 T6 T13
+args: -n MassiveRollback4 T1 T7 D1 D2
max-time: 500
cmd: testBasic
-args: -n MassiveRollback2 T1 T6 T13
+args: -n TupError
+
+max-time: 500
+cmd: testBasic
+args: -n InsertError T1
+
+max-time: 500
+cmd: testBasic
+args: -n InsertError2 T1
max-time: 500
cmd: testTimeout
@@ -239,7 +259,7 @@
max-time: 500
cmd: testScan
-args: -n ScanUpdate2 T6
+args: -n ScanUpdate2 T6 D1 D2
max-time: 500
cmd: testScan
@@ -247,47 +267,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 ScanRead488T -l 10 T6 D1 D2
max-time: 1000
cmd: testScan
-args: -n ScanRead488_Mixed -l 10 T6
+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 +323,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
@@ -426,6 +462,10 @@
args: -n Bug24447 T1
max-time: 500
+cmd: testScan
+args: -n ScanVariants
+
+max-time: 500
cmd: testNodeRestart
args: -n Bug15587 T1
@@ -462,6 +502,10 @@
args: -n Bug20185 T1
max-time: 1000
+cmd: testNodeRestart
+args: -n Bug21271 T6
+
+max-time: 1000
cmd: testIndex
args: -n Bug21384
@@ -477,15 +521,6 @@
cmd: testNodeRestart
args: -n Bug25554 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
@@ -502,7 +537,7 @@
max-time: 1500
cmd: testDict
-args: -n CreateAndDropDuring T6 T10
+args: -n CreateAndDropDuring T6 T10 D1 D2
max-time: 1500
cmd: testDict
@@ -591,23 +626,27 @@
max-time: 500
cmd: testNdbApi
-args: -n UpdateWithoutKeys T6
+args: -n UpdateWithoutKeys T6 D1 D2
max-time: 500
cmd: testNdbApi
-args: -n UpdateWithoutValues T6
+args: -n UpdateWithoutValues T6 D1 D2
max-time: 500
cmd: testNdbApi
-args: -n ReadWithoutGetValue
+args: -n ReadWithoutGetValue D1 D2
max-time: 500
cmd: testNdbApi
-args: -n Bug_11133 T1
+args: -n Bug_11133 T1 D1 D2
max-time: 500
cmd: testNdbApi
-args: -n Scan_4006 T1
+args: -n Scan_4006 T1 D1 D2
+
+max-time: 500
+cmd: testNdbApi
+args: -n Bug_WritePartialIgnoreError T1
#max-time: 500
#cmd: testInterpreter
@@ -625,7 +664,7 @@
cmd: testRestartGci
args: T6
-max-time: 600
+max-time: 1500
cmd: testBlobs
args:
@@ -671,6 +710,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
@@ -683,6 +730,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
@@ -696,6 +751,30 @@
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
# OLD FLEX
max-time: 500
--- 1.48/mysql-test/r/ndb_basic.result 2006-12-18 03:08:00 +07:00
+++ 1.49/mysql-test/r/ndb_basic.result 2007-01-23 07:25:17 +07:00
@@ -749,6 +749,21 @@
222222 bbbbbb 2
drop table t1;
Illegal ndb error code: 1186
+CREATE TABLE t1 (
+a VARBINARY(40) NOT NULL,
+b VARCHAR (256) CHARACTER SET UTF8 NOT NULL,
+c VARCHAR(256) CHARACTER SET UTF8 NOT NULL,
+PRIMARY KEY (b,c)) ENGINE=ndbcluster;
+INSERT INTO t1 VALUES
+("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc");
+SELECT * FROM t1 ORDER BY a;
+a b c
+a ab abc
+b abc abcd
+c abc ab
+d ab ab
+e abc abc
+DROP TABLE t1;
End of 5.0 tests
CREATE TABLE t1 (a VARCHAR(255) NOT NULL,
CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb;
--- 1.47/mysql-test/t/ndb_basic.test 2006-12-18 03:08:00 +07:00
+++ 1.48/mysql-test/t/ndb_basic.test 2007-01-23 07:25:17 +07:00
@@ -722,7 +722,24 @@
--error 1
--exec $MY_PERROR --ndb 1186 2>&1
+#
+# Bug #25746 - VARCHAR UTF8 PK issue
+# - prior to bugfix 4209, illegal length parameter would be
+# returned in SELECT *
+
+CREATE TABLE t1 (
+a VARBINARY(40) NOT NULL,
+b VARCHAR (256) CHARACTER SET UTF8 NOT NULL,
+c VARCHAR(256) CHARACTER SET UTF8 NOT NULL,
+PRIMARY KEY (b,c)) ENGINE=ndbcluster;
+INSERT INTO t1 VALUES
+("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc");
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+# End of 5.0 tests
--echo End of 5.0 tests
+
#
# Bug #18483 Cannot create table with FK constraint
--- 1.3.8.1/ndb/include/kernel/signaldata/DumpStateOrd.hpp 2007-01-12 03:12:09 +07:00
+++ 1.15/storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp 2007-01-23 07:18:02 +07:00
@@ -107,6 +107,8 @@
CmvmiDumpLongSignalMemory = 2601,
CmvmiSetRestartOnErrorInsert = 2602,
CmvmiTestLongSigWithDelay = 2603,
+
+ LCPContinue = 5900,
// 7000 DIH
// 7001 DIH
// 7002 DIH
@@ -137,7 +139,11 @@
// 12000 Tux
TuxLogToFile = 12001,
TuxSetLogFlags = 12002,
- TuxMetaDataJunk = 12009
+ TuxMetaDataJunk = 12009,
+
+ DumpTsman = 9800,
+ DumpLgman = 10000,
+ DumpPgman = 11000
};
public:
--- 1.21.8.1/ndb/src/common/debugger/EventLogger.cpp 2007-01-05 21:33:32 +07:00
+++ 1.32/storage/ndb/src/common/debugger/EventLogger.cpp 2007-01-23 07:18:02 +07:00
@@ -15,12 +15,11 @@
#include <ndb_global.h>
-#include "EventLogger.hpp"
+#include <EventLogger.hpp>
#include <NdbConfig.h>
#include <kernel/BlockNumbers.h>
#include <signaldata/ArbitSignalData.hpp>
-#include <GrepEvent.hpp>
#include <NodeState.hpp>
#include <version.h>
@@ -623,6 +622,43 @@
void getTextInfoEvent(QQQQ) {
BaseString::snprintf(m_text, m_text_len, (char *)&theData[1]);
}
+const char bytes_unit[]= "B";
+const char kbytes_unit[]= "KB";
+const char mbytes_unit[]= "MB";
+static void convert_unit(unsigned &data, const char *&unit)
+{
+ if (data < 16*1024)
+ {
+ unit= bytes_unit;
+ return;
+ }
+ if (data < 16*1024*1024)
+ {
+ data= (data+1023)/1024;
+ unit= kbytes_unit;
+ return;
+ }
+ data= (data+1024*1024-1)/(1024*1024);
+ unit= mbytes_unit;
+}
+
+void getTextEventBufferStatus(QQQQ) {
+ unsigned used= theData[1], alloc= theData[2], max_= theData[3];
+ const char *used_unit, *alloc_unit, *max_unit;
+ convert_unit(used, used_unit);
+ convert_unit(alloc, alloc_unit);
+ convert_unit(max_, max_unit);
+ BaseString::snprintf(m_text, m_text_len,
+ "Event buffer status: used=%d%s(%d%) alloc=%d%s(%d%) "
+ "max=%d%s apply_gci=%lld latest_gci=%lld",
+ used, used_unit,
+ theData[2] ? (theData[1]*100)/theData[2] : 0,
+ alloc, alloc_unit,
+ theData[3] ? (theData[2]*100)/theData[3] : 0,
+ max_, max_unit,
+ theData[4]+(((Uint64)theData[5])<<32),
+ theData[6]+(((Uint64)theData[7])<<32));
+}
void getTextWarningEvent(QQQQ) {
BaseString::snprintf(m_text, m_text_len, (char *)&theData[1]);
}
@@ -875,6 +911,7 @@
ROW(SentHeartbeat, LogLevel::llInfo, 12, Logger::LL_INFO ),
ROW(CreateLogBytes, LogLevel::llInfo, 11, Logger::LL_INFO ),
ROW(InfoEvent, LogLevel::llInfo, 2, Logger::LL_INFO ),
+ ROW(EventBufferStatus, LogLevel::llInfo, 7, Logger::LL_INFO ),
//Single User
ROW(SingleUser, LogLevel::llInfo, 7, Logger::LL_INFO ),
@@ -966,6 +1003,7 @@
Logger::LoggerLevel severity = Logger::LL_WARNING;
LogLevel::EventCategory cat= LogLevel::llInvalid;
EventTextFunction textF;
+ char log_text[MAX_TEXT_LENGTH];
DBUG_ENTER("EventLogger::log");
DBUG_PRINT("enter",("eventType=%d, nodeid=%d", eventType, nodeId));
@@ -979,29 +1017,29 @@
DBUG_PRINT("info",("m_logLevel.getLogLevel=%d", m_logLevel.getLogLevel(cat)));
if (threshold <= set){
- getText(m_text,sizeof(m_text),textF,theData,nodeId);
+ getText(log_text,sizeof(log_text),textF,theData,nodeId);
switch (severity){
case Logger::LL_ALERT:
- alert(m_text);
+ alert(log_text);
break;
case Logger::LL_CRITICAL:
- critical(m_text);
+ critical(log_text);
break;
case Logger::LL_WARNING:
- warning(m_text);
+ warning(log_text);
break;
case Logger::LL_ERROR:
- error(m_text);
+ error(log_text);
break;
case Logger::LL_INFO:
- info(m_text);
+ info(log_text);
break;
case Logger::LL_DEBUG:
- debug(m_text);
+ debug(log_text);
break;
default:
- info(m_text);
+ info(log_text);
break;
}
} // if (..
@@ -1019,7 +1057,3 @@
{
m_filterLevel = filterLevel;
}
-
-//
-// PRIVATE
-//
--- 1.60.24.1/ndb/src/mgmsrv/ConfigInfo.cpp 2007-01-18 03:18:46 +07:00
+++ 1.96/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2007-01-23 07:18:03 +07:00
@@ -65,8 +65,7 @@
"TCP",
"SCI",
- "SHM",
- "OSE"
+ "SHM"
};
const int ConfigInfo::m_noOfSectionNames =
sizeof(m_sectionNames)/sizeof(char*);
@@ -111,12 +110,10 @@
{ "TCP", checkConnectionSupport, 0 },
{ "SHM", checkConnectionSupport, 0 },
{ "SCI", checkConnectionSupport, 0 },
- { "OSE", checkConnectionSupport, 0 },
{ "TCP", transformConnection, 0 },
{ "SHM", transformConnection, 0 },
{ "SCI", transformConnection, 0 },
- { "OSE", transformConnection, 0 },
{ DB_TOKEN, fixNodeHostname, 0 },
{ API_TOKEN, fixNodeHostname, 0 },
@@ -128,9 +125,7 @@
{ "SHM", fixNodeId, "NodeId2" },
{ "SCI", fixNodeId, "NodeId1" },
{ "SCI", fixNodeId, "NodeId2" },
- { "OSE", fixNodeId, "NodeId1" },
- { "OSE", fixNodeId, "NodeId2" },
-
+
{ "TCP", fixHostname, "HostName1" },
{ "TCP", fixHostname, "HostName2" },
{ "SHM", fixHostname, "HostName1" },
@@ -139,8 +134,6 @@
{ "SCI", fixHostname, "HostName2" },
{ "SHM", fixHostname, "HostName1" },
{ "SHM", fixHostname, "HostName2" },
- { "OSE", fixHostname, "HostName1" },
- { "OSE", fixHostname, "HostName2" },
{ "TCP", fixPortNumber, 0 }, // has to come after fixHostName
{ "SHM", fixPortNumber, 0 }, // has to come after fixHostName
@@ -164,7 +157,6 @@
{ "TCP", checkConnectionConstraints, 0 },
{ "SHM", checkConnectionConstraints, 0 },
{ "SCI", checkConnectionConstraints, 0 },
- { "OSE", checkConnectionConstraints, 0 },
{ "TCP", checkTCPConstraints, "HostName1" },
{ "TCP", checkTCPConstraints, "HostName2" },
@@ -181,8 +173,7 @@
{ "TCP", saveInConfigValues, 0 },
{ "SHM", saveInConfigValues, 0 },
- { "SCI", saveInConfigValues, 0 },
- { "OSE", saveInConfigValues, 0 }
+ { "SCI", saveInConfigValues, 0 }
};
const int ConfigInfo::m_NoOfRules = sizeof(m_SectionRules)/sizeof(SectionRule);
@@ -761,6 +752,30 @@
STR_VALUE(MAX_INT_RNIL)},
{
+ CFG_DB_DISK_PAGE_BUFFER_MEMORY,
+ "DiskPageBufferMemory",
+ DB_TOKEN,
+ "Number bytes on each "DB_TOKEN_PRINT" node allocated for disk page buffer cache",
+ ConfigInfo::CI_USED,
+ false,
+ ConfigInfo::CI_INT64,
+ "64M",
+ "4M",
+ "1024G" },
+
+ {
+ CFG_DB_SGA,
+ "SharedGlobalMemory",
+ DB_TOKEN,
+ "Total number bytes on each "DB_TOKEN_PRINT" node allocated for any use",
+ ConfigInfo::CI_USED,
+ false,
+ ConfigInfo::CI_INT64,
+ "20M",
+ "0",
+ "65536G" }, // 32k pages * 32-bit i value
+
+ {
CFG_DB_START_PARTIAL_TIMEOUT,
"StartPartialTimeout",
DB_TOKEN,
@@ -852,7 +867,7 @@
ConfigInfo::CI_USED,
false,
ConfigInfo::CI_INT,
- "8",
+ "16",
"3",
STR_VALUE(MAX_INT_RNIL) },
@@ -869,6 +884,18 @@
STR_VALUE(MAX_INT_RNIL) },
{
+ CFG_DB_INITIAL_OPEN_FILES,
+ "InitialNoOfOpenFiles",
+ DB_TOKEN,
+ "Initial number of files open per "DB_TOKEN_PRINT" node.(One thread is created per file)",
+ ConfigInfo::CI_USED,
+ false,
+ ConfigInfo::CI_INT,
+ "27",
+ "20",
+ STR_VALUE(MAX_INT_RNIL) },
+
+ {
CFG_DB_TRANSACTION_CHECK_INTERVAL,
"TimeBetweenInactiveTransactionAbortCheck",
DB_TOKEN,
@@ -915,8 +942,8 @@
CFG_DB_LCP_DISC_PAGES_TUP_SR,
"NoOfDiskPagesToDiskDuringRestartTUP",
DB_TOKEN,
- "?",
- ConfigInfo::CI_USED,
+ "DiskCheckpointSpeedSr",
+ ConfigInfo::CI_DEPRICATED,
true,
ConfigInfo::CI_INT,
"40",
@@ -927,8 +954,8 @@
CFG_DB_LCP_DISC_PAGES_TUP,
"NoOfDiskPagesToDiskAfterRestartTUP",
DB_TOKEN,
- "?",
- ConfigInfo::CI_USED,
+ "DiskCheckpointSpeed",
+ ConfigInfo::CI_DEPRICATED,
true,
ConfigInfo::CI_INT,
"40",
@@ -939,8 +966,8 @@
CFG_DB_LCP_DISC_PAGES_ACC_SR,
"NoOfDiskPagesToDiskDuringRestartACC",
DB_TOKEN,
- "?",
- ConfigInfo::CI_USED,
+ "DiskCheckpointSpeedSr",
+ ConfigInfo::CI_DEPRICATED,
true,
ConfigInfo::CI_INT,
"20",
@@ -951,8 +978,8 @@
CFG_DB_LCP_DISC_PAGES_ACC,
"NoOfDiskPagesToDiskAfterRestartACC",
DB_TOKEN,
- "?",
- ConfigInfo::CI_USED,
+ "DiskCheckpointSpeed",
+ ConfigInfo::CI_DEPRICATED,
true,
ConfigInfo::CI_INT,
"20",
@@ -1155,6 +1182,42 @@
0, 0 },
{
+ CFG_DB_DISK_SYNCH_SIZE,
+ "DiskSyncSize",
+ DB_TOKEN,
+ "Data written to a file before a synch is forced",
+ ConfigInfo::CI_USED,
+ false,
+ ConfigInfo::CI_INT,
+ "4M",
+ "32k",
+ STR_VALUE(MAX_INT_RNIL) },
+
+ {
+ CFG_DB_CHECKPOINT_SPEED,
+ "DiskCheckpointSpeed",
+ DB_TOKEN,
+ "Bytes per second allowed to be written by checkpoint",
+ ConfigInfo::CI_USED,
+ false,
+ ConfigInfo::CI_INT,
+ "10M",
+ "1M",
+ STR_VALUE(MAX_INT_RNIL) },
+
+ {
+ CFG_DB_CHECKPOINT_SPEED_SR,
+ "DiskCheckpointSpeedInRestart",
+ DB_TOKEN,
+ "Bytes per second allowed to be written by checkpoint during restart",
+ ConfigInfo::CI_USED,
+ false,
+ ConfigInfo::CI_INT,
+ "100M",
+ "1M",
+ STR_VALUE(MAX_INT_RNIL) },
+
+ {
CFG_DB_BACKUP_MEM,
"BackupMemory",
DB_TOKEN,
@@ -1214,6 +1277,30 @@
"2K",
STR_VALUE(MAX_INT_RNIL) },
+ {
+ CFG_DB_STRING_MEMORY,
+ "StringMemory",
+ DB_TOKEN,
+ "Default size of string memory (0 -> 5% of max 1-100 -> %of max, >100 -> actual bytes)",
+ ConfigInfo::CI_USED,
+ false,
+ ConfigInfo::CI_INT,
+ "0",
+ "0",
+ STR_VALUE(MAX_INT_RNIL) },
+
+ {
+ CFG_DB_MEMREPORT_FREQUENCY,
+ "MemReportFrequency",
+ DB_TOKEN,
+ "Frequency of mem reports in seconds, 0 = only when passing %-limits",
+ ConfigInfo::CI_USED,
+ false,
+ ConfigInfo::CI_INT,
+ "0",
+ "0",
+ STR_VALUE(MAX_INT_RNIL) },
+
/***************************************************************************
* API
***************************************************************************/
@@ -2062,150 +2149,7 @@
false,
ConfigInfo::CI_STRING,
UNDEFINED,
- 0, 0 },
-
- /****************************************************************************
- * OSE
- ***************************************************************************/
- {
- CFG_SECTION_CONNECTION,
- "OSE",
- "OSE",
- "Connection section",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_SECTION,
- (const char *)CONNECTION_TYPE_OSE,
- 0, 0
- },
-
- {
- CFG_CONNECTION_HOSTNAME_1,
- "HostName1",
- "OSE",
- "Name of computer on one side of the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_HOSTNAME_2,
- "HostName2",
- "OSE",
- "Name of computer on one side of the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_NODE_1,
- "NodeId1",
- "OSE",
- "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_CONNECTION_NODE_2,
- "NodeId2",
- "OSE",
- "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- UNDEFINED,
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_CONNECTION_SEND_SIGNAL_ID,
- "SendSignalId",
- "OSE",
- "Sends id in each signal. Used in trace files.",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_BOOL,
- "true",
- "false",
- "true" },
-
- {
- CFG_CONNECTION_CHECKSUM,
- "Checksum",
- "OSE",
- "If checksum is enabled, all signals between nodes are checked for errors",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_BOOL,
- "false",
- "false",
- "true" },
-
- {
- CFG_OSE_PRIO_A_SIZE,
- "PrioASignalSize",
- "OSE",
- "Size of priority A signals (in bytes)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "1000",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_OSE_PRIO_B_SIZE,
- "PrioBSignalSize",
- "OSE",
- "Size of priority B signals (in bytes)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "1000",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_OSE_RECEIVE_ARRAY_SIZE,
- "ReceiveArraySize",
- "OSE",
- "Number of OSE signals checked for correct ordering (in no of OSE signals)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- "10",
- "0",
- STR_VALUE(MAX_INT_RNIL) },
-
- {
- CFG_CONNECTION_NODE_1_SYSTEM,
- "NodeId1_System",
- "OSE",
- "System for node 1 in connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_CONNECTION_NODE_2_SYSTEM,
- "NodeId2_System",
- "OSE",
- "System for node 2 in connection",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
+ 0, 0 }
};
const int ConfigInfo::m_NoOfParams = sizeof(m_ParamInfo) / sizeof(ParamInfo);
@@ -2750,12 +2694,7 @@
error= 1;
#endif
}
- else if (strcasecmp("OSE",ctx.fname) == 0)
- {
-#ifndef NDB_OSE_TRANSPORTER
- error= 1;
-#endif
- }
+
if (error)
{
ctx.reportError("Binary not compiled with this connection support, "
@@ -3222,7 +3161,31 @@
} else {
ctx.m_userProperties.put("NoOfReplicas", replicas);
}
-
+
+ /**
+ * In kernel, will calculate the MaxNoOfMeataTables use the following sum:
+ * Uint32 noOfMetaTables = noOfTables + noOfOrderedIndexes +
+ * noOfUniqueHashIndexes + 2
+ * 2 is the number of the SysTables.
+ * So must check that the sum does't exceed the max value of Uint32.
+ */
+ Uint32 noOfTables = 0,
+ noOfOrderedIndexes = 0,
+ noOfUniqueHashIndexes = 0;
+ ctx.m_currentSection->get("MaxNoOfTables", &noOfTables);
+ ctx.m_currentSection->get("MaxNoOfOrderedIndexes", &noOfOrderedIndexes);
+ ctx.m_currentSection->get("MaxNoOfUniqueHashIndexes", &noOfUniqueHashIndexes);
+
+ Uint64 sum= (Uint64)noOfTables + noOfOrderedIndexes + noOfUniqueHashIndexes;
+
+ if (sum > ((Uint32)~0 - 2)) {
+ ctx.reportError("The sum of MaxNoOfTables, MaxNoOfOrderedIndexes and"
+ " MaxNoOfUniqueHashIndexes must not exceed %u - [%s]"
+ " starting at line: %d",
+ ((Uint32)~0 - 2), ctx.fname, ctx.m_sectionLineno);
+ return false;
+ }
+
return true;
}
--- 1.8.12.1/ndb/src/common/util/File.cpp 2007-01-10 00:26:24 +07:00
+++ 1.21/storage/ndb/src/common/util/File.cpp 2007-01-23 07:18:02 +07:00
@@ -50,7 +50,7 @@
MY_STAT s;
// Note that my_fstat behaves *differently* than my_stat. ARGGGHH!
- if(my_fstat(::fileno(f), &s, MYF(0)))
+ if (my_fstat(fileno(f), &s, MYF(0)))
return 0;
return s.st_size;
@@ -136,7 +136,7 @@
else {
rc = false;
ndbout_c("ERROR: Close file error in File.cpp for %s",strerror(errno));
- }
+ }
}
m_file = NULL;
@@ -194,10 +194,5 @@
int
File_class::flush() const
{
-#if defined NDB_OSE || defined NDB_SOFTOSE
- ::fflush(m_file);
- return ::fsync(::fileno(m_file));
-#else
return ::fflush(m_file);;
-#endif
}
--- 1.18.15.1/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp 2007-01-18 03:18:46 +07:00
+++ 1.40/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp 2007-01-23 07:18:02 +07:00
@@ -46,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);
@@ -93,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)){
@@ -103,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;
@@ -118,7 +119,6 @@
break;
case NodeInfo::API:
case NodeInfo::MGM:
- case NodeInfo::REP:
break;
default:
ndbrequire(false);
@@ -132,6 +132,7 @@
Cmvmi::~Cmvmi()
{
+ m_shared_page_pool.clear();
}
#ifdef ERROR_INSERT
@@ -323,9 +324,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;
@@ -341,7 +368,7 @@
if (theStartPhase == 1){
jam();
- if(theConfig.lockPagesInMainMemory() == 1)
+ if(m_ctx.m_config.lockPagesInMainMemory() == 1)
{
int res = NdbMem_MemLockAll(0);
if(res != 0){
@@ -364,10 +391,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);
}
@@ -555,6 +578,7 @@
/**
* Dont allow api nodes to connect
*/
+ ndbout_c("%d %d %d", hostId, type, globalData.theStartLevel);
abort();
globalTransporterRegistry.do_disconnect(hostId);
}
@@ -789,7 +813,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)
@@ -964,7 +988,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;
@@ -985,12 +1009,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;
@@ -1050,6 +1074,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);
/**
*
@@ -1085,9 +1112,6 @@
case NodeInfo::MGM:
nodeTypeStr = "MGM";
break;
- case NodeInfo::REP:
- nodeTypeStr = "REP";
- break;
case NodeInfo::INVALID:
nodeTypeStr = 0;
break;
@@ -1110,6 +1134,37 @@
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)
{
@@ -1117,17 +1172,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]);
}
}
@@ -1170,13 +1225,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();
@@ -1261,7 +1319,7 @@
fprintf(stdout, "\n");
for(i = 0; i<signal->header.m_noOfSections; i++){
- SegmentedSectionPtr ptr = {0,0,0};
+ SegmentedSectionPtr ptr;
ndbout_c("-- Section %d --", i);
signal->getSection(ptr, i);
ndbrequire(ptr.p != 0);
@@ -1319,7 +1377,7 @@
LinearSectionPtr ptr[3];
const Uint32 secs = signal->getNoOfSections();
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr = {0,0,0};
+ SegmentedSectionPtr sptr;
signal->getSection(sptr, i);
ptr[i].sz = sptr.sz;
ptr[i].p = new Uint32[sptr.sz];
@@ -1368,7 +1426,7 @@
LinearSectionPtr ptr[3];
const Uint32 secs = signal->getNoOfSections();
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr = {0,0,0};
+ SegmentedSectionPtr sptr;
signal->getSection(sptr, i);
ptr[i].sz = sptr.sz;
ptr[i].p = new Uint32[sptr.sz];
@@ -1434,7 +1492,7 @@
const Uint32 secs = signal->getNoOfSections();
memset(g_test, 0, sizeof(g_test));
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr = {0,0,0};
+ SegmentedSectionPtr sptr;
signal->getSection(sptr, i);
g_test[i].sz = sptr.sz;
g_test[i].p = new Uint32[sptr.sz];
--- 1.24.64.1/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-01-12 03:12:09 +07:00
+++ 1.100/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-01-23 07:18:03 +07:00
@@ -66,6 +66,7 @@
#include <signaldata/CreateFragmentation.hpp>
#include <signaldata/LqhFrag.hpp>
#include <signaldata/FsOpenReq.hpp>
+#include <signaldata/DihFragCount.hpp>
#include <signaldata/DictLock.hpp>
#include <DebuggerNames.hpp>
@@ -609,6 +610,14 @@
checkWaitDropTabFailedLqh(signal, nodeId, tableId);
return;
}
+ case DihContinueB::ZTO_START_FRAGMENTS:
+ {
+ TakeOverRecordPtr takeOverPtr;
+ takeOverPtr.i = signal->theData[1];
+ ptrCheckGuard(takeOverPtr, MAX_NDB_NODES, takeOverRecord);
+ nr_start_fragments(signal, takeOverPtr);
+ return;
+ }
}//switch
ndbrequire(false);
@@ -665,7 +674,9 @@
if (cmasterdihref != reference())
{
jam();
+ Uint32 tmp= SYSFILE->m_restart_seq;
memcpy(sysfileData, cdata, sizeof(sysfileData));
+ SYSFILE->m_restart_seq = tmp;
}
c_copyGCISlave.m_copyReason = reason;
@@ -1078,7 +1089,7 @@
jamEntry();
const ndb_mgm_configuration_iterator * p =
- theConfiguration.getOwnConfigIterator();
+ m_ctx.m_config.getOwnConfigIterator();
ndbrequireErr(p != 0, NDBD_EXIT_INVALID_CONFIG);
initData();
@@ -1121,6 +1132,26 @@
return;
}//Dbdih::execSTART_FRAGCONF()
+void Dbdih::execSTART_FRAGREF(Signal* signal)
+{
+ jamEntry();
+
+ /**
+ * Kill starting node
+ */
+ Uint32 errCode = signal->theData[1];
+ Uint32 nodeId = signal->theData[2];
+
+ SystemError * const sysErr = (SystemError*)&signal->theData[0];
+ sysErr->errorCode = SystemError::StartFragRefError;
+ sysErr->errorRef = reference();
+ sysErr->data1 = errCode;
+ sysErr->data2 = 0;
+ sendSignal(calcNdbCntrBlockRef(nodeId), GSN_SYSTEM_ERROR, signal,
+ SystemError::SignalLength, JBB);
+ return;
+}//Dbdih::execSTART_FRAGCONF()
+
void Dbdih::execSTART_MEREF(Signal* signal)
{
jamEntry();
@@ -1164,7 +1195,7 @@
{
jamEntry();
cntrlblockref = signal->theData[0];
- if(theConfiguration.getInitialStart()){
+ if(m_ctx.m_config.getInitialStart()){
sendSignal(cntrlblockref, GSN_DIH_RESTARTREF, signal, 1, JBB);
} else {
readGciFileLab(signal);
@@ -1733,12 +1764,15 @@
*
* But dont copy lastCompletedGCI:s
*/
+ Uint32 key = SYSFILE->m_restart_seq;
Uint32 tempGCP[MAX_NDB_NODES];
for(i = 0; i < MAX_NDB_NODES; i++)
tempGCP[i] = SYSFILE->lastCompletedGCI[i];
for(i = 0; i < Sysfile::SYSFILE_SIZE32; i++)
sysfileData[i] = cdata[i];
+
+ SYSFILE->m_restart_seq = key;
for(i = 0; i < MAX_NDB_NODES; i++)
SYSFILE->lastCompletedGCI[i] = tempGCP[i];
@@ -1896,11 +1930,6 @@
ndbrequire(c_nodeStartMaster.startNode == Tnodeid);
ndbrequire(getNodeStatus(Tnodeid) == NodeRecord::STARTING);
- sendSTART_RECREQ(signal, Tnodeid);
-}//Dbdih::execSTART_MEREQ()
-
-void Dbdih::nodeRestartStartRecConfLab(Signal* signal)
-{
c_nodeStartMaster.blockLcp = true;
if ((c_lcpState.lcpStatus != LCP_STATUS_IDLE) &&
(c_lcpState.lcpStatus != LCP_TCGET)) {
@@ -2047,6 +2076,9 @@
signal->theData[0] = reference();
signal->theData[1] = c_nodeStartSlave.nodeId;
sendSignal(BACKUP_REF, GSN_INCL_NODEREQ, signal, 2, JBB);
+
+ // Suma will not send response to this for now, later...
+ sendSignal(SUMA_REF, GSN_INCL_NODEREQ, signal, 2, JBB);
return;
}//if
if (TstartNode_or_blockref == numberToRef(BACKUP, getOwnNodeId())){
@@ -2723,13 +2755,14 @@
return;
}//if
c_startToLock = takeOverPtrI;
+
+ takeOverPtr.p->toMasterStatus = TakeOverRecord::STARTING;
StartToReq * const req = (StartToReq *)&signal->theData[0];
req->userPtr = takeOverPtr.i;
req->userRef = reference();
req->startingNodeId = takeOverPtr.p->toStartingNode;
req->nodeTakenOver = takeOverPtr.p->toFailedNode;
req->nodeRestart = takeOverPtr.p->toNodeRestart;
- takeOverPtr.p->toMasterStatus = TakeOverRecord::STARTING;
sendLoopMacro(START_TOREQ, sendSTART_TOREQ);
}//Dbdih::sendStartTo()
@@ -2773,9 +2806,166 @@
CRASH_INSERTION(7134);
c_startToLock = RNIL;
+ if (takeOverPtr.p->toNodeRestart)
+ {
+ jam();
+ takeOverPtr.p->toMasterStatus = TakeOverRecord::STARTING_LOCAL_FRAGMENTS;
+ nr_start_fragments(signal, takeOverPtr);
+ return;
+ }
+
startNextCopyFragment(signal, takeOverPtr.i);
}//Dbdih::execSTART_TOCONF()
+void
+Dbdih::nr_start_fragments(Signal* signal,
+ TakeOverRecordPtr takeOverPtr)
+{
+ Uint32 loopCount = 0 ;
+ TabRecordPtr tabPtr;
+ while (loopCount++ < 100) {
+ tabPtr.i = takeOverPtr.p->toCurrentTabref;
+ if (tabPtr.i >= ctabFileSize) {
+ jam();
+ nr_run_redo(signal, takeOverPtr);
+ return;
+ }//if
+ ptrAss(tabPtr, tabRecord);
+ if (tabPtr.p->tabStatus != TabRecord::TS_ACTIVE ||
+ tabPtr.p->tabStorage != TabRecord::ST_NORMAL)
+ {
+ jam();
+ takeOverPtr.p->toCurrentFragid = 0;
+ takeOverPtr.p->toCurrentTabref++;
+ continue;
+ }//if
+ Uint32 fragId = takeOverPtr.p->toCurrentFragid;
+ if (fragId >= tabPtr.p->totalfragments) {
+ jam();
+ takeOverPtr.p->toCurrentFragid = 0;
+ takeOverPtr.p->toCurrentTabref++;
+ continue;
+ }//if
+ FragmentstorePtr fragPtr;
+ getFragstore(tabPtr.p, fragId, fragPtr);
+ ReplicaRecordPtr loopReplicaPtr;
+ loopReplicaPtr.i = fragPtr.p->oldStoredReplicas;
+ while (loopReplicaPtr.i != RNIL) {
+ ptrCheckGuard(loopReplicaPtr, creplicaFileSize, replicaRecord);
+ if (loopReplicaPtr.p->procNode == takeOverPtr.p->toStartingNode) {
+ jam();
+ nr_start_fragment(signal, takeOverPtr, loopReplicaPtr);
+ break;
+ } else {
+ jam();
+ loopReplicaPtr.i = loopReplicaPtr.p->nextReplica;
+ }//if
+ }//while
+ takeOverPtr.p->toCurrentFragid++;
+ }//while
+ signal->theData[0] = DihContinueB::ZTO_START_FRAGMENTS;
+ signal->theData[1] = takeOverPtr.i;
+ sendSignal(reference(), GSN_CONTINUEB, signal, 2, JBB);
+}
+
+void
+Dbdih::nr_start_fragment(Signal* signal,
+ TakeOverRecordPtr takeOverPtr,
+ ReplicaRecordPtr replicaPtr)
+{
+ Uint32 i, j = 0;
+ Uint32 maxLcpId = 0;
+ Uint32 maxLcpIndex = ~0;
+
+ Uint32 restorableGCI = 0;
+
+ ndbout_c("tab: %d frag: %d replicaP->nextLcp: %d",
+ takeOverPtr.p->toCurrentTabref,
+ takeOverPtr.p->toCurrentFragid,
+ replicaPtr.p->nextLcp);
+
+ Uint32 idx = replicaPtr.p->nextLcp;
+ for(i = 0; i<MAX_LCP_STORED; i++, idx = nextLcpNo(idx))
+ {
+ ndbout_c("scanning idx: %d lcpId: %d", idx, replicaPtr.p->lcpId[idx]);
+ if (replicaPtr.p->lcpStatus[idx] == ZVALID)
+ {
+ ndbrequire(replicaPtr.p->lcpId[idx] > maxLcpId);
+ Uint32 startGci = replicaPtr.p->maxGciCompleted[idx];
+ Uint32 stopGci = replicaPtr.p->maxGciStarted[idx];
+ for (;j < replicaPtr.p->noCrashedReplicas; j++)
+ {
+ ndbout_c("crashed replica: %d(%d) replicaLastGci: %d",
+ j,
+ replicaPtr.p->noCrashedReplicas,
+ replicaPtr.p->replicaLastGci[j]);
+ if (replicaPtr.p->replicaLastGci[j] > stopGci)
+ {
+ maxLcpId = replicaPtr.p->lcpId[idx];
+ maxLcpIndex = idx;
+ restorableGCI = replicaPtr.p->replicaLastGci[j];
+ break;
+ }
+ }
+ }
+ }
+
+ if (maxLcpIndex == ~ (Uint32) 0)
+ {
+ ndbout_c("Didnt find any LCP for node: %d tab: %d frag: %d",
+ takeOverPtr.p->toStartingNode,
+ takeOverPtr.p->toCurrentTabref,
+ takeOverPtr.p->toCurrentFragid);
+ replicaPtr.p->lcpIdStarted = 0;
+ BlockReference ref = calcLqhBlockRef(takeOverPtr.p->toStartingNode);
+ StartFragReq *req = (StartFragReq *)signal->getDataPtrSend();
+ req->userPtr = 0;
+ req->userRef = reference();
+ req->lcpNo = ZNIL;
+ req->lcpId = 0;
+ req->tableId = takeOverPtr.p->toCurrentTabref;
+ req->fragId = takeOverPtr.p->toCurrentFragid;
+ req->noOfLogNodes = 0;
+ sendSignal(ref, GSN_START_FRAGREQ, signal,
+ StartFragReq::SignalLength, JBB);
+ }
+ else
+ {
+ ndbout_c("Found LCP: %d(%d) maxGciStarted: %d maxGciCompleted: %d restorable: %d(%d) newestRestorableGCI: %d",
+ maxLcpId,
+ maxLcpIndex,
+ replicaPtr.p->maxGciStarted[maxLcpIndex],
+ replicaPtr.p->maxGciCompleted[maxLcpIndex],
+ restorableGCI,
+ SYSFILE->lastCompletedGCI[takeOverPtr.p->toStartingNode],
+ SYSFILE->newestRestorableGCI);
+
+ replicaPtr.p->lcpIdStarted = restorableGCI;
+ BlockReference ref = calcLqhBlockRef(takeOverPtr.p->toStartingNode);
+ StartFragReq *req = (StartFragReq *)signal->getDataPtrSend();
+ req->userPtr = 0;
+ req->userRef = reference();
+ req->lcpNo = maxLcpIndex;
+ req->lcpId = maxLcpId;
+ req->tableId = takeOverPtr.p->toCurrentTabref;
+ req->fragId = takeOverPtr.p->toCurrentFragid;
+ req->noOfLogNodes = 1;
+ req->lqhLogNode[0] = takeOverPtr.p->toStartingNode;
+ req->startGci[0] = replicaPtr.p->maxGciCompleted[maxLcpIndex];
+ req->lastGci[0] = restorableGCI;
+ sendSignal(ref, GSN_START_FRAGREQ, signal,
+ StartFragReq::SignalLength, JBB);
+ }
+}
+
+void
+Dbdih::nr_run_redo(Signal* signal, TakeOverRecordPtr takeOverPtr)
+{
+ takeOverPtr.p->toCurrentTabref = 0;
+ takeOverPtr.p->toCurrentFragid = 0;
+ sendSTART_RECREQ(signal, takeOverPtr.p->toStartingNode);
+}
+
void Dbdih::initStartTakeOver(const StartToReq * req,
TakeOverRecordPtr takeOverPtr)
{
@@ -3108,6 +3298,14 @@
/*---------------------------------------------------------------------- */
FragmentstorePtr fragPtr;
getFragstore(tabPtr.p, fragId, fragPtr);
+ Uint32 gci = 0;
+ if (takeOverPtr.p->toNodeRestart)
+ {
+ ReplicaRecordPtr replicaPtr;
+ findReplica(replicaPtr, fragPtr.p, takeOverPtr.p->toStartingNode, true);
+ gci = replicaPtr.p->lcpIdStarted;
+ replicaPtr.p->lcpIdStarted = 0;
+ }
takeOverPtr.p->toMasterStatus = TakeOverRecord::COPY_FRAG;
BlockReference ref = calcLqhBlockRef(takeOverPtr.p->toCopyNode);
CopyFragReq * const copyFragReq = (CopyFragReq *)&signal->theData[0];
@@ -3118,6 +3316,7 @@
copyFragReq->nodeId = takeOverPtr.p->toStartingNode;
copyFragReq->schemaVersion = tabPtr.p->schemaVersion;
copyFragReq->distributionKey = fragPtr.p->distributionKey;
+ copyFragReq->gci = gci;
copyFragReq->nodeCount = extractNodeInfo(fragPtr.p,
copyFragReq->nodeList);
sendSignal(ref, GSN_COPY_FRAGREQ, signal,
@@ -3650,6 +3849,7 @@
/* WE ALSO COPY TO OUR OWN NODE. TO ENABLE US TO DO THIS PROPERLY WE */
/* START BY CLOSING THIS FILE. */
/* ----------------------------------------------------------------------- */
+ globalData.m_restart_seq = ++SYSFILE->m_restart_seq;
closeFile(signal, filePtr);
filePtr.p->reqStatus = FileRecord::CLOSING_GCP;
}//Dbdih::readingGcpLab()
@@ -3858,6 +4058,11 @@
Uint32 newMasterId = nodeFail->masterNodeId;
const Uint32 noOfFailedNodes = nodeFail->noOfNodes;
+ if (ERROR_INSERTED(7179))
+ {
+ CLEAR_ERROR_INSERT_VALUE;
+ }
+
/*-------------------------------------------------------------------------*/
// The first step is to convert from a bit mask to an array of failed nodes.
/*-------------------------------------------------------------------------*/
@@ -4168,6 +4373,8 @@
Uint32 takeOverPtrI)
{
jam();
+ ndbout_c("checkTakeOverInMasterStartNodeFailure %x",
+ takeOverPtrI);
if (takeOverPtrI == RNIL) {
jam();
return;
@@ -4181,6 +4388,9 @@
takeOverPtr.i = takeOverPtrI;
ptrCheckGuard(takeOverPtr, MAX_NDB_NODES, takeOverRecord);
+ ndbout_c("takeOverPtr.p->toMasterStatus: %x",
+ takeOverPtr.p->toMasterStatus);
+
bool ok = false;
switch (takeOverPtr.p->toMasterStatus) {
case TakeOverRecord::IDLE:
@@ -4289,6 +4499,13 @@
//-----------------------------------------------------------------------
endTakeOver(takeOverPtr.i);
break;
+
+ case TakeOverRecord::STARTING_LOCAL_FRAGMENTS:
+ ok = true;
+ jam();
+ endTakeOver(takeOverPtr.i);
+ break;
+
/**
* The following are states that it should not be possible to "be" in
*/
@@ -5360,7 +5577,7 @@
//const Uint32 lcpId = SYSFILE->latestLCP_ID;
const bool lcpOngoingFlag = (tabPtr.p->tabLcpStatus== TabRecord::TLS_ACTIVE);
- const bool temporary = !tabPtr.p->storedTable;
+ const bool unlogged = (tabPtr.p->tabStorage != TabRecord::ST_NORMAL);
FragmentstorePtr fragPtr;
for(Uint32 fragNo = 0; fragNo < tabPtr.p->totalfragments; fragNo++){
@@ -5381,7 +5598,7 @@
jam();
found = true;
noOfRemovedReplicas++;
- removeNodeFromStored(nodeId, fragPtr, replicaPtr, temporary);
+ removeNodeFromStored(nodeId, fragPtr, replicaPtr, unlogged);
if(replicaPtr.p->lcpOngoingFlag){
jam();
/**
@@ -5708,11 +5925,9 @@
#endif
}
- bool ok = false;
MasterLCPConf::State lcpState;
switch (c_lcpState.lcpStatus) {
case LCP_STATUS_IDLE:
- ok = true;
jam();
/*------------------------------------------------*/
/* LOCAL CHECKPOINT IS CURRENTLY NOT ACTIVE */
@@ -5723,7 +5938,6 @@
lcpState = MasterLCPConf::LCP_STATUS_IDLE;
break;
case LCP_STATUS_ACTIVE:
- ok = true;
jam();
/*--------------------------------------------------*/
/* COPY OF RESTART INFORMATION HAS BEEN */
@@ -5732,7 +5946,6 @@
lcpState = MasterLCPConf::LCP_STATUS_ACTIVE;
break;
case LCP_TAB_COMPLETED:
- ok = true;
jam();
/*--------------------------------------------------------*/
/* ALL LCP_REPORT'S HAVE BEEN COMPLETED FOR */
@@ -5742,7 +5955,6 @@
lcpState = MasterLCPConf::LCP_TAB_COMPLETED;
break;
case LCP_TAB_SAVED:
- ok = true;
jam();
/*--------------------------------------------------------*/
/* ALL LCP_REPORT'S HAVE BEEN COMPLETED FOR */
@@ -5766,15 +5978,16 @@
break;
case LCP_COPY_GCI:
case LCP_INIT_TABLES:
- ok = true;
/**
* These two states are handled by if statements above
*/
ndbrequire(false);
lcpState= MasterLCPConf::LCP_STATUS_IDLE; // remove warning
break;
+ default:
+ ndbrequire(false);
+ lcpState= MasterLCPConf::LCP_STATUS_IDLE; // remove warning
}//switch
- ndbrequire(ok);
Uint32 failedNodeId = c_lcpState.m_MASTER_LCPREQ_FailedNodeId;
MasterLCPConf * const conf = (MasterLCPConf *)&signal->theData[0];
@@ -6372,96 +6585,147 @@
3.7.1 A D D T A B L E M A I N L Y
***************************************
*/
-void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal){
+
+static inline void inc_node_or_group(Uint32 &node, Uint32 max_node)
+{
+ Uint32 next = node + 1;
+ node = (next == max_node ? 0 : next);
+}
+
+/*
+ Spread fragments in backwards compatible mode
+*/
+static void set_default_node_groups(Signal *signal, Uint32 noFrags)
+{
+ Uint16 *node_group_array = (Uint16*)&signal->theData[25];
+ Uint32 i;
+ node_group_array[0] = 0;
+ for (i = 1; i < noFrags; i++)
+ node_group_array[i] = UNDEF_NODEGROUP;
+}
+void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal)
+{
+ Uint16 node_group_id[MAX_NDB_PARTITIONS];
jamEntry();
CreateFragmentationReq * const req =
(CreateFragmentationReq*)signal->getDataPtr();
const Uint32 senderRef = req->senderRef;
const Uint32 senderData = req->senderData;
- const Uint32 fragmentNode = req->fragmentNode;
- const Uint32 fragmentType = req->fragmentationType;
- //const Uint32 fragmentCount = req->noOfFragments;
+ Uint32 noOfFragments = req->noOfFragments;
+ const Uint32 fragType = req->fragmentationType;
const Uint32 primaryTableId = req->primaryTableId;
Uint32 err = 0;
do {
- Uint32 noOfFragments = 0;
- Uint32 noOfReplicas = cnoReplicas;
- switch(fragmentType){
- case DictTabInfo::AllNodesSmallTable:
- jam();
- noOfFragments = csystemnodes;
- break;
- case DictTabInfo::AllNodesMediumTable:
- jam();
- noOfFragments = 2 * csystemnodes;
- break;
- case DictTabInfo::AllNodesLargeTable:
- jam();
- noOfFragments = 4 * csystemnodes;
- break;
- case DictTabInfo::SingleFragment:
- jam();
- noOfFragments = 1;
- break;
-#if 0
- case DictTabInfo::SpecifiedFragmentCount:
- noOfFragments = (fragmentCount == 0 ? 1 : (fragmentCount + 1)/ 2);
- break;
-#endif
- default:
- jam();
- err = CreateFragmentationRef::InvalidFragmentationType;
- break;
- }
- if(err)
- break;
-
NodeGroupRecordPtr NGPtr;
TabRecordPtr primTabPtr;
+ Uint32 count = 2;
+ Uint16 noOfReplicas = cnoReplicas;
+ Uint16 *fragments = (Uint16*)(signal->theData+25);
if (primaryTableId == RNIL) {
- if(fragmentNode == 0){
- jam();
- NGPtr.i = 0;
- if(noOfFragments < csystemnodes)
- {
- NGPtr.i = c_nextNodeGroup;
- c_nextNodeGroup = (NGPtr.i + 1 == cnoOfNodeGroups ? 0 : NGPtr.i + 1);
- }
- } else if(! (fragmentNode < MAX_NDB_NODES)) {
- jam();
- err = CreateFragmentationRef::InvalidNodeId;
- } else {
- jam();
- const Uint32 stat = Sysfile::getNodeStatus(fragmentNode,
- SYSFILE->nodeStatus);
- switch (stat) {
- case Sysfile::NS_Active:
- case Sysfile::NS_ActiveMissed_1:
- case Sysfile::NS_ActiveMissed_2:
- case Sysfile::NS_TakeOver:
+ jam();
+ switch ((DictTabInfo::FragmentType)fragType)
+ {
+ /*
+ Backward compatability and for all places in code not changed.
+ */
+ case DictTabInfo::AllNodesSmallTable:
+ jam();
+ noOfFragments = csystemnodes;
+ set_default_node_groups(signal, noOfFragments);
+ break;
+ case DictTabInfo::AllNodesMediumTable:
jam();
+ noOfFragments = 2 * csystemnodes;
+ set_default_node_groups(signal, noOfFragments);
break;
- case Sysfile::NS_NotActive_NotTakenOver:
+ case DictTabInfo::AllNodesLargeTable:
jam();
+ noOfFragments = 4 * csystemnodes;
+ set_default_node_groups(signal, noOfFragments);
break;
- case Sysfile::NS_HotSpare:
+ case DictTabInfo::SingleFragment:
jam();
- case Sysfile::NS_NotDefined:
+ noOfFragments = 1;
+ set_default_node_groups(signal, noOfFragments);
+ break;
+ case DictTabInfo::DistrKeyHash:
+ jam();
+ case DictTabInfo::DistrKeyLin:
jam();
+ if (noOfFragments == 0)
+ {
+ jam();
+ noOfFragments = csystemnodes;
+ set_default_node_groups(signal, noOfFragments);
+ }
+ break;
default:
jam();
- err = CreateFragmentationRef::InvalidNodeType;
+ if (noOfFragments == 0)
+ {
+ jam();
+ err = CreateFragmentationRef::InvalidFragmentationType;
+ }
break;
+ }
+ if (err)
+ break;
+ /*
+ When we come here the the exact partition is specified
+ and there is an array of node groups sent along as well.
+ */
+ memcpy(&node_group_id[0], &signal->theData[25], 2 * noOfFragments);
+ Uint16 next_replica_node[MAX_NDB_NODES];
+ memset(next_replica_node,0,sizeof(next_replica_node));
+ Uint32 default_node_group= c_nextNodeGroup;
+ for(Uint32 fragNo = 0; fragNo < noOfFragments; fragNo++)
+ {
+ jam();
+ NGPtr.i = node_group_id[fragNo];
+ if (NGPtr.i == UNDEF_NODEGROUP)
+ {
+ jam();
+ NGPtr.i = default_node_group;
}
- if(err)
+ if (NGPtr.i > cnoOfNodeGroups)
+ {
+ jam();
+ err = CreateFragmentationRef::InvalidNodeGroup;
break;
- NGPtr.i = Sysfile::getNodeGroup(fragmentNode,
- SYSFILE->nodeGroups);
+ }
+ ptrCheckGuard(NGPtr, MAX_NDB_NODES, nodeGroupRecord);
+ const Uint32 max = NGPtr.p->nodeCount;
+
+ fragments[count++] = c_nextLogPart++; // Store logpart first
+ Uint32 tmp= next_replica_node[NGPtr.i];
+ for(Uint32 replicaNo = 0; replicaNo < noOfReplicas; replicaNo++)
+ {
+ jam();
+ const Uint16 nodeId = NGPtr.p->nodesInGroup[tmp];
+ fragments[count++]= nodeId;
+ inc_node_or_group(tmp, max);
+ }
+ inc_node_or_group(tmp, max);
+ next_replica_node[NGPtr.i]= tmp;
+
+ /**
+ * Next node group for next fragment
+ */
+ inc_node_or_group(default_node_group, cnoOfNodeGroups);
+ }
+ if (err)
+ {
+ jam();
break;
}
+ else
+ {
+ jam();
+ c_nextNodeGroup = default_node_group;
+ }
} else {
if (primaryTableId >= ctabFileSize) {
jam();
@@ -6475,48 +6739,14 @@
err = CreateFragmentationRef::InvalidPrimaryTable;
break;
}
- if (noOfFragments != primTabPtr.p->totalfragments) {
- jam();
- err = CreateFragmentationRef::InvalidFragmentationType;
- break;
- }
- }
-
- Uint32 count = 2;
- Uint16 *fragments = (Uint16*)(signal->theData+25);
- if (primaryTableId == RNIL) {
- jam();
- Uint8 next_replica_node[MAX_NDB_NODES];
- memset(next_replica_node,0,sizeof(next_replica_node));
- for(Uint32 fragNo = 0; fragNo<noOfFragments; fragNo++){
- jam();
- ptrCheckGuard(NGPtr, MAX_NDB_NODES, nodeGroupRecord);
- const Uint32 max = NGPtr.p->nodeCount;
-
- Uint32 tmp= next_replica_node[NGPtr.i];
- for(Uint32 replicaNo = 0; replicaNo<noOfReplicas; replicaNo++)
- {
- jam();
- const Uint32 nodeId = NGPtr.p->nodesInGroup[tmp++];
- fragments[count++] = nodeId;
- tmp = (tmp >= max ? 0 : tmp);
- }
- tmp++;
- next_replica_node[NGPtr.i]= (tmp >= max ? 0 : tmp);
-
- /**
- * Next node group for next fragment
- */
- NGPtr.i++;
- NGPtr.i = (NGPtr.i == cnoOfNodeGroups ? 0 : NGPtr.i);
- }
- } else {
+ noOfFragments= primTabPtr.p->totalfragments;
for (Uint32 fragNo = 0;
- fragNo < primTabPtr.p->totalfragments; fragNo++) {
+ fragNo < noOfFragments; fragNo++) {
jam();
FragmentstorePtr fragPtr;
ReplicaRecordPtr replicaPtr;
getFragstore(primTabPtr.p, fragNo, fragPtr);
+ fragments[count++] = fragPtr.p->m_log_part_id;
fragments[count++] = fragPtr.p->preferredPrimary;
for (replicaPtr.i = fragPtr.p->storedReplicas;
replicaPtr.i != RNIL;
@@ -6525,9 +6755,9 @@
ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord);
if (replicaPtr.p->procNode != fragPtr.p->preferredPrimary) {
jam();
- fragments[count++] = replicaPtr.p->procNode;
- }//if
- }//for
+ fragments[count++]= replicaPtr.p->procNode;
+ }
+ }
for (replicaPtr.i = fragPtr.p->oldStoredReplicas;
replicaPtr.i != RNIL;
replicaPtr.i = replicaPtr.p->nextReplica) {
@@ -6535,12 +6765,12 @@
ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord);
if (replicaPtr.p->procNode != fragPtr.p->preferredPrimary) {
jam();
- fragments[count++] = replicaPtr.p->procNode;
- }//if
- }//for
+ fragments[count++]= replicaPtr.p->procNode;
+ }
+ }
}
}
- if(count != (2 + noOfReplicas * noOfFragments)){
+ if(count != (2U + (1 + noOfReplicas) * noOfFragments)){
char buf[255];
BaseString::snprintf(buf, sizeof(buf),
"Illegal configuration change: NoOfReplicas."
@@ -6552,14 +6782,15 @@
(CreateFragmentationConf*)signal->getDataPtrSend();
conf->senderRef = reference();
conf->senderData = senderData;
- conf->noOfReplicas = noOfReplicas;
- conf->noOfFragments = noOfFragments;
+ conf->noOfReplicas = (Uint32)noOfReplicas;
+ conf->noOfFragments = (Uint32)noOfFragments;
- fragments[0] = noOfReplicas;
- fragments[1] = noOfFragments;
+ fragments[0]= noOfReplicas;
+ fragments[1]= noOfFragments;
if(senderRef != 0)
{
+ jam();
LinearSectionPtr ptr[3];
ptr[0].p = (Uint32*)&fragments[0];
ptr[0].sz = (count + 1) / 2;
@@ -6571,33 +6802,17 @@
ptr,
1);
}
- else
- {
- // Execute direct
- signal->theData[0] = 0;
- }
+ // Always ACK/NACK (here ACK)
+ signal->theData[0] = 0;
return;
} while(false);
-
- if(senderRef != 0)
- {
- CreateFragmentationRef * const ref =
- (CreateFragmentationRef*)signal->getDataPtrSend();
- ref->senderRef = reference();
- ref->senderData = senderData;
- ref->errorCode = err;
- sendSignal(senderRef, GSN_CREATE_FRAGMENTATION_REF, signal,
- CreateFragmentationRef::SignalLength, JBB);
- }
- else
- {
- // Execute direct
- signal->theData[0] = err;
- }
+ // Always ACK/NACK (here NACK)
+ signal->theData[0] = err;
}
void Dbdih::execDIADDTABREQ(Signal* signal)
{
+ Uint32 fragType;
jamEntry();
DiAddTabReq * const req = (DiAddTabReq*)signal->getDataPtr();
@@ -6622,6 +6837,7 @@
ptrCheckGuard(tabPtr, ctabFileSize, tabRecord);
tabPtr.p->connectrec = connectPtr.i;
tabPtr.p->tableType = req->tableType;
+ fragType= req->fragType;
tabPtr.p->schemaVersion = req->schemaVersion;
tabPtr.p->primaryTableId = req->primaryTableId;
@@ -6657,15 +6873,46 @@
/* BUT THEY DO NOT HAVE ANY INFORMATION ABOUT ANY TABLE*/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
tabPtr.p->tabStatus = TabRecord::TS_CREATING;
- tabPtr.p->storedTable = req->storedTable;
- tabPtr.p->method = TabRecord::HASH;
+ if(req->loggedTable)
+ tabPtr.p->tabStorage= TabRecord::ST_NORMAL;
+ else if(req->temporaryTable)
+ tabPtr.p->tabStorage= TabRecord::ST_TEMPORARY;
+ else
+ tabPtr.p->tabStorage= TabRecord::ST_NOLOGGING;
tabPtr.p->kvalue = req->kValue;
+ switch ((DictTabInfo::FragmentType)fragType)
+ {
+ case DictTabInfo::AllNodesSmallTable:
+ case DictTabInfo::AllNodesMediumTable:
+ case DictTabInfo::AllNodesLargeTable:
+ case DictTabInfo::SingleFragment:
+ jam();
+ case DictTabInfo::DistrKeyLin:
+ jam();
+ tabPtr.p->method= TabRecord::LINEAR_HASH;
+ break;
+ case DictTabInfo::DistrKeyHash:
+ case DictTabInfo::DistrKeyUniqueHashIndex:
+ case DictTabInfo::DistrKeyOrderedIndex:
+ jam();
+ tabPtr.p->method= TabRecord::NORMAL_HASH;
+ break;
+ case DictTabInfo::UserDefined:
+ jam();
+ tabPtr.p->method= TabRecord::USER_DEFINED;
+ break;
+ default:
+ ndbrequire(false);
+ }
+
union {
Uint16 fragments[2 + MAX_FRAG_PER_NODE*MAX_REPLICAS*MAX_NDB_NODES];
Uint32 align;
};
SegmentedSectionPtr fragDataPtr;
+ LINT_INIT(fragDataPtr.i);
+ LINT_INIT(fragDataPtr.sz);
signal->getSection(fragDataPtr, DiAddTabReq::FRAGMENTATION);
copy((Uint32*)fragments, fragDataPtr);
releaseSections(signal);
@@ -6709,7 +6956,9 @@
FragmentstorePtr fragPtr;
Uint32 activeIndex = 0;
getFragstore(tabPtr.p, fragId, fragPtr);
+ fragPtr.p->m_log_part_id = fragments[index++];
fragPtr.p->preferredPrimary = fragments[index];
+
for (Uint32 i = 0; i<noReplicas; i++) {
const Uint32 nodeId = fragments[index++];
ReplicaRecordPtr replicaPtr;
@@ -6753,10 +7002,12 @@
TabRecordPtr tabPtr, Uint32 fragId){
jam();
const Uint32 fragCount = tabPtr.p->totalfragments;
- ReplicaRecordPtr replicaPtr; replicaPtr.i = RNIL;
+ ReplicaRecordPtr replicaPtr;
+ LINT_INIT(replicaPtr.p);
+ replicaPtr.i = RNIL;
+ FragmentstorePtr fragPtr;
for(; fragId<fragCount; fragId++){
jam();
- FragmentstorePtr fragPtr;
getFragstore(tabPtr.p, fragId, fragPtr);
replicaPtr.i = fragPtr.p->storedReplicas;
@@ -6796,7 +7047,7 @@
ndbrequire(replicaPtr.p->procNode == getOwnNodeId());
Uint32 requestInfo = 0;
- if(!tabPtr.p->storedTable){
+ if(tabPtr.p->tabStorage != TabRecord::ST_NORMAL){
requestInfo |= LqhFragReq::TemporaryTable;
}
@@ -6814,6 +7065,7 @@
req->nodeId = getOwnNodeId();
req->totalFragments = fragCount;
req->startGci = SYSFILE->newestRestorableGCI;
+ req->logPartId = fragPtr.p->m_log_part_id;
sendSignal(DBDICT_REF, GSN_ADD_FRAGREQ, signal,
AddFragReq::SignalLength, JBB);
return;
@@ -7095,17 +7347,40 @@
tabPtr.i = req->tableId;
Uint32 hashValue = req->hashValue;
Uint32 ttabFileSize = ctabFileSize;
+ Uint32 fragId;
+ DiGetNodesConf * const conf = (DiGetNodesConf *)&signal->theData[0];
TabRecord* regTabDesc = tabRecord;
jamEntry();
ptrCheckGuard(tabPtr, ttabFileSize, regTabDesc);
- Uint32 fragId = hashValue & tabPtr.p->mask;
- ndbrequire(tabPtr.p->tabStatus == TabRecord::TS_ACTIVE);
- if (fragId < tabPtr.p->hashpointer) {
+ if (tabPtr.p->method == TabRecord::LINEAR_HASH)
+ {
jam();
- fragId = hashValue & ((tabPtr.p->mask << 1) + 1);
- }//if
+ fragId = hashValue & tabPtr.p->mask;
+ ndbrequire(tabPtr.p->tabStatus == TabRecord::TS_ACTIVE);
+ if (fragId < tabPtr.p->hashpointer) {
+ jam();
+ fragId = hashValue & ((tabPtr.p->mask << 1) + 1);
+ }//if
+ }
+ else if (tabPtr.p->method == TabRecord::NORMAL_HASH)
+ {
+ jam();
+ fragId= hashValue % tabPtr.p->totalfragments;
+ }
+ else
+ {
+ jam();
+ ndbassert(tabPtr.p->method == TabRecord::USER_DEFINED);
+ fragId= hashValue;
+ if (fragId >= tabPtr.p->totalfragments)
+ {
+ jam();
+ conf->zero= 1; //Indicate error;
+ signal->theData[1]= ZUNDEFINED_FRAGMENT_ERROR;
+ return;
+ }
+ }
getFragstore(tabPtr.p, fragId, fragPtr);
- DiGetNodesConf * const conf = (DiGetNodesConf *)&signal->theData[0];
Uint32 nodeCount = extractNodeInfo(fragPtr.p, conf->nodes);
Uint32 sig2 = (nodeCount - 1) +
(fragPtr.p->distributionKey << 16);
@@ -7272,39 +7547,70 @@
void Dbdih::execDI_FCOUNTREQ(Signal* signal)
{
+ DihFragCountReq * const req = (DihFragCountReq*)signal->getDataPtr();
ConnectRecordPtr connectPtr;
TabRecordPtr tabPtr;
+ const BlockReference senderRef = signal->senderBlockRef();
+ const Uint32 senderData = req->m_senderData;
jamEntry();
- connectPtr.i = signal->theData[0];
- tabPtr.i = signal->theData[1];
+ connectPtr.i = req->m_connectionData;
+ tabPtr.i = req->m_tableRef;
ptrCheckGuard(tabPtr, ctabFileSize, tabRecord);
- ndbrequire(tabPtr.p->tabStatus == TabRecord::TS_ACTIVE);
+ if (tabPtr.p->tabStatus != TabRecord::TS_ACTIVE)
+ {
+ DihFragCountRef* ref = (DihFragCountRef*)signal->getDataPtrSend();
+ //connectPtr.i == RNIL -> question without connect record
+ if(connectPtr.i == RNIL)
+ ref->m_connectionData = RNIL;
+ else
+ {
+ jam();
+ ptrCheckGuard(connectPtr, cconnectFileSize, connectRecord);
+ ref->m_connectionData = connectPtr.p->userpointer;
+ }
+ ref->m_tableRef = tabPtr.i;
+ ref->m_senderData = senderData;
+ ref->m_error = DihFragCountRef::ErroneousTableState;
+ ref->m_tableStatus = tabPtr.p->tabStatus;
+ sendSignal(senderRef, GSN_DI_FCOUNTREF, signal,
+ DihFragCountRef::SignalLength, JBB);
+ return;
+ }
if(connectPtr.i != RNIL){
ptrCheckGuard(connectPtr, cconnectFileSize, connectRecord);
if (connectPtr.p->connectState == ConnectRecord::INUSE) {
jam();
- signal->theData[0] = connectPtr.p->userpointer;
- signal->theData[1] = tabPtr.p->totalfragments;
- sendSignal(connectPtr.p->userblockref, GSN_DI_FCOUNTCONF, signal,2, JBB);
- return;
- }//if
- signal->theData[0] = connectPtr.p->userpointer;
- signal->theData[1] = ZERRONOUSSTATE;
- sendSignal(connectPtr.p->userblockref, GSN_DI_FCOUNTREF, signal, 2, JBB);
+ DihFragCountConf* conf = (DihFragCountConf*)signal->getDataPtrSend();
+ conf->m_connectionData = connectPtr.p->userpointer;
+ conf->m_tableRef = tabPtr.i;
+ conf->m_senderData = senderData;
+ conf->m_fragmentCount = tabPtr.p->totalfragments;
+ conf->m_noOfBackups = tabPtr.p->noOfBackups;
+ sendSignal(connectPtr.p->userblockref, GSN_DI_FCOUNTCONF, signal,
+ DihFragCountConf::SignalLength, JBB);
+ return;
+ }//if
+ DihFragCountRef* ref = (DihFragCountRef*)signal->getDataPtrSend();
+ ref->m_connectionData = connectPtr.p->userpointer;
+ ref->m_tableRef = tabPtr.i;
+ ref->m_senderData = senderData;
+ ref->m_error = DihFragCountRef::ErroneousTableState;
+ ref->m_tableStatus = tabPtr.p->tabStatus;
+ sendSignal(connectPtr.p->userblockref, GSN_DI_FCOUNTREF, signal,
+ DihFragCountRef::SignalLength, JBB);
return;
}//if
-
+ DihFragCountConf* conf = (DihFragCountConf*)signal->getDataPtrSend();
//connectPtr.i == RNIL -> question without connect record
- const Uint32 senderData = signal->theData[2];
- const BlockReference senderRef = signal->senderBlockRef();
- signal->theData[0] = RNIL;
- signal->theData[1] = tabPtr.p->totalfragments;
- signal->theData[2] = tabPtr.i;
- signal->theData[3] = senderData;
- signal->theData[4] = tabPtr.p->noOfBackups;
- sendSignal(senderRef, GSN_DI_FCOUNTCONF, signal, 5, JBB);
+ conf->m_connectionData = RNIL;
+ conf->m_tableRef = tabPtr.i;
+ conf->m_senderData = senderData;
+ conf->m_fragmentCount = tabPtr.p->totalfragments;
+ conf->m_noOfBackups = tabPtr.p->noOfBackups;
+ sendSignal(senderRef, GSN_DI_FCOUNTCONF, signal,
+ DihFragCountConf::SignalLength, JBB);
}//Dbdih::execDI_FCOUNTREQ()
void Dbdih::execDIGETPRIMREQ(Signal* signal)
@@ -8078,6 +8384,15 @@
if (reason == CopyGCIReq::GLOBAL_CHECKPOINT) {
jam();
cgcpParticipantState = GCP_PARTICIPANT_READY;
+
+ SubGcpCompleteRep * const rep = (SubGcpCompleteRep*)signal->getDataPtr();
+ rep->gci = coldgcp;
+ sendSignal(SUMA_REF, GSN_SUB_GCP_COMPLETE_REP, signal,
+ SubGcpCompleteRep::SignalLength, JBB);
+
+ EXECUTE_DIRECT(LGMAN, GSN_SUB_GCP_COMPLETE_REP, signal,
+ SubGcpCompleteRep::SignalLength);
+ jamEntry();
}
jam();
@@ -8166,9 +8481,9 @@
continue;
}
- if (tabPtr.p->storedTable == 0) {
+ if (tabPtr.p->tabStorage != TabRecord::ST_NORMAL) {
/**
- * Temporary table
+ * Table is not logged
*/
jam();
tabPtr.p->tabLcpStatus = TabRecord::TLS_COMPLETED;
@@ -8481,7 +8796,7 @@
ConstPtr<ReplicaRecord> constReplicaPtr;
constReplicaPtr.i = replicaPtr.i;
constReplicaPtr.p = replicaPtr.p;
- if (tabPtr.p->storedTable == 0 ||
+ if (tabPtr.p->tabStorage != TabRecord::ST_NORMAL ||
setup_create_replica(fragPtr,
&createReplica, constReplicaPtr))
{
@@ -8674,12 +8989,11 @@
rf.rwfTabPtr.p->hashpointer = readPageWord(&rf);
rf.rwfTabPtr.p->kvalue = readPageWord(&rf);
rf.rwfTabPtr.p->mask = readPageWord(&rf);
- ndbrequire(readPageWord(&rf) == TabRecord::HASH);
- rf.rwfTabPtr.p->method = TabRecord::HASH;
- /* ---------------------------------- */
- /* Type of table, 2 = temporary table */
- /* ---------------------------------- */
- rf.rwfTabPtr.p->storedTable = readPageWord(&rf);
+ rf.rwfTabPtr.p->method = (TabRecord::Method)readPageWord(&rf);
+ /* ------------- */
+ /* Type of table */
+ /* ------------- */
+ rf.rwfTabPtr.p->tabStorage = (TabRecord::Storage)(readPageWord(&rf));
Uint32 noOfFrags = rf.rwfTabPtr.p->totalfragments;
ndbrequire(noOfFrags > 0);
@@ -8769,8 +9083,8 @@
writePageWord(&wf, tabPtr.p->hashpointer);
writePageWord(&wf, tabPtr.p->kvalue);
writePageWord(&wf, tabPtr.p->mask);
- writePageWord(&wf, TabRecord::HASH);
- writePageWord(&wf, tabPtr.p->storedTable);
+ writePageWord(&wf, tabPtr.p->method);
+ writePageWord(&wf, tabPtr.p->tabStorage);
signal->theData[0] = DihContinueB::ZPACK_FRAG_INTO_PAGES;
signal->theData[1] = tabPtr.i;
@@ -8870,6 +9184,80 @@
/*****************************************************************************/
/* ********** START FRAGMENT MODULE *************/
/*****************************************************************************/
+void
+Dbdih::dump_replica_info()
+{
+ TabRecordPtr tabPtr;
+ FragmentstorePtr fragPtr;
+
+ for(tabPtr.i = 0; tabPtr.i < ctabFileSize; tabPtr.i++)
+ {
+ ptrCheckGuard(tabPtr, ctabFileSize, tabRecord);
+ if (tabPtr.p->tabStatus != TabRecord::TS_ACTIVE)
+ continue;
+
+ for(Uint32 fid = 0; fid<tabPtr.p->totalfragments; fid++)
+ {
+ getFragstore(tabPtr.p, fid, fragPtr);
+ ndbout_c("tab: %d frag: %d gci: %d\n -- storedReplicas:",
+ tabPtr.i, fid, SYSFILE->newestRestorableGCI);
+
+ Uint32 i;
+ ReplicaRecordPtr replicaPtr;
+ replicaPtr.i = fragPtr.p->storedReplicas;
+ for(; replicaPtr.i != RNIL; replicaPtr.i = replicaPtr.p->nextReplica)
+ {
+ ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord);
+ ndbout_c(" node: %d initialGci: %d nextLcp: %d noCrashedReplicas: %d",
+ replicaPtr.p->procNode,
+ replicaPtr.p->initialGci,
+ replicaPtr.p->nextLcp,
+ replicaPtr.p->noCrashedReplicas);
+ for(i = 0; i<MAX_LCP_STORED; i++)
+ {
+ ndbout_c(" i: %d %s : lcpId: %d maxGci Completed: %d Started: %d",
+ i,
+ (replicaPtr.p->lcpStatus[i] == ZVALID ?"VALID":"INVALID"),
+ replicaPtr.p->lcpId[i],
+ replicaPtr.p->maxGciCompleted[i],
+ replicaPtr.p->maxGciStarted[i]);
+ }
+
+ for (i = 0; i < 8; i++)
+ {
+ ndbout_c(" crashed replica: %d replicaLastGci: %d createGci: %d",
+ i,
+ replicaPtr.p->replicaLastGci[i],
+ replicaPtr.p->createGci[i]);
+ }
+ }
+ ndbout_c(" -- oldStoredReplicas");
+ replicaPtr.i = fragPtr.p->oldStoredReplicas;
+ for(; replicaPtr.i != RNIL; replicaPtr.i = replicaPtr.p->nextReplica)
+ {
+ ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord);
+ for(i = 0; i<MAX_LCP_STORED; i++)
+ {
+ ndbout_c(" i: %d %s : lcpId: %d maxGci Completed: %d Started: %d",
+ i,
+ (replicaPtr.p->lcpStatus[i] == ZVALID ?"VALID":"INVALID"),
+ replicaPtr.p->lcpId[i],
+ replicaPtr.p->maxGciCompleted[i],
+ replicaPtr.p->maxGciStarted[i]);
+ }
+
+ for (i = 0; i < 8; i++)
+ {
+ ndbout_c(" crashed replica: %d replicaLastGci: %d createGci: %d",
+ i,
+ replicaPtr.p->replicaLastGci[i],
+ replicaPtr.p->createGci[i]);
+ }
+ }
+ }
+ }
+}
+
void Dbdih::startFragment(Signal* signal, Uint32 tableId, Uint32 fragId)
{
Uint32 TloopCount = 0;
@@ -8901,7 +9289,7 @@
continue;
}
- if(tabPtr.p->storedTable == 0){
+ if(tabPtr.p->tabStorage != TabRecord::ST_NORMAL){
jam();
TloopCount++;
tableId++;
@@ -8931,6 +9319,7 @@
/* SEARCH FOR STORED REPLICAS THAT CAN BE USED TO RESTART THE SYSTEM. */
/* ----------------------------------------------------------------------- */
searchStoredReplicas(fragPtr);
+
if (cnoOfCreateReplicas == 0) {
/* --------------------------------------------------------------------- */
/* THERE WERE NO STORED REPLICAS AVAILABLE THAT CAN SERVE AS REPLICA TO*/
@@ -8943,6 +9332,10 @@
char buf[64];
BaseString::snprintf(buf, sizeof(buf), "table: %d fragment: %d gci: %d",
tableId, fragId, SYSFILE->newestRestorableGCI);
+
+ ndbout_c(buf);
+ dump_replica_info();
+
progError(__LINE__, NDBD_EXIT_NO_RESTORABLE_REPLICA, buf);
ndbrequire(false);
return;
@@ -9019,8 +9412,8 @@
// otherwise we have a problem.
/* --------------------------------------------------------------------- */
jam();
- ndbrequire(senderNodeId == c_nodeStartMaster.startNode);
- nodeRestartStartRecConfLab(signal);
+ ndbout_c("startNextCopyFragment");
+ startNextCopyFragment(signal, findTakeOver(senderNodeId));
return;
} else {
/* --------------------------------------------------------------------- */
@@ -9521,7 +9914,7 @@
}//if
ptrCheckGuard(tabPtr, ctabFileSize, tabRecord);
if (tabPtr.p->tabStatus != TabRecord::TS_ACTIVE ||
- tabPtr.p->storedTable == 0) {
+ tabPtr.p->tabStorage != TabRecord::ST_NORMAL) {
if (TloopCount > 100) {
jam();
signal->theData[0] = DihContinueB::ZCALCULATE_KEEP_GCI;
@@ -9881,12 +10274,42 @@
Uint32 fragId = lcpReport->fragId;
jamEntry();
+
+ if (ERROR_INSERTED(7178) && nodeId != getOwnNodeId())
+ {
+ jam();
+ Uint32 owng =Sysfile::getNodeGroup(getOwnNodeId(), SYSFILE->nodeGroups);
+ Uint32 nodeg = Sysfile::getNodeGroup(nodeId, SYSFILE->nodeGroups);
+ if (owng == nodeg)
+ {
+ jam();
+ ndbout_c("throwing away LCP_FRAG_REP from (and killing) %d", nodeId);
+ SET_ERROR_INSERT_VALUE(7179);
+ signal->theData[0] = 9999;
+ sendSignal(numberToRef(CMVMI, nodeId),
+ GSN_NDB_TAMPER, signal, 1, JBA);
+ return;
+ }
+ }
+ if (ERROR_INSERTED(7179) && nodeId != getOwnNodeId())
+ {
+ jam();
+ Uint32 owng =Sysfile::getNodeGroup(getOwnNodeId(), SYSFILE->nodeGroups);
+ Uint32 nodeg = Sysfile::getNodeGroup(nodeId, SYSFILE->nodeGroups);
+ if (owng == nodeg)
+ {
+ jam();
+ ndbout_c("throwing away LCP_FRAG_REP from %d", nodeId);
+ return;
+ }
+ }
+
CRASH_INSERTION2(7025, isMaster());
CRASH_INSERTION2(7016, !isMaster());
-
+
bool fromTimeQueue = (signal->senderBlockRef() == reference());
-
+
TabRecordPtr tabPtr;
tabPtr.i = tableId;
ptrCheckGuard(tabPtr, ctabFileSize, tabRecord);
@@ -10050,9 +10473,11 @@
}
void Dbdih::findReplica(ReplicaRecordPtr& replicaPtr,
- Fragmentstore* fragPtrP, Uint32 nodeId)
+ Fragmentstore* fragPtrP,
+ Uint32 nodeId,
+ bool old)
{
- replicaPtr.i = fragPtrP->storedReplicas;
+ replicaPtr.i = old ? fragPtrP->oldStoredReplicas : fragPtrP->storedReplicas;
while(replicaPtr.i != RNIL){
ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord);
if (replicaPtr.p->procNode == nodeId) {
@@ -10086,6 +10511,37 @@
ndbrequire(false);
}//Dbdih::findReplica()
+
+int
+Dbdih::handle_invalid_lcp_no(const LcpFragRep* rep,
+ ReplicaRecordPtr replicaPtr)
+{
+ ndbrequire(!isMaster());
+ Uint32 lcpNo = rep->lcpNo;
+ Uint32 lcpId = rep->lcpId;
+ Uint32 replicaLcpNo = replicaPtr.p->nextLcp;
+ Uint32 prevReplicaLcpNo = prevLcpNo(replicaLcpNo);
+
+ warningEvent("Detected previous node failure of %d during lcp",
+ rep->nodeId);
+ replicaPtr.p->nextLcp = lcpNo;
+ replicaPtr.p->lcpId[lcpNo] = 0;
+ replicaPtr.p->lcpStatus[lcpNo] = ZINVALID;
+
+ for (Uint32 i = lcpNo; i != lcpNo; i = nextLcpNo(i))
+ {
+ jam();
+ if (replicaPtr.p->lcpStatus[i] == ZVALID &&
+ replicaPtr.p->lcpId[i] >= lcpId)
+ {
+ ndbout_c("i: %d lcpId: %d", i, replicaPtr.p->lcpId[i]);
+ ndbrequire(false);
+ }
+ }
+
+ return 0;
+}
+
/**
* Return true if table is all fragment replicas have been checkpointed
* to disk (in all LQHs)
@@ -10114,9 +10570,12 @@
ndbrequire(replicaPtr.p->lcpOngoingFlag == true);
if(lcpNo != replicaPtr.p->nextLcp){
- ndbout_c("lcpNo = %d replicaPtr.p->nextLcp = %d",
- lcpNo, replicaPtr.p->nextLcp);
- ndbrequire(false);
+ if (handle_invalid_lcp_no(lcpReport, replicaPtr))
+ {
+ ndbout_c("lcpNo = %d replicaPtr.p->nextLcp = %d",
+ lcpNo, replicaPtr.p->nextLcp);
+ ndbrequire(false);
+ }
}
ndbrequire(lcpNo == replicaPtr.p->nextLcp);
ndbrequire(lcpNo < MAX_LCP_STORED);
@@ -10449,6 +10908,14 @@
/* ------------------------------------------------------------------------- */
void Dbdih::tableUpdateLab(Signal* signal, TabRecordPtr tabPtr) {
FileRecordPtr filePtr;
+ if(tabPtr.p->tabStorage == TabRecord::ST_TEMPORARY) {
+ // For temporary tables we do not write to disk. Mark both copies 0 and 1
+ // as done, and go straight to the after-close code.
+ filePtr.i = tabPtr.p->tabFile[1];
+ ptrCheckGuard(filePtr, cfileFileSize, fileRecord);
+ tableCloseLab(signal, filePtr);
+ return;
+ }
filePtr.i = tabPtr.p->tabFile[0];
ptrCheckGuard(filePtr, cfileFileSize, fileRecord);
createFileRw(signal, filePtr);
@@ -11067,6 +11534,7 @@
{
ConstPtr<ReplicaRecord> fblFoundReplicaPtr;
ConstPtr<ReplicaRecord> fblReplicaPtr;
+ LINT_INIT(fblFoundReplicaPtr.p);
/* --------------------------------------------------------------------- */
/* WE START WITH ZERO AS FOUND TO ENSURE THAT FIRST HIT WILL BE */
@@ -11309,6 +11777,7 @@
cnoHotSpare = 0;
cnoOfActiveTables = 0;
cnoOfNodeGroups = 0;
+ c_nextNodeGroup = 0;
cnoReplicas = 0;
coldgcp = 0;
coldGcpId = 0;
@@ -11328,6 +11797,7 @@
c_newest_restorable_gci = 0;
cverifyQueueCounter = 0;
cwaitLcpSr = false;
+ c_nextLogPart = 0;
nodeResetStart();
c_nodeStartMaster.wait = ZFALSE;
@@ -11335,7 +11805,7 @@
memset(&sysfileData[0], 0, sizeof(sysfileData));
const ndb_mgm_configuration_iterator * p =
- theConfiguration.getOwnConfigIterator();
+ m_ctx.m_config.getOwnConfigIterator();
ndbrequire(p != 0);
c_lcpState.clcpDelay = 20;
@@ -11414,6 +11884,8 @@
SYSFILE->takeOver[i] = 0;
}//for
Sysfile::setInitialStartOngoing(SYSFILE->systemRestartBits);
+ srand(time(0));
+ globalData.m_restart_seq = SYSFILE->m_restart_seq = 0;
}//Dbdih::initRestartInfo()
/*--------------------------------------------------------------------*/
@@ -11480,7 +11952,7 @@
tabPtr.p->kvalue = 0;
tabPtr.p->hashpointer = (Uint32)-1;
tabPtr.p->mask = 0;
- tabPtr.p->storedTable = 1;
+ tabPtr.p->tabStorage = TabRecord::ST_NORMAL;
tabPtr.p->tabErrorCode = 0;
tabPtr.p->schemaVersion = (Uint32)-1;
tabPtr.p->tabRemoveNode = RNIL;
@@ -12164,6 +12636,8 @@
jam();
fragPtr.p->distributionKey = TdistKey;
}//if
+
+ fragPtr.p->m_log_part_id = readPageWord(rf);
}//Dbdih::readFragment()
Uint32 Dbdih::readPageWord(RWFragment* rf)
@@ -13260,6 +13734,7 @@
writePageWord(wf, fragPtr.p->noStoredReplicas);
writePageWord(wf, fragPtr.p->noOldStoredReplicas);
writePageWord(wf, fragPtr.p->distributionKey);
+ writePageWord(wf, fragPtr.p->m_log_part_id);
}//Dbdih::writeFragment()
void Dbdih::writePageWord(RWFragment* wf, Uint32 dataWord)
@@ -13326,7 +13801,7 @@
signal->theData[0] = filePtr.p->fileRef;
signal->theData[1] = reference();
signal->theData[2] = filePtr.i;
- signal->theData[3] = ZLIST_OF_PAIRS;
+ signal->theData[3] = ZLIST_OF_PAIRS_SYNCH;
signal->theData[4] = ZVAR_NO_WORD;
signal->theData[5] = tab->noPages;
for (Uint32 i = 0; i < tab->noPages; i++) {
@@ -13689,7 +14164,7 @@
if (signal->getLength() == 1)
{
const ndb_mgm_configuration_iterator * p =
- theConfiguration.getOwnConfigIterator();
+ m_ctx.m_config.getOwnConfigIterator();
ndbrequire(p != 0);
ndb_mgm_get_int_parameter(p, CFG_DB_GCP_INTERVAL, &cgcpDelay);
}
@@ -14814,13 +15289,14 @@
{
Uint32 masterVersion = getNodeInfo(cmasterNodeId).m_version;
- unsigned int get_major = getMajor(masterVersion);
- unsigned int get_minor = getMinor(masterVersion);
- unsigned int get_build = getBuild(masterVersion);
-
- ndbrequire(get_major == 4 || get_major == 5);
+ const unsigned int get_major = getMajor(masterVersion);
+ const unsigned int get_minor = getMinor(masterVersion);
+ const unsigned int get_build = getBuild(masterVersion);
+ ndbrequire(get_major >= 4);
if (masterVersion < NDBD_DICT_LOCK_VERSION_5 ||
+ masterVersion < NDBD_DICT_LOCK_VERSION_5_1 &&
+ get_major == 5 && get_minor == 1 ||
ERROR_INSERTED(7176)) {
jam();
@@ -14891,10 +15367,13 @@
{
Uint32 masterVersion = getNodeInfo(cmasterNodeId).m_version;
- unsigned int get_major = getMajor(masterVersion);
- ndbrequire(get_major == 4 || get_major == 5);
+ const unsigned int get_major = getMajor(masterVersion);
+ const unsigned int get_minor = getMinor(masterVersion);
+ ndbrequire(get_major >= 4);
if (masterVersion < NDBD_DICT_LOCK_VERSION_5 ||
+ masterVersion < NDBD_DICT_LOCK_VERSION_5_1 &&
+ get_major == 5 && get_minor == 1 ||
ERROR_INSERTED(7176)) {
return;
}
--- 1.26.12.1/ndb/src/kernel/blocks/dbtc/Dbtc.hpp 2007-01-05 21:33:32 +07:00
+++ 1.46/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp 2007-01-23 07:18:03 +07:00
@@ -387,6 +387,13 @@
Uint32 fireingOperation;
/**
+ * The fragment id of the firing operation. This will be appended
+ * to the Primary Key such that the record can be found even in the
+ * case of user defined partitioning.
+ */
+ Uint32 fragId;
+
+ /**
* Used for scrapping in case of node failure
*/
Uint32 nodeId;
@@ -524,7 +531,7 @@
/**
* The list of defined indexes
*/
- ArrayList<TcIndexData> c_theIndexes;
+ DLList<TcIndexData> c_theIndexes;
UintR c_maxNumberOfIndexes;
struct TcIndexOperation {
@@ -730,7 +737,7 @@
UintR accumulatingIndexOp;
UintR executingIndexOp;
UintR tcIndxSendArray[6];
- ArrayList<TcIndexOperation> theSeizedIndexOperations;
+ DLList<TcIndexOperation> theSeizedIndexOperations;
};
typedef Ptr<ApiConnectRecord> ApiConnectRecordPtr;
@@ -865,7 +872,7 @@
Uint8 distributionKeyIndicator;
Uint8 m_special_hash; // collation or distribution key
- Uint8 unused2;
+ Uint8 m_no_disk_flag;
Uint8 lenAiInTckeyreq; /* LENGTH OF ATTRIBUTE INFORMATION IN TCKEYREQ */
Uint8 fragmentDistributionKey; /* DIH generation no */
@@ -876,11 +883,7 @@
*/
Uint8 opExec;
- /**
- * LOCK TYPE OF OPERATION IF READ OPERATION
- * 0 = READ LOCK, 1 = WRITE LOCK
- */
- Uint8 opLock;
+ Uint8 unused;
/**
* IS THE OPERATION A SIMPLE TRANSACTION
@@ -940,8 +943,7 @@
NF_CHECK_SCAN = 0x2,
NF_CHECK_TRANSACTION = 0x4,
NF_CHECK_DROP_TAB = 0x8,
- NF_NODE_FAIL_BITS = 0xF, // All bits...
- NF_STARTED = 0x10
+ NF_NODE_FAIL_BITS = 0xF // All bits...
};
Uint32 m_nf_bits;
NdbNodeBitmask m_lqh_trans_conf;
@@ -965,7 +967,8 @@
Uint8 noOfKeyAttr;
Uint8 hasCharAttr;
Uint8 noOfDistrKeys;
-
+ Uint8 hasVarKeys;
+
bool checkTable(Uint32 schemaVersion) const {
return enabled && !dropping &&
(table_version_major(schemaVersion) == table_version_major(currentSchemaVersion));
@@ -1260,7 +1263,7 @@
typedef Ptr<TcFailRecord> TcFailRecordPtr;
public:
- Dbtc(const class Configuration &);
+ Dbtc(Block_context&);
virtual ~Dbtc();
private:
@@ -1280,7 +1283,7 @@
void execLQHKEYREF(Signal* signal);
void execTRANSID_AI_R(Signal* signal);
void execKEYINFO20_R(Signal* signal);
-
+ void execROUTE_ORD(Signal* signal);
// Received signals
void execDUMP_STATE_ORD(Signal* signal);
void execSEND_PACKED(Signal* signal);
@@ -1318,7 +1321,6 @@
void execCOMMITCONF(Signal* signal);
void execABORTCONF(Signal* signal);
void execNODE_FAILREP(Signal* signal);
- void execNODE_START_REP(Signal* signal);
void execINCL_NODEREQ(Signal* signal);
void execTIME_SIGNAL(Signal* signal);
void execAPI_FAILREQ(Signal* signal);
--- 1.3.10.1/ndb/src/kernel/blocks/qmgr/Qmgr.hpp 2007-01-12 03:12:09 +07:00
+++ 1.18/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp 2007-01-23 07:18:03 +07:00
@@ -28,6 +28,10 @@
#include <signaldata/CmRegSignalData.hpp>
#include <signaldata/ApiRegSignalData.hpp>
#include <signaldata/FailRep.hpp>
+#include <signaldata/AllocNodeId.hpp>
+
+#include <SafeCounter.hpp>
+#include <RequestTracker.hpp>
#include <signaldata/StopReq.hpp>
#include "timer.hpp"
@@ -201,7 +205,7 @@
};
public:
- Qmgr(const class Configuration &);
+ Qmgr(Block_context&);
virtual ~Qmgr();
private:
@@ -243,6 +247,7 @@
void execAPI_FAILCONF(Signal* signal);
void execREAD_NODESREQ(Signal* signal);
void execSET_VAR_REQ(Signal* signal);
+ void execAPI_FAILREQ(Signal* signal);
void execREAD_NODESREF(Signal* signal);
void execREAD_NODESCONF(Signal* signal);
@@ -253,6 +258,12 @@
void execAPI_VERSION_REQ(Signal* signal);
void execAPI_BROADCAST_REP(Signal* signal);
+ void execNODE_FAILREP(Signal *);
+ void execALLOC_NODEID_REQ(Signal *);
+ void execALLOC_NODEID_CONF(Signal *);
+ void execALLOC_NODEID_REF(Signal *);
+ void completeAllocNodeIdReq(Signal *);
+
// Arbitration signals
void execARBIT_CFG(Signal* signal);
void execARBIT_PREPREQ(Signal* signal);
@@ -423,12 +434,32 @@
Uint16 cprepFailedNodes[MAX_NDB_NODES];
Uint16 ccommitFailedNodes[MAX_NDB_NODES];
+ struct OpAllocNodeIdReq {
+ RequestTracker m_tracker;
+ AllocNodeIdReq m_req;
+ Uint32 m_connectCount;
+ Uint32 m_error;
+ };
+
+ struct OpAllocNodeIdReq opAllocNodeIdReq;
+
StopReq c_stopReq;
bool check_multi_node_shutdown(Signal* signal);
#ifdef ERROR_INSERT
Uint32 c_error_insert_extra;
#endif
+
+ void recompute_version_info(Uint32 type);
+ void recompute_version_info(Uint32 type, Uint32 version);
+ void execNODE_VERSION_REP(Signal* signal);
+ void sendApiVersionRep(Signal* signal, NodeRecPtr nodePtr);
+ void sendVersionedDb(NodeReceiverGroup rg,
+ GlobalSignalNumber gsn,
+ Signal* signal,
+ Uint32 length,
+ JobBufferLevel jbuf,
+ Uint32 minversion);
};
#endif
--- 1.13.27.1/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2007-01-12 03:12:09 +07:00
+++ 1.48/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2007-01-23 07:18:03 +07:00
@@ -228,7 +228,7 @@
Uint32 senderData = req->senderData;
const ndb_mgm_configuration_iterator * p =
- theConfiguration.getOwnConfigIterator();
+ m_ctx.m_config.getOwnConfigIterator();
ndbrequire(p != 0);
ReadConfigConf * conf = (ReadConfigConf*)signal->getDataPtrSend();
@@ -259,6 +259,9 @@
case 1:
initData(signal);
startphase1(signal);
+ recompute_version_info(NodeInfo::DB);
+ recompute_version_info(NodeInfo::API);
+ recompute_version_info(NodeInfo::MGM);
return;
case 7:
cactivateApiCheck = 1;
@@ -764,6 +767,7 @@
*/
UintR TdynId = ++c_maxDynamicId;
setNodeInfo(addNodePtr.i).m_version = startingVersion;
+ recompute_version_info(NodeInfo::DB, startingVersion);
addNodePtr.p->ndynamicId = TdynId;
/**
@@ -862,7 +866,7 @@
ptrCheckGuard(myNodePtr, MAX_NDB_NODES, nodeRec);
ndbrequire(c_start.m_gsn == GSN_CM_REGREQ);
- ndbrequire(myNodePtr.p->phase = ZSTARTING);
+ ndbrequire(myNodePtr.p->phase == ZSTARTING);
cpdistref = cmRegConf->presidentBlockRef;
cpresident = cmRegConf->presidentNodeId;
@@ -1502,7 +1506,8 @@
replyNodePtr.p->ndynamicId = dynamicId;
replyNodePtr.p->blockRef = signal->getSendersBlockRef();
setNodeInfo(replyNodePtr.i).m_version = version;
-
+ recompute_version_info(NodeInfo::DB, version);
+
if(!c_start.m_nodes.done()){
jam();
return;
@@ -1601,6 +1606,7 @@
}
sendCmAckAdd(signal, nodePtr.i, CmAdd::Prepare);
+ sendApiVersionRep(signal, nodePtr);
/* President have prepared us */
CmNodeInfoConf * conf = (CmNodeInfoConf*)signal->getDataPtrSend();
@@ -1613,6 +1619,29 @@
}
void
+Qmgr::sendApiVersionRep(Signal* signal, NodeRecPtr nodePtr)
+{
+ if (getNodeInfo(nodePtr.i).m_version >= NDBD_NODE_VERSION_REP)
+ {
+ jam();
+ Uint32 ref = calcQmgrBlockRef(nodePtr.i);
+ for(Uint32 i = 1; i<MAX_NODES; i++)
+ {
+ jam();
+ Uint32 version = getNodeInfo(i).m_version;
+ Uint32 type = getNodeInfo(i).m_type;
+ if (type != NodeInfo::DB && version)
+ {
+ jam();
+ signal->theData[0] = i;
+ signal->theData[1] = version;
+ sendSignal(ref, GSN_NODE_VERSION_REP, signal, 2, JBB);
+ }
+ }
+ }
+}
+
+void
Qmgr::sendCmAckAdd(Signal * signal, Uint32 nodeId, CmAdd::RequestType type){
CmAckAdd * cmAckAdd = (CmAckAdd*)signal->getDataPtrSend();
@@ -2054,7 +2083,7 @@
* Timeouts
*/
const ndb_mgm_configuration_iterator * p =
- theConfiguration.getOwnConfigIterator();
+ m_ctx.m_config.getOwnConfigIterator();
ndbrequire(p != 0);
Uint32 hbDBDB = 1500;
@@ -2103,7 +2132,7 @@
sd->ticket.clear();
sd->mask.clear();
ndb_mgm_configuration_iterator * iter =
- theConfiguration.getClusterConfigIterator();
+ m_ctx.m_config.getClusterConfigIterator();
for (ndb_mgm_first(iter); ndb_mgm_valid(iter); ndb_mgm_next(iter)) {
Uint32 tmp = 0;
if (ndb_mgm_get_int_parameter(iter, CFG_NODE_ARBIT_RANK, &tmp) == 0 &&
@@ -2387,8 +2416,11 @@
ndbrequire(failedNodePtr.p->failState == NORMAL);
failedNodePtr.p->failState = WAITING_FOR_FAILCONF1;
+ NodeReceiverGroup rg(QMGR, c_clusterNodes);
+ sendSignal(rg, GSN_API_FAILREQ, signal, 2, JBA);
sendSignal(DBTC_REF, GSN_API_FAILREQ, signal, 2, JBA);
sendSignal(DBDICT_REF, GSN_API_FAILREQ, signal, 2, JBA);
+ sendSignal(SUMA_REF, GSN_API_FAILREQ, signal, 2, JBA);
/**-------------------------------------------------------------------------
* THE OTHER NODE WAS AN API NODE. THE COMMUNICATION LINK IS ALREADY
@@ -2397,7 +2429,9 @@
* SECONDS.
*-------------------------------------------------------------------------*/
setNodeInfo(failedNodePtr.i).m_heartbeat_cnt= 0;
-
+ setNodeInfo(failedNodePtr.i).m_version = 0;
+ recompute_version_info(getNodeInfo(failedNodePtr.i).m_type);
+
CloseComReqConf * const closeCom = (CloseComReqConf *)&signal->theData[0];
closeCom->xxxBlockRef = reference();
@@ -2409,6 +2443,32 @@
CloseComReqConf::SignalLength, JBA);
}//Qmgr::sendApiFailReq()
+void Qmgr::execAPI_FAILREQ(Signal* signal)
+{
+ jamEntry();
+ NodeRecPtr failedNodePtr;
+ failedNodePtr.i = signal->theData[0];
+ // signal->theData[1] == QMGR_REF
+ ptrCheckGuard(failedNodePtr, MAX_NODES, nodeRec);
+
+ ndbrequire(getNodeInfo(failedNodePtr.i).getType() != NodeInfo::DB);
+
+ // ignore if api not active
+ if (failedNodePtr.p->phase != ZAPI_ACTIVE)
+ {
+ jam();
+ // But send to SUMA anyway...
+ sendSignal(SUMA_REF, GSN_API_FAILREQ, signal, 2, JBA);
+ return;
+ }
+
+ signal->theData[0] = NDB_LE_Disconnected;
+ signal->theData[1] = failedNodePtr.i;
+ sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
+
+ node_failed(signal, failedNodePtr.i);
+}
+
void Qmgr::execAPI_FAILCONF(Signal* signal)
{
NodeRecPtr failedNodePtr;
@@ -2659,9 +2719,6 @@
case NodeInfo::MGM:
compatability_check = ndbCompatible_ndb_mgmt(NDB_VERSION, version);
break;
- case NodeInfo::REP:
- // compatability_check = ndbCompatible_ndb_api(NDB_VERSION, version);
- // break;
case NodeInfo::DB:
case NodeInfo::INVALID:
default:
@@ -2685,14 +2742,13 @@
}
setNodeInfo(apiNodePtr.i).m_version = version;
-
setNodeInfo(apiNodePtr.i).m_heartbeat_cnt= 0;
ApiRegConf * const apiRegConf = (ApiRegConf *)&signal->theData[0];
apiRegConf->qmgrRef = reference();
apiRegConf->apiHeartbeatFrequency = (chbApiDelay / 10);
apiRegConf->version = NDB_VERSION;
- apiRegConf->nodeState = getNodeState();
+ NodeState state= apiRegConf->nodeState = getNodeState();
{
NodeRecPtr nodePtr;
nodePtr.i = getOwnNodeId();
@@ -2706,13 +2762,17 @@
apiRegConf->nodeState.dynamicId = -dynamicId;
}
}
+ NodeVersionInfo info = getNodeVersionInfo();
+ apiRegConf->minDbVersion = info.m_type[NodeInfo::DB].m_min_version;
apiRegConf->nodeState.m_connected_nodes.assign(c_connectedNodes);
-
sendSignal(ref, GSN_API_REGCONF, signal, ApiRegConf::SignalLength, JBB);
- if ((getNodeState().startLevel == NodeState::SL_STARTED ||
- getNodeState().getSingleUserMode())
- && apiNodePtr.p->phase == ZAPI_INACTIVE) {
+ if (apiNodePtr.p->phase == ZAPI_INACTIVE &&
+ (state.startLevel == NodeState::SL_STARTED ||
+ state.getSingleUserMode() ||
+ (state.startLevel == NodeState::SL_STARTING &&
+ state.starting.startPhase >= 100)))
+ {
jam();
/**----------------------------------------------------------------------
* THE API NODE IS REGISTERING. WE WILL ACCEPT IT BY CHANGING STATE AND
@@ -2722,10 +2782,55 @@
apiNodePtr.p->blockRef = ref;
signal->theData[0] = apiNodePtr.i;
sendSignal(CMVMI_REF, GSN_ENABLE_COMORD, signal, 1, JBA);
+
+ recompute_version_info(type, version);
+
+ signal->theData[0] = apiNodePtr.i;
+ signal->theData[1] = version;
+ NodeReceiverGroup rg(QMGR, c_clusterNodes);
+ rg.m_nodes.clear(getOwnNodeId());
+ sendVersionedDb(rg, GSN_NODE_VERSION_REP, signal, 2, JBB,
+ NDBD_NODE_VERSION_REP);
+
+ signal->theData[0] = apiNodePtr.i;
+ EXECUTE_DIRECT(NDBCNTR, GSN_API_START_REP, signal, 1);
}
return;
}//Qmgr::execAPI_REGREQ()
+void
+Qmgr::sendVersionedDb(NodeReceiverGroup rg,
+ GlobalSignalNumber gsn,
+ Signal* signal,
+ Uint32 length,
+ JobBufferLevel jbuf,
+ Uint32 minversion)
+{
+ jam();
+ NodeVersionInfo info = getNodeVersionInfo();
+ if (info.m_type[NodeInfo::DB].m_min_version >= minversion)
+ {
+ jam();
+ sendSignal(rg, gsn, signal, length, jbuf);
+ }
+ else
+ {
+ jam();
+ Uint32 i = 0, cnt = 0;
+ while((i = rg.m_nodes.find(i + 1)) != NodeBitmask::NotFound)
+ {
+ jam();
+ if (getNodeInfo(i).m_version >= minversion)
+ {
+ jam();
+ cnt++;
+ sendSignal(numberToRef(rg.m_block, i), gsn, signal, length, jbuf);
+ }
+ }
+ ndbassert((cnt == 0 && rg.m_nodes.count() == 0) ||
+ (cnt < rg.m_nodes.count()));
+ }
+}
void
Qmgr::execAPI_VERSION_REQ(Signal * signal) {
@@ -2755,6 +2860,76 @@
ApiVersionConf::SignalLength, JBB);
}
+void
+Qmgr::execNODE_VERSION_REP(Signal* signal)
+{
+ jamEntry();
+ Uint32 nodeId = signal->theData[0];
+ Uint32 version = signal->theData[1];
+
+ if (nodeId < MAX_NODES)
+ {
+ jam();
+ Uint32 type = getNodeInfo(nodeId).m_type;
+ setNodeInfo(nodeId).m_version = version;
+ recompute_version_info(type, version);
+ }
+}
+
+void
+Qmgr::recompute_version_info(Uint32 type, Uint32 version)
+{
+ NodeVersionInfo& info = setNodeVersionInfo();
+ switch(type){
+ case NodeInfo::DB:
+ case NodeInfo::API:
+ case NodeInfo::MGM:
+ break;
+ default:
+ return;
+ }
+
+ if (info.m_type[type].m_min_version == 0 ||
+ version < info.m_type[type].m_min_version)
+ info.m_type[type].m_min_version = version;
+ if (version > info.m_type[type].m_max_version)
+ info.m_type[type].m_max_version = version;
+}
+
+void
+Qmgr::recompute_version_info(Uint32 type)
+{
+ switch(type){
+ case NodeInfo::DB:
+ case NodeInfo::API:
+ case NodeInfo::MGM:
+ break;
+ default:
+ return;
+ }
+
+ Uint32 min = ~0, max = 0;
+ Uint32 cnt = type == NodeInfo::DB ? MAX_NDB_NODES : MAX_NODES;
+ for (Uint32 i = 1; i<cnt; i++)
+ {
+ if (getNodeInfo(i).m_type == type)
+ {
+ Uint32 version = getNodeInfo(i).m_version;
+
+ if (version)
+ {
+ if (version < min)
+ min = version;
+ if (version > max)
+ max = version;
+ }
+ }
+ }
+
+ NodeVersionInfo& info = setNodeVersionInfo();
+ info.m_type[type].m_min_version = min == ~(Uint32)0 ? 0 : min;
+ info.m_type[type].m_max_version = max;
+}
#if 0
bool
@@ -4831,6 +5006,178 @@
}
void
+Qmgr::execNODE_FAILREP(Signal * signal)
+{
+ jamEntry();
+ // make sure any distributed signals get acknowledged
+ // destructive of the signal
+ c_counterMgr.execNODE_FAILREP(signal);
+}
+
+void
+Qmgr::execALLOC_NODEID_REQ(Signal * signal)
+{
+ jamEntry();
+ const AllocNodeIdReq * req = (AllocNodeIdReq*)signal->getDataPtr();
+ Uint32 senderRef = req->senderRef;
+ Uint32 nodeId = req->nodeId;
+ Uint32 nodeType = req->nodeType;
+ Uint32 error = 0;
+
+ if (refToBlock(senderRef) != QMGR) // request from management server
+ {
+ /* master */
+
+ if (getOwnNodeId() != cpresident)
+ error = AllocNodeIdRef::NotMaster;
+ else if (!opAllocNodeIdReq.m_tracker.done())
+ error = AllocNodeIdRef::Busy;
+ else if (c_connectedNodes.get(nodeId))
+ error = AllocNodeIdRef::NodeConnected;
+
+ if (error)
+ {
+ jam();
+ AllocNodeIdRef * ref = (AllocNodeIdRef*)signal->getDataPtrSend();
+ ref->senderRef = reference();
+ ref->errorCode = error;
+ ref->masterRef = numberToRef(QMGR, cpresident);
+ sendSignal(senderRef, GSN_ALLOC_NODEID_REF, signal,
+ AllocNodeIdRef::SignalLength, JBB);
+ return;
+ }
+
+ if (ERROR_INSERTED(934) && nodeId != getOwnNodeId())
+ {
+ CRASH_INSERTION(934);
+ }
+
+ opAllocNodeIdReq.m_req = *req;
+ opAllocNodeIdReq.m_error = 0;
+ opAllocNodeIdReq.m_connectCount = getNodeInfo(refToNode(senderRef)).m_connectCount;
+
+ jam();
+ AllocNodeIdReq * req = (AllocNodeIdReq*)signal->getDataPtrSend();
+ req->senderRef = reference();
+ NodeReceiverGroup rg(QMGR, c_clusterNodes);
+ RequestTracker & p = opAllocNodeIdReq.m_tracker;
+ p.init<AllocNodeIdRef>(c_counterMgr, rg, GSN_ALLOC_NODEID_REF, 0);
+
+ sendSignal(rg, GSN_ALLOC_NODEID_REQ, signal,
+ AllocNodeIdReq::SignalLength, JBB);
+ return;
+ }
+
+ /* participant */
+
+ if (c_connectedNodes.get(nodeId))
+ error = AllocNodeIdRef::NodeConnected;
+ else
+ {
+ NodeRecPtr nodePtr;
+ nodePtr.i = nodeId;
+ ptrAss(nodePtr, nodeRec);
+ if (nodeType != getNodeInfo(nodeId).m_type)
+ error = AllocNodeIdRef::NodeTypeMismatch;
+ else if (nodePtr.p->failState != NORMAL)
+ error = AllocNodeIdRef::NodeFailureHandlingNotCompleted;
+ }
+
+ if (error)
+ {
+ AllocNodeIdRef * ref = (AllocNodeIdRef*)signal->getDataPtrSend();
+ ref->senderRef = reference();
+ ref->errorCode = error;
+ sendSignal(senderRef, GSN_ALLOC_NODEID_REF, signal,
+ AllocNodeIdRef::SignalLength, JBB);
+ return;
+ }
+
+ AllocNodeIdConf * conf = (AllocNodeIdConf*)signal->getDataPtrSend();
+ conf->senderRef = reference();
+ sendSignal(senderRef, GSN_ALLOC_NODEID_CONF, signal,
+ AllocNodeIdConf::SignalLength, JBB);
+}
+
+void
+Qmgr::execALLOC_NODEID_CONF(Signal * signal)
+{
+ /* master */
+
+ jamEntry();
+ const AllocNodeIdConf * conf = (AllocNodeIdConf*)signal->getDataPtr();
+ opAllocNodeIdReq.m_tracker.reportConf(c_counterMgr,
+ refToNode(conf->senderRef));
+ completeAllocNodeIdReq(signal);
+}
+
+
+void
+Qmgr::execALLOC_NODEID_REF(Signal * signal)
+{
+ /* master */
+
+ jamEntry();
+ const AllocNodeIdRef * ref = (AllocNodeIdRef*)signal->getDataPtr();
+ if (ref->errorCode == AllocNodeIdRef::NF_FakeErrorREF)
+ {
+ opAllocNodeIdReq.m_tracker.ignoreRef(c_counterMgr,
+ refToNode(ref->senderRef));
+ }
+ else
+ {
+ opAllocNodeIdReq.m_tracker.reportRef(c_counterMgr,
+ refToNode(ref->senderRef));
+ if (opAllocNodeIdReq.m_error == 0)
+ opAllocNodeIdReq.m_error = ref->errorCode;
+ }
+ completeAllocNodeIdReq(signal);
+}
+
+void
+Qmgr::completeAllocNodeIdReq(Signal *signal)
+{
+ /* master */
+
+ if (!opAllocNodeIdReq.m_tracker.done())
+ {
+ jam();
+ return;
+ }
+
+ if (opAllocNodeIdReq.m_connectCount !=
+ getNodeInfo(refToNode(opAllocNodeIdReq.m_req.senderRef)).m_connectCount)
+ {
+ // management server not same version as the original requester
+ jam();
+ return;
+ }
+
+ if (opAllocNodeIdReq.m_tracker.hasRef())
+ {
+ jam();
+ AllocNodeIdRef * ref = (AllocNodeIdRef*)signal->getDataPtrSend();
+ ref->senderRef = reference();
+ ref->senderData = opAllocNodeIdReq.m_req.senderData;
+ ref->nodeId = opAllocNodeIdReq.m_req.nodeId;
+ ref->errorCode = opAllocNodeIdReq.m_error;
+ ref->masterRef = numberToRef(QMGR, cpresident);
+ ndbassert(AllocNodeIdRef::SignalLength == 5);
+ sendSignal(opAllocNodeIdReq.m_req.senderRef, GSN_ALLOC_NODEID_REF, signal,
+ AllocNodeIdRef::SignalLength, JBB);
+ return;
+ }
+ jam();
+ AllocNodeIdConf * conf = (AllocNodeIdConf*)signal->getDataPtrSend();
+ conf->senderRef = reference();
+ conf->senderData = opAllocNodeIdReq.m_req.senderData;
+ conf->nodeId = opAllocNodeIdReq.m_req.nodeId;
+ ndbassert(AllocNodeIdConf::SignalLength == 3);
+ sendSignal(opAllocNodeIdReq.m_req.senderRef, GSN_ALLOC_NODEID_CONF, signal,
+ AllocNodeIdConf::SignalLength, JBB);
+}
+
+void
Qmgr::execSTOP_REQ(Signal* signal)
{
jamEntry();
@@ -4838,6 +5185,7 @@
if (c_stopReq.senderRef)
{
+ jam();
ndbrequire(NdbNodeBitmask::get(c_stopReq.nodes, getOwnNodeId()));
StopConf *conf = (StopConf*)signal->getDataPtrSend();
--- 1.39.13.1/ndb/src/kernel/vm/Configuration.cpp 2007-01-18 03:18:46 +07:00
+++ 1.56/storage/ndb/src/kernel/vm/Configuration.cpp 2007-01-23 07:18:03 +07:00
@@ -190,7 +190,7 @@
}
if (! (val > 0 && val < MAX_NDB_NODES))
{
- ndbout_c("Invalid nodeid specified in nowait-nodes: %d : %s",
+ ndbout_c("Invalid nodeid specified in nowait-nodes: %ld : %s",
val, _nowait_nodes);
exit(-1);
}
@@ -668,13 +668,9 @@
case NODE_TYPE_API:
noOfAPINodes++; // No of API processes
break;
- case NODE_TYPE_REP:
- break;
case NODE_TYPE_MGM:
noOfMGMNodes++; // No of MGM processes
break;
- case NODE_TYPE_EXT_REP:
- break;
default:
BaseString::snprintf(buf, sizeof(buf), "Unknown node type: %d", nodeType);
ERROR_SET(fatal, NDBD_EXIT_INVALID_CONFIG, msg, buf);
@@ -739,14 +735,14 @@
*/
// Can keep 65536 pages (= 0.5 GByte)
cfg.put(CFG_ACC_DIR_RANGE,
- 4 * NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
+ 2 * NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
cfg.put(CFG_ACC_DIR_ARRAY,
(noOfIndexPages >> 8) +
- 4 * NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
+ 2 * NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
cfg.put(CFG_ACC_FRAGMENT,
- 2 * NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
+ NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
/*-----------------------------------------------------------------------*/
// The extra operation records added are used by the scan and node
@@ -762,14 +758,11 @@
cfg.put(CFG_ACC_OVERFLOW_RECS,
noOfIndexPages +
- 2 * NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
+ NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
cfg.put(CFG_ACC_PAGE8,
noOfIndexPages + 32);
- cfg.put(CFG_ACC_ROOT_FRAG,
- NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
-
cfg.put(CFG_ACC_TABLE, noOfAccTables);
cfg.put(CFG_ACC_SCAN, noOfLocalScanRecords);
@@ -852,7 +845,7 @@
* Tup Size Alt values
*/
cfg.put(CFG_TUP_FRAG,
- 2 * NO_OF_FRAG_PER_NODE * noOfMetaTables* noOfReplicas);
+ NO_OF_FRAG_PER_NODE * noOfMetaTables* noOfReplicas);
cfg.put(CFG_TUP_OP_RECS,
noOfLocalOperations + 50);
@@ -861,14 +854,14 @@
noOfDataPages);
cfg.put(CFG_TUP_PAGE_RANGE,
- 4 * NO_OF_FRAG_PER_NODE * noOfMetaTables* noOfReplicas);
+ 2 * NO_OF_FRAG_PER_NODE * noOfMetaTables* noOfReplicas);
cfg.put(CFG_TUP_TABLE,
noOfMetaTables);
cfg.put(CFG_TUP_TABLE_DESC,
- 2 * 6 * NO_OF_FRAG_PER_NODE * noOfAttributes * noOfReplicas +
- 2 * 10 * NO_OF_FRAG_PER_NODE * noOfMetaTables * noOfReplicas );
+ 6 * NO_OF_FRAG_PER_NODE * noOfAttributes * noOfReplicas +
+ 10 * NO_OF_FRAG_PER_NODE * noOfMetaTables * noOfReplicas );
cfg.put(CFG_TUP_STORED_PROC,
noOfLocalScanRecords);
@@ -882,7 +875,7 @@
noOfMetaTables /*noOfOrderedIndexes*/);
cfg.put(CFG_TUX_FRAGMENT,
- 2 * NO_OF_FRAG_PER_NODE * noOfOrderedIndexes * noOfReplicas);
+ NO_OF_FRAG_PER_NODE * noOfOrderedIndexes * noOfReplicas);
cfg.put(CFG_TUX_ATTRIBUTE,
noOfOrderedIndexes * 4);
--- 1.13.16.1/ndb/test/ndbapi/testNodeRestart.cpp 2007-01-12 03:12:09 +07:00
+++ 1.38/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-01-23 07:18:03 +07:00
@@ -697,7 +697,10 @@
do {
int tmp = restarter.getRandomNodeOtherNodeGroup(node1, rand());
if (tmp == -1)
- break;
+ {
+ ctx->stopTest();
+ return NDBT_OK;
+ }
node1 = tmp;
} while(nodesmask.get(node1));
@@ -877,12 +880,15 @@
HugoOperations hugoOps(*ctx->getTab());
Ndb* pNdb = GETNDB(step);
+ const int masterNode = restarter.getMasterNodeId();
+
int dump[] = { 7090, 20 } ;
if (restarter.dumpStateAllNodes(dump, 2))
return NDBT_FAILED;
NdbSleep_MilliSleep(3000);
-
+
+retry:
if(hugoOps.startTransaction(pNdb) != 0)
return NDBT_FAILED;
@@ -892,8 +898,14 @@
if (hugoOps.execute_NoCommit(pNdb) != 0)
return NDBT_FAILED;
- int nodeId;
const int node = hugoOps.getTransaction()->getConnectedNodeId();
+ if (node != masterNode)
+ {
+ hugoOps.closeTransaction(pNdb);
+ goto retry;
+ }
+
+ int nodeId;
do {
nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
} while (nodeId == node);
@@ -990,7 +1002,129 @@
if (restarter.waitNodesStarted(nodes, 2))
return NDBT_FAILED;
}
+
+ return NDBT_OK;
+}
+
+int
+runBug21271(NDBT_Context* ctx, NDBT_Step* step){
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ NdbRestarter restarter;
+ HugoOperations hugoOps(*ctx->getTab());
+ Ndb* pNdb = GETNDB(step);
+
+ const int masterNode = restarter.getMasterNodeId();
+ const int nodeId = restarter.getRandomNodeSameNodeGroup(masterNode, rand());
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+ if (restarter.dumpStateOneNode(nodeId, val2, 2))
+ return NDBT_FAILED;
+
+ Uint32 tableId = ctx->getTab()->getTableId();
+ int dump[] = { DumpStateOrd::LqhErrorInsert5042, 0, 5044 };
+ dump[1] = tableId;
+
+ if (restarter.dumpStateOneNode(nodeId, dump, 3))
+ return NDBT_FAILED;
+
+ restarter.waitNodesNoStart(&nodeId, 1);
+ ctx->stopTest();
+
+ restarter.startNodes(&nodeId, 1);
+
+ if (restarter.waitClusterStarted() != 0)
+ return NDBT_FAILED;
+
+ return NDBT_OK;
+ return NDBT_OK;
+}
+
+int
+runBug24543(NDBT_Context* ctx, NDBT_Step* step){
+ NdbRestarter restarter;
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+ if (restarter.dumpStateAllNodes(val2, 2))
+ return NDBT_FAILED;
+
+ int nodes[2];
+ nodes[0] = restarter.getMasterNodeId();
+ restarter.insertErrorInNode(nodes[0], 934);
+
+ nodes[1] = restarter.getRandomNodeOtherNodeGroup(nodes[0], rand());
+ if (nodes[1] == -1)
+ {
+ nodes[1] = restarter.getRandomNodeSameNodeGroup(nodes[0], rand());
+ }
+ restarter.restartOneDbNode(nodes[1], false, true, true);
+ if (restarter.waitNodesNoStart(nodes, 2))
+ return NDBT_FAILED;
+
+ restarter.startNodes(nodes, 2);
+ if (restarter.waitNodesStarted(nodes, 2))
+ {
+ return NDBT_FAILED;
+ }
+ return NDBT_OK;
+}
+
+int runBug25468(NDBT_Context* ctx, NDBT_Step* step){
+
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ NdbRestarter restarter;
+
+ for (int i = 0; i<loops; i++)
+ {
+ int master = restarter.getMasterNodeId();
+ int node1, node2;
+ switch(i % 5){
+ case 0:
+ node1 = master;
+ node2 = restarter.getRandomNodeSameNodeGroup(master, rand());
+ break;
+ case 1:
+ node1 = restarter.getRandomNodeSameNodeGroup(master, rand());
+ node2 = master;
+ break;
+ case 2:
+ case 3:
+ case 4:
+ node1 = restarter.getRandomNodeOtherNodeGroup(master, rand());
+ if (node1 == -1)
+ node1 = master;
+ node2 = restarter.getRandomNodeSameNodeGroup(node1, rand());
+ break;
+ }
+
+ ndbout_c("node1: %d node2: %d master: %d", node1, node2, master);
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+
+ if (restarter.dumpStateOneNode(node2, val2, 2))
+ return NDBT_FAILED;
+
+ if (restarter.insertErrorInNode(node1, 7178))
+ return NDBT_FAILED;
+
+ int val1 = 7099;
+ if (restarter.dumpStateOneNode(master, &val1, 1))
+ return NDBT_FAILED;
+
+ if (restarter.waitNodesNoStart(&node2, 1))
+ return NDBT_FAILED;
+
+ if (restarter.startAll())
+ return NDBT_FAILED;
+
+ if (restarter.waitClusterStarted())
+ return NDBT_FAILED;
+ }
+
return NDBT_OK;
}
@@ -1357,11 +1491,25 @@
STEP(runBug20185);
FINALIZER(runClearTable);
}
+TESTCASE("Bug24543", "")
+{
+ INITIALIZER(runBug24543);
+}
+TESTCASE("Bug21271",
+ ""){
+ INITIALIZER(runLoadTable);
+ STEP(runBug21271);
+ STEP(runPkUpdateUntilStopped);
+ FINALIZER(runClearTable);
+}
TESTCASE("Bug24717", ""){
INITIALIZER(runBug24717);
}
TESTCASE("Bug25364", ""){
INITIALIZER(runBug25364);
+}
+TESTCASE("Bug25468", ""){
+ INITIALIZER(runBug25468);
}
TESTCASE("Bug25554", ""){
INITIALIZER(runBug25554);
--- 1.393/sql/ha_ndbcluster.cc 2007-01-18 19:20:30 +07:00
+++ 1.394/sql/ha_ndbcluster.cc 2007-01-23 07:18:01 +07:00
@@ -3701,20 +3701,26 @@
size_t len = key_part->length;
const byte * ptr = record + key_part->offset;
Field *field = key_part->field;
- if ((field->type() == MYSQL_TYPE_VARCHAR) &&
- ((Field_varstring*)field)->length_bytes == 1)
+ if (field->type() == MYSQL_TYPE_VARCHAR)
{
- /**
- * Keys always use 2 bytes length
- */
- buff[0] = ptr[0];
- buff[1] = 0;
- memcpy(buff+2, ptr + 1, len);
- len += 2;
+ if (((Field_varstring*)field)->length_bytes == 1)
+ {
+ /**
+ * Keys always use 2 bytes length
+ */
+ buff[0] = ptr[0];
+ buff[1] = 0;
+ memcpy(buff+2, ptr + 1, len);
+ }
+ else
+ {
+ memcpy(buff, ptr, len + 2);
+ }
+ len += 2;
}
else
{
- memcpy(buff, ptr, len);
+ memcpy(buff, ptr, len);
}
buff += len;
}
--- 1.30.37.1/ndb/src/ndbapi/ndberror.c 2007-01-05 21:33:32 +07:00
+++ 1.82/storage/ndb/src/ndbapi/ndberror.c 2007-01-23 07:25:17 +07:00
@@ -15,11 +15,13 @@
#include <ndb_global.h>
+#include <my_base.h>
#include <ndberror.h>
#include <m_string.h>
typedef struct ErrorBundle {
int code;
+ int mysql_code;
ndberror_classification classification;
const char * message;
} ErrorBundle;
@@ -56,6 +58,11 @@
#define OE ndberror_cl_schema_object_already_exists
+#define IT ndberror_cl_internal_temporary
+
+/* default mysql error code for unmapped codes */
+#define DMEC -1
+
static const char* empty_string = "";
/*
@@ -70,6 +77,10 @@
* 900 - TUX
* 1200 - LQH
* 1300 - BACKUP
+ * 1400 - SUMA
+ * 1500 - LGMAN
+ * 1600 - TSMAN
+ * 1700 - QMGR
* 4000 - API
* 4100 - ""
* 4200 - ""
@@ -87,442 +98,522 @@
/**
* No error
*/
- { 0, NE, "No error" },
+ { 0, 0, NE, "No error" },
/**
* NoDataFound
*/
- { 626, ND, "Tuple did not exist" },
+ { 626, HA_ERR_KEY_NOT_FOUND, ND, "Tuple did not exist" },
/**
* ConstraintViolation
*/
- { 630, CV, "Tuple already existed when attempting to insert" },
- { 840, CV, "Trying to set a NOT NULL attribute to NULL" },
- { 893, CV, "Constraint violation e.g. duplicate value in unique index" },
+ { 630, HA_ERR_FOUND_DUPP_KEY, CV, "Tuple already existed when attempting to insert" },
+ { 839, DMEC, CV, "Illegal null attribute" },
+ { 840, DMEC, CV, "Trying to set a NOT NULL attribute to NULL" },
+ { 893, HA_ERR_FOUND_DUPP_KEY, CV, "Constraint violation e.g. duplicate value in unique index" },
/**
* Node recovery errors
*/
- { 286, NR, "Node failure caused abort of transaction" },
- { 250, NR, "Node where lock was held crashed, restart scan transaction" },
- { 499, NR, "Scan take over error, restart scan transaction" },
- { 1204, NR, "Temporary failure, distribution changed" },
- { 4002, NR, "Send to NDB failed" },
- { 4010, NR, "Node failure caused abort of transaction" },
- { 4025, NR, "Node failure caused abort of transaction" },
- { 4027, NR, "Node failure caused abort of transaction" },
- { 4028, NR, "Node failure caused abort of transaction" },
- { 4029, NR, "Node failure caused abort of transaction" },
- { 4031, NR, "Node failure caused abort of transaction" },
- { 4033, NR, "Send to NDB failed" },
- { 4115, NR,
+ { 286, DMEC, NR, "Node failure caused abort of transaction" },
+ { 250, DMEC, NR, "Node where lock was held crashed, restart scan transaction" },
+ { 499, DMEC, NR, "Scan take over error, restart scan transaction" },
+ { 1204, DMEC, NR, "Temporary failure, distribution changed" },
+ { 4002, DMEC, NR, "Send to NDB failed" },
+ { 4010, DMEC, NR, "Node failure caused abort of transaction" },
+ { 4025, DMEC, NR, "Node failure caused abort of transaction" },
+ { 4027, DMEC, NR, "Node failure caused abort of transaction" },
+ { 4028, DMEC, NR, "Node failure caused abort of transaction" },
+ { 4029, DMEC, NR, "Node failure caused abort of transaction" },
+ { 4031, DMEC, NR, "Node failure caused abort of transaction" },
+ { 4033, DMEC, NR, "Send to NDB failed" },
+ { 4115, DMEC, NR,
"Transaction was committed but all read information was not "
"received due to node crash" },
- { 4119, NR, "Simple/dirty read failed due to node failure" },
+ { 4119, DMEC, NR, "Simple/dirty read failed due to node failure" },
/**
* Node shutdown
*/
- { 280, NS, "Transaction aborted due to node shutdown" },
+ { 280, DMEC, NS, "Transaction aborted due to node shutdown" },
/* This scan trans had an active fragment scan in a LQH which have crashed */
- { 270, NS, "Transaction aborted due to node shutdown" },
- { 1223, NS, "Read operation aborted due to node shutdown" },
- { 4023, NS, "Transaction aborted due to node shutdown" },
- { 4030, NS, "Transaction aborted due to node shutdown" },
- { 4034, NS, "Transaction aborted due to node shutdown" },
+ { 270, DMEC, NS, "Transaction aborted due to node shutdown" },
+ { 1223, DMEC, NS, "Read operation aborted due to node shutdown" },
+ { 4023, DMEC, NS, "Transaction aborted due to node shutdown" },
+ { 4030, DMEC, NS, "Transaction aborted due to node shutdown" },
+ { 4034, DMEC, NS, "Transaction aborted due to node shutdown" },
/**
* Unknown result
*/
- { 4008, UR, "Receive from NDB failed" },
- { 4009, UR, "Cluster Failure" },
- { 4012, UR,
+ { 4008, DMEC, UR, "Receive from NDB failed" },
+ { 4009, DMEC, UR, "Cluster Failure" },
+ { 4012, DMEC, UR,
"Request ndbd time-out, maybe due to high load or communication problems"},
- { 4024, UR,
+ { 4024, DMEC, UR,
"Time-out, most likely caused by simple read or cluster failure" },
/**
* TemporaryResourceError
*/
- { 217, TR, "217" },
- { 218, TR, "218" },
- { 219, TR, "219" },
- { 233, TR,
+ { 217, DMEC, TR, "217" },
+ { 218, DMEC, TR, "218" },
+ { 219, DMEC, TR, "219" },
+ { 233, DMEC, TR,
"Out of operation records in transaction coordinator (increase MaxNoOfConcurrentOperations)" },
- { 275, TR, "275" },
- { 279, TR, "Out of transaction markers in transaction coordinator" },
- { 414, TR, "414" },
- { 418, TR, "Out of transaction buffers in LQH" },
- { 419, TR, "419" },
- { 245, TR, "Too many active scans" },
- { 488, TR, "Too many active scans" },
- { 490, TR, "Too many active scans" },
- { 805, TR, "Out of attrinfo records in tuple manager" },
- { 830, TR, "Out of add fragment operation records" },
- { 873, TR, "Out of attrinfo records for scan in tuple manager" },
- { 1217, TR, "Out of operation records in local data manager (increase MaxNoOfLocalOperations)" },
- { 1220, TR, "REDO log files overloaded, consult online manual (decrease TimeBetweenLocalCheckpoints, and|or increase NoOfFragmentLogFiles)" },
- { 1222, TR, "Out of transaction markers in LQH" },
- { 1224, TR, "Out of Send Buffer space in LQH" },
- { 4021, TR, "Out of Send Buffer space in NDB API" },
- { 4022, TR, "Out of Send Buffer space in NDB API" },
- { 4032, TR, "Out of Send Buffer space in NDB API" },
- { 288, TR, "Out of index operations in transaction coordinator (increase MaxNoOfConcurrentIndexOperations)" },
+ { 275, DMEC, TR, "275" },
+ { 279, DMEC, TR, "Out of transaction markers in transaction coordinator" },
+ { 414, DMEC, TR, "414" },
+ { 418, DMEC, TR, "Out of transaction buffers in LQH" },
+ { 419, DMEC, TR, "419" },
+ { 245, DMEC, TR, "Too many active scans" },
+ { 488, DMEC, TR, "Too many active scans" },
+ { 490, DMEC, TR, "Too many active scans" },
+ { 805, DMEC, TR, "Out of attrinfo records in tuple manager" },
+ { 830, DMEC, TR, "Out of add fragment operation records" },
+ { 873, DMEC, TR, "Out of attrinfo records for scan in tuple manager" },
+ { 899, DMEC, TR, "Rowid already allocated" },
+ { 1217, DMEC, TR, "Out of operation records in local data manager (increase MaxNoOfLocalOperations)" },
+ { 1220, DMEC, TR, "REDO log files overloaded, consult online manual (decrease TimeBetweenLocalCheckpoints, and|or increase NoOfFragmentLogFiles)" },
+ { 1222, DMEC, TR, "Out of transaction markers in LQH" },
+ { 4021, DMEC, TR, "Out of Send Buffer space in NDB API" },
+ { 4022, DMEC, TR, "Out of Send Buffer space in NDB API" },
+ { 4032, DMEC, TR, "Out of Send Buffer space in NDB API" },
+ { 1501, DMEC, TR, "Out of undo space" },
+ { 288, DMEC, TR, "Out of index operations in transaction coordinator (increase MaxNoOfConcurrentIndexOperations)" },
+
/**
* InsufficientSpace
*/
- { 623, IS, "623" },
- { 624, IS, "624" },
- { 625, IS, "Out of memory in Ndb Kernel, hash index part (increase IndexMemory)" },
- { 640, IS, "Too many hash indexes (should not happen)" },
- { 826, IS, "Too many tables and attributes (increase MaxNoOfAttributes or MaxNoOfTables)" },
- { 827, IS, "Out of memory in Ndb Kernel, table data (increase DataMemory)" },
- { 902, IS, "Out of memory in Ndb Kernel, ordered index data (increase DataMemory)" },
- { 903, IS, "Too many ordered indexes (increase MaxNoOfOrderedIndexes)" },
- { 904, IS, "Out of fragment records (increase MaxNoOfOrderedIndexes)" },
- { 905, IS, "Out of attribute records (increase MaxNoOfAttributes)" },
-
+ { 623, HA_ERR_RECORD_FILE_FULL, IS, "623" },
+ { 624, HA_ERR_RECORD_FILE_FULL, IS, "624" },
+ { 625, HA_ERR_INDEX_FILE_FULL, IS, "Out of memory in Ndb Kernel, hash index part (increase IndexMemory)" },
+ { 640, DMEC, IS, "Too many hash indexes (should not happen)" },
+ { 826, HA_ERR_RECORD_FILE_FULL, IS, "Too many tables and attributes (increase MaxNoOfAttributes or MaxNoOfTables)" },
+ { 827, HA_ERR_RECORD_FILE_FULL, IS, "Out of memory in Ndb Kernel, table data (increase DataMemory)" },
+ { 902, HA_ERR_RECORD_FILE_FULL, IS, "Out of memory in Ndb Kernel, ordered index data (increase DataMemory)" },
+ { 903, HA_ERR_INDEX_FILE_FULL, IS, "Too many ordered indexes (increase MaxNoOfOrderedIndexes)" },
+ { 904, HA_ERR_INDEX_FILE_FULL, IS, "Out of fragment records (increase MaxNoOfOrderedIndexes)" },
+ { 905, DMEC, IS, "Out of attribute records (increase MaxNoOfAttributes)" },
+ { 1601, HA_ERR_RECORD_FILE_FULL, IS, "Out extents, tablespace full" },
+
/**
* TimeoutExpired
*/
- { 266, TO, "Time-out in NDB, probably caused by deadlock" },
- { 274, TO, "Time-out in NDB, probably caused by deadlock" }, /* Scan trans timeout */
- { 296, TO, "Time-out in NDB, probably caused by deadlock" }, /* Scan trans timeout */
- { 297, TO, "Time-out in NDB, probably caused by deadlock" }, /* Scan trans timeout, temporary!! */
- { 237, TO, "Transaction had timed out when trying to commit it" },
+ { 266, HA_ERR_LOCK_WAIT_TIMEOUT, TO, "Time-out in NDB, probably caused by deadlock" },
+ { 274, HA_ERR_LOCK_WAIT_TIMEOUT, TO, "Time-out in NDB, probably caused by deadlock" }, /* Scan trans timeout */
+ { 296, HA_ERR_LOCK_WAIT_TIMEOUT, TO, "Time-out in NDB, probably caused by deadlock" }, /* Scan trans timeout */
+ { 297, HA_ERR_LOCK_WAIT_TIMEOUT, TO, "Time-out in NDB, probably caused by deadlock" }, /* Scan trans timeout, temporary!! */
+ { 237, HA_ERR_LOCK_WAIT_TIMEOUT, TO, "Transaction had timed out when trying to commit it" },
/**
* OverloadError
*/
- { 410, OL, "REDO log files overloaded, consult online manual (decrease TimeBetweenLocalCheckpoints, and|or increase NoOfFragmentLogFiles)" },
- { 677, OL, "Index UNDO buffers overloaded (increase UndoIndexBuffer)" },
- { 891, OL, "Data UNDO buffers overloaded (increase UndoDataBuffer)" },
- { 1221, OL, "REDO buffers overloaded, consult online manual (increase RedoBuffer)" },
- { 4006, OL, "Connect failure - out of connection objects (increase MaxNoOfConcurrentTransactions)" },
+ { 701, DMEC, OL, "System busy with other schema operation" },
+ { 711, DMEC, OL, "System busy with node restart, schema operations not allowed" },
+ { 410, DMEC, OL, "REDO log files overloaded, consult online manual (decrease TimeBetweenLocalCheckpoints, and|or increase NoOfFragmentLogFiles)" },
+ { 677, DMEC, OL, "Index UNDO buffers overloaded (increase UndoIndexBuffer)" },
+ { 891, DMEC, OL, "Data UNDO buffers overloaded (increase UndoDataBuffer)" },
+ { 1221, DMEC, OL, "REDO buffers overloaded, consult online manual (increase RedoBuffer)" },
+ { 4006, DMEC, OL, "Connect failure - out of connection objects (increase MaxNoOfConcurrentTransactions)" },
+ /*
+ * Internal Temporary
+ */
+ { 702, DMEC, IT, "Request to non-master" },
/**
* Internal errors
*/
- { 896, IE, "Tuple corrupted - wrong checksum or column data in invalid format" },
- { 901, IE, "Inconsistent ordered index. The index needs to be dropped and recreated" },
- { 202, IE, "202" },
- { 203, IE, "203" },
- { 207, IE, "207" },
- { 208, IE, "208" },
- { 209, IE, "Communication problem, signal error" },
- { 220, IE, "220" },
- { 230, IE, "230" },
- { 232, IE, "232" },
- { 238, IE, "238" },
- { 271, IE, "Simple Read transaction without any attributes to read" },
- { 272, IE, "Update operation without any attributes to update" },
- { 276, IE, "276" },
- { 277, IE, "277" },
- { 278, IE, "278" },
- { 287, IE, "Index corrupted" },
- { 290, IE, "Corrupt key in TC, unable to xfrm" },
- { 631, IE, "631" },
- { 632, IE, "632" },
- { 702, IE, "Request to non-master" },
- { 706, IE, "Inconsistency during table creation" },
- { 809, IE, "809" },
- { 812, IE, "812" },
- { 829, IE, "829" },
- { 833, IE, "833" },
- { 839, IE, "Illegal null attribute" },
- { 871, IE, "871" },
- { 882, IE, "882" },
- { 883, IE, "883" },
- { 887, IE, "887" },
- { 888, IE, "888" },
- { 890, IE, "890" },
- { 4000, IE, "MEMORY ALLOCATION ERROR" },
- { 4001, IE, "Signal Definition Error" },
- { 4005, IE, "Internal Error in NdbApi" },
- { 4011, IE, "Internal Error in NdbApi" },
- { 4107, IE, "Simple Transaction and Not Start" },
- { 4108, IE, "Faulty operation type" },
- { 4109, IE, "Faulty primary key attribute length" },
- { 4110, IE, "Faulty length in ATTRINFO signal" },
- { 4111, IE, "Status Error in NdbConnection" },
- { 4113, IE, "Too many operations received" },
- { 4320, IE, "Cannot use the same object twice to create table" },
- { 4321, IE, "Trying to start two schema transactions" },
- { 4344, IE, "Only DBDICT and TRIX can send requests to TRIX" },
- { 4345, IE, "TRIX block is not available yet, probably due to node failure" },
- { 4346, IE, "Internal error at index create/build" },
- { 4347, IE, "Bad state at alter index" },
- { 4348, IE, "Inconsistency detected at alter index" },
- { 4349, IE, "Inconsistency detected at index usage" },
- { 4350, IE, "Transaction already aborted" },
+ { 896, DMEC, IE, "Tuple corrupted - wrong checksum or column data in invalid format" },
+ { 901, DMEC, IE, "Inconsistent ordered index. The index needs to be dropped and recreated" },
+ { 202, DMEC, IE, "202" },
+ { 203, DMEC, IE, "203" },
+ { 207, DMEC, IE, "207" },
+ { 208, DMEC, IE, "208" },
+ { 209, DMEC, IE, "Communication problem, signal error" },
+ { 220, DMEC, IE, "220" },
+ { 230, DMEC, IE, "230" },
+ { 232, DMEC, IE, "232" },
+ { 238, DMEC, IE, "238" },
+ { 271, DMEC, IE, "Simple Read transaction without any attributes to read" },
+ { 272, DMEC, IE, "Update operation without any attributes to update" },
+ { 276, DMEC, IE, "276" },
+ { 277, DMEC, IE, "277" },
+ { 278, DMEC, IE, "278" },
+ { 287, DMEC, IE, "Index corrupted" },
+ { 290, DMEC, IE, "Corrupt key in TC, unable to xfrm" },
+ { 631, DMEC, IE, "631" },
+ { 632, DMEC, IE, "632" },
+ { 706, DMEC, IE, "Inconsistency during table creation" },
+ { 809, DMEC, IE, "809" },
+ { 812, DMEC, IE, "812" },
+ { 829, DMEC, IE, "829" },
+ { 833, DMEC, IE, "833" },
+ { 871, DMEC, IE, "871" },
+ { 882, DMEC, IE, "882" },
+ { 883, DMEC, IE, "883" },
+ { 887, DMEC, IE, "887" },
+ { 888, DMEC, IE, "888" },
+ { 890, DMEC, IE, "890" },
+ { 4000, DMEC, IE, "MEMORY ALLOCATION ERROR" },
+ { 4001, DMEC, IE, "Signal Definition Error" },
+ { 4005, DMEC, IE, "Internal Error in NdbApi" },
+ { 4011, DMEC, IE, "Internal Error in NdbApi" },
+ { 4107, DMEC, IE, "Simple Transaction and Not Start" },
+ { 4108, DMEC, IE, "Faulty operation type" },
+ { 4109, DMEC, IE, "Faulty primary key attribute length" },
+ { 4110, DMEC, IE, "Faulty length in ATTRINFO signal" },
+ { 4111, DMEC, IE, "Status Error in NdbConnection" },
+ { 4113, DMEC, IE, "Too many operations received" },
+ { 4320, DMEC, IE, "Cannot use the same object twice to create table" },
+ { 4321, DMEC, IE, "Trying to start two schema transactions" },
+ { 4344, DMEC, IE, "Only DBDICT and TRIX can send requests to TRIX" },
+ { 4345, DMEC, IE, "TRIX block is not available yet, probably due to node failure" },
+ { 4346, DMEC, IE, "Internal error at index create/build" },
+ { 4347, DMEC, IE, "Bad state at alter index" },
+ { 4348, DMEC, IE, "Inconsistency detected at alter index" },
+ { 4349, DMEC, IE, "Inconsistency detected at index usage" },
+ { 4350, DMEC, IE, "Transaction already aborted" },
/**
* Application error
*/
- { 763, AE, "Alter table requires cluster nodes to have exact same version" },
- { 823, AE, "Too much attrinfo from application in tuple manager" },
- { 831, AE, "Too many nullable/bitfields in table definition" },
- { 876, AE, "876" },
- { 877, AE, "877" },
- { 878, AE, "878" },
- { 879, AE, "879" },
- { 880, AE, "Tried to read too much - too many getValue calls" },
- { 884, AE, "Stack overflow in interpreter" },
- { 885, AE, "Stack underflow in interpreter" },
- { 886, AE, "More than 65535 instructions executed in interpreter" },
- { 897, AE, "Update attempt of primary key via ndbcluster internal api (if this occurs via the MySQL server it is a bug, please report)" },
- { 892, AE, "Unsupported type in scan filter" },
- { 4256, AE, "Must call Ndb::init() before this function" },
- { 4257, AE, "Tried to read too much - too many getValue calls" },
-
+ { 763, DMEC, AE, "Alter table requires cluster nodes to have exact same version" },
+ { 823, DMEC, AE, "Too much attrinfo from application in tuple manager" },
+ { 831, DMEC, AE, "Too many nullable/bitfields in table definition" },
+ { 876, DMEC, AE, "876" },
+ { 877, DMEC, AE, "877" },
+ { 878, DMEC, AE, "878" },
+ { 879, DMEC, AE, "879" },
+ { 880, DMEC, AE, "Tried to read too much - too many getValue calls" },
+ { 884, DMEC, AE, "Stack overflow in interpreter" },
+ { 885, DMEC, AE, "Stack underflow in interpreter" },
+ { 886, DMEC, AE, "More than 65535 instructions executed in interpreter" },
+ { 897, DMEC, AE, "Update attempt of primary key via ndbcluster internal api (if this occurs via the MySQL server it is a bug, please report)" },
+ { 892, DMEC, AE, "Unsupported type in scan filter" },
+ { 4256, DMEC, AE, "Must call Ndb::init() before this function" },
+ { 4257, DMEC, AE, "Tried to read too much - too many getValue calls" },
+
/**
* Scan application errors
*/
- { 242, AE, "Zero concurrency in scan"},
- { 244, AE, "Too high concurrency in scan"},
- { 269, AE, "No condition and attributes to read in scan"},
- { 4600, AE, "Transaction is already started"},
- { 4601, AE, "Transaction is not started"},
- { 4602, AE, "You must call getNdbOperation before executeScan" },
- { 4603, AE, "There can only be ONE operation in a scan transaction" },
- { 4604, AE, "takeOverScanOp, to take over a scanned row one must explicitly request keyinfo in readTuples call" },
- { 4605, AE, "You may only call openScanRead or openScanExclusive once for each operation"},
- { 4607, AE, "There may only be one operation in a scan transaction"},
- { 4608, AE, "You can not takeOverScan unless you have used openScanExclusive"},
- { 4609, AE, "You must call nextScanResult before trying to takeOverScan"},
- { 4232, AE, "Parallelism can only be between 1 and 240" },
+ { 242, DMEC, AE, "Zero concurrency in scan"},
+ { 244, DMEC, AE, "Too high concurrency in scan"},
+ { 269, DMEC, AE, "No condition and attributes to read in scan"},
+ { 4600, DMEC, AE, "Transaction is already started"},
+ { 4601, DMEC, AE, "Transaction is not started"},
+ { 4602, DMEC, AE, "You must call getNdbOperation before executeScan" },
+ { 4603, DMEC, AE, "There can only be ONE operation in a scan transaction" },
+ { 4604, DMEC, AE, "takeOverScanOp, to take over a scanned row one must explicitly request keyinfo on readTuples call" },
+ { 4605, DMEC, AE, "You may only call openScanRead or openScanExclusive once for each operation"},
+ { 4607, DMEC, AE, "There may only be one operation in a scan transaction"},
+ { 4608, DMEC, AE, "You can not takeOverScan unless you have used openScanExclusive"},
+ { 4609, DMEC, AE, "You must call nextScanResult before trying to takeOverScan"},
+ { 4232, DMEC, AE, "Parallelism can only be between 1 and 240" },
/**
* Event schema errors
*/
- { 4713, SE, "Column defined in event does not exist in table"},
+ { 4713, DMEC, SE, "Column defined in event does not exist in table"},
/**
* Event application errors
*/
- { 4707, AE, "Too many event have been defined"},
- { 4708, AE, "Event name is too long"},
- { 4709, AE, "Can't accept more subscribers"},
- { 746, OE, "Event name already exists"},
- { 4710, AE, "Event not found"},
- { 4711, AE, "Creation of event failed"},
- { 4712, AE, "Stopped event operation does not exist. Already stopped?"},
+ { 4707, DMEC, AE, "Too many event have been defined"},
+ { 4708, DMEC, AE, "Event name is too long"},
+ { 4709, DMEC, AE, "Can't accept more subscribers"},
+ { 746, DMEC, OE, "Event name already exists"},
+ { 747, DMEC, IS, "Out of event records"},
+ { 748, DMEC, TR, "Busy during read of event table"},
+ { 4710, DMEC, AE, "Event not found"},
+ { 4711, DMEC, AE, "Creation of event failed"},
+ { 4712, DMEC, AE, "Stopped event operation does not exist. Already stopped?"},
/**
* Event internal errors
*/
- { 4731, IE, "Event not found"},
+ { 4731, DMEC, IE, "Event not found"},
/**
* SchemaError
*/
- { 701, SE, "System busy with other schema operation" },
- { 711, SE, "System busy with node restart, schema operations not allowed" },
- { 703, SE, "Invalid table format" },
- { 704, SE, "Attribute name too long" },
- { 705, SE, "Table name too long" },
- { 707, SE, "No more table metadata records (increase MaxNoOfTables)" },
- { 708, SE, "No more attribute metadata records (increase MaxNoOfAttributes)" },
- { 709, SE, "No such table existed" },
- { 721, OE, "Table or index with given name already exists" },
- { 723, SE, "No such table existed" },
- { 736, SE, "Unsupported array size" },
- { 737, SE, "Attribute array size too big" },
- { 738, SE, "Record too big" },
- { 739, SE, "Unsupported primary key length" },
- { 740, SE, "Nullable primary key not supported" },
- { 741, SE, "Unsupported alter table" },
- { 743, SE, "Unsupported character set in table or index" },
- { 744, SE, "Character string is invalid for given character set" },
- { 745, SE, "Distribution key not supported for char attribute (use binary attribute)" },
- { 761, SE, "Unable to drop table as backup is in progress" },
- { 762, SE, "Unable to alter table as backup is in progress" },
- { 241, SE, "Invalid schema object version" },
- { 283, SE, "Table is being dropped" },
- { 284, SE, "Table not defined in transaction coordinator" },
- { 285, SE, "Unknown table error in transaction coordinator" },
- { 881, SE, "Unable to create table, out of data pages (increase DataMemory) " },
- { 906, SE, "Unsupported attribute type in index" },
- { 907, SE, "Unsupported character set in table or index" },
- { 908, IS, "Invalid ordered index tree node size" },
- { 1225, SE, "Table not defined in local query handler" },
- { 1226, SE, "Table is being dropped" },
- { 1228, SE, "Cannot use drop table for drop index" },
- { 1229, SE, "Too long frm data supplied" },
- { 1231, SE, "Invalid table or index to scan" },
- { 1232, SE, "Invalid table or index to scan" },
-
+ { 311, DMEC, AE, "Undefined partition used in setPartitionId" },
+ { 703, DMEC, SE, "Invalid table format" },
+ { 704, DMEC, SE, "Attribute name too long" },
+ { 705, DMEC, SE, "Table name too long" },
+ { 707, DMEC, SE, "No more table metadata records (increase MaxNoOfTables)" },
+ { 708, DMEC, SE, "No more attribute metadata records (increase MaxNoOfAttributes)" },
+ { 709, HA_ERR_NO_SUCH_TABLE, SE, "No such table existed" },
+ { 710, DMEC, SE, "Internal: Get by table name not supported, use table id." },
+ { 721, HA_ERR_TABLE_EXIST, OE, "Table or index with given name already exists" },
+ { 723, HA_ERR_NO_SUCH_TABLE, SE, "No such table existed" },
+ { 736, DMEC, SE, "Unsupported array size" },
+ { 737, HA_WRONG_CREATE_OPTION, SE, "Attribute array size too big" },
+ { 738, HA_WRONG_CREATE_OPTION, SE, "Record too big" },
+ { 739, HA_WRONG_CREATE_OPTION, SE, "Unsupported primary key length" },
+ { 740, HA_WRONG_CREATE_OPTION, SE, "Nullable primary key not supported" },
+ { 741, DMEC, SE, "Unsupported alter table" },
+ { 743, HA_WRONG_CREATE_OPTION, SE, "Unsupported character set in table or index" },
+ { 744, DMEC, SE, "Character string is invalid for given character set" },
+ { 745, HA_WRONG_CREATE_OPTION, SE, "Distribution key not supported for char attribute (use binary attribute)" },
+ { 771, HA_WRONG_CREATE_OPTION, AE, "Given NODEGROUP doesn't exist in this cluster" },
+ { 772, HA_WRONG_CREATE_OPTION, IE, "Given fragmentType doesn't exist" },
+ { 749, HA_WRONG_CREATE_OPTION, IE, "Primary Table in wrong state" },
+ { 763, HA_WRONG_CREATE_OPTION, SE, "Invalid undo buffer size" },
+ { 764, HA_WRONG_CREATE_OPTION, SE, "Invalid extent size" },
+ { 765, DMEC, SE, "Out of filegroup records" },
+ { 750, IE, SE, "Invalid file type" },
+ { 751, DMEC, SE, "Out of file records" },
+ { 752, DMEC, SE, "Invalid file format" },
+ { 753, IE, SE, "Invalid filegroup for file" },
+ { 754, IE, SE, "Invalid filegroup version when creating file" },
+ { 755, HA_WRONG_CREATE_OPTION, SE, "Invalid tablespace" },
+ { 756, DMEC, SE, "Index on disk column is not supported" },
+ { 757, DMEC, SE, "Varsize bitfield not supported" },
+ { 758, DMEC, SE, "Tablespace has changed" },
+ { 759, DMEC, SE, "Invalid tablespace version " },
+ { 760, DMEC, SE, "File already exists", },
+ { 761, DMEC, SE, "Unable to drop table as backup is in progress" },
+ { 762, DMEC, SE, "Unable to alter table as backup is in progress" },
+ { 766, DMEC, SE, "Cant drop file, no such file" },
+ { 767, DMEC, SE, "Cant drop filegroup, no such filegroup" },
+ { 768, DMEC, SE, "Cant drop filegroup, filegroup is used" },
+ { 769, DMEC, SE, "Drop undofile not supported, drop logfile group instead" },
+ { 770, DMEC, SE, "Cant drop file, file is used" },
+ { 774, DMEC, SE, "Invalid schema object for drop" },
+ { 241, HA_ERR_TABLE_DEF_CHANGED, SE, "Invalid schema object version" },
+ { 283, HA_ERR_NO_SUCH_TABLE, SE, "Table is being dropped" },
+ { 284, HA_ERR_TABLE_DEF_CHANGED, SE, "Table not defined in transaction coordinator" },
+ { 285, DMEC, SE, "Unknown table error in transaction coordinator" },
+ { 881, DMEC, SE, "Unable to create table, out of data pages (increase DataMemory) " },
+ { 906, DMEC, SE, "Unsupported attribute type in index" },
+ { 907, DMEC, SE, "Unsupported character set in table or index" },
+ { 908, DMEC, IS, "Invalid ordered index tree node size" },
+ { 1225, DMEC, SE, "Table not defined in local query handler" },
+ { 1226, DMEC, SE, "Table is being dropped" },
+ { 1228, DMEC, SE, "Cannot use drop table for drop index" },
+ { 1229, DMEC, SE, "Too long frm data supplied" },
+ { 1231, DMEC, SE, "Invalid table or index to scan" },
+ { 1232, DMEC, SE, "Invalid table or index to scan" },
+
+ { 1502, DMEC, IE, "Filegroup already exists" },
+ { 1503, DMEC, SE, "Out of filegroup records" },
+ { 1504, DMEC, SE, "Out of logbuffer memory" },
+ { 1505, DMEC, IE, "Invalid filegroup" },
+ { 1506, DMEC, IE, "Invalid filegroup version" },
+ { 1507, DMEC, IE, "File no already inuse" },
+ { 1508, DMEC, SE, "Out of file records" },
+ { 1509, DMEC, SE, "File system error, check if path,permissions etc" },
+ { 1510, DMEC, IE, "File meta data error" },
+ { 1511, DMEC, IE, "Out of memory" },
+ { 1512, DMEC, SE, "File read error" },
+ { 1513, DMEC, IE, "Filegroup not online" },
+ { 1514, DMEC, SE, "Currently there is a limit of one logfile group" },
+
+ { 773, DMEC, SE, "Out of string memory, please modify StringMemory config parameter" },
+ { 775, DMEC, SE, "Create file is not supported when Diskless=1" },
+ { 776, DMEC, AE, "Index created on temporary table must itself be temporary" },
+ { 777, DMEC, AE, "Cannot create a temporary index on a non-temporary table" },
+ { 778, DMEC, AE, "A temporary table or index must be specified as not logging" },
+
/**
* FunctionNotImplemented
*/
- { 4003, NI, "Function not implemented yet" },
+ { 4003, DMEC, NI, "Function not implemented yet" },
/**
* Backup error codes
*/
- { 1300, IE, "Undefined error" },
- { 1301, IE, "Backup issued to not master (reissue command to master)" },
- { 1302, IE, "Out of backup record" },
- { 1303, IS, "Out of resources" },
- { 1304, IE, "Sequence failure" },
- { 1305, IE, "Backup definition not implemented" },
- { 1306, AE, "Backup not supported in diskless mode (change Diskless)" },
-
- { 1321, UD, "Backup aborted by user request" },
- { 1322, IE, "Backup already completed" },
- { 1323, IE, "1323" },
- { 1324, IE, "Backup log buffer full" },
- { 1325, IE, "File or scan error" },
- { 1326, IE, "Backup abortet due to node failure" },
- { 1327, IE, "1327" },
-
- { 1340, IE, "Backup undefined error" },
- { 1342, AE, "Backup failed to allocate buffers (check configuration)" },
- { 1343, AE, "Backup failed to setup fs buffers (check configuration)" },
- { 1344, AE, "Backup failed to allocate tables (check configuration)" },
- { 1345, AE, "Backup failed to insert file header (check configuration)" },
- { 1346, AE, "Backup failed to insert table list (check configuration)" },
- { 1347, AE, "Backup failed to allocate table memory (check configuration)" },
- { 1348, AE, "Backup failed to allocate file record (check configuration)" },
- { 1349, AE, "Backup failed to allocate attribute record (check configuration)" },
- { 1329, AE, "Backup during software upgrade not supported" },
+ { 1300, DMEC, IE, "Undefined error" },
+ { 1301, DMEC, IE, "Backup issued to not master (reissue command to master)" },
+ { 1302, DMEC, IE, "Out of backup record" },
+ { 1303, DMEC, IS, "Out of resources" },
+ { 1304, DMEC, IE, "Sequence failure" },
+ { 1305, DMEC, IE, "Backup definition not implemented" },
+ { 1306, DMEC, AE, "Backup not supported in diskless mode (change Diskless)" },
+
+ { 1321, DMEC, UD, "Backup aborted by user request" },
+ { 1322, DMEC, IE, "Backup already completed" },
+ { 1323, DMEC, IE, "1323" },
+ { 1324, DMEC, IE, "Backup log buffer full" },
+ { 1325, DMEC, IE, "File or scan error" },
+ { 1326, DMEC, IE, "Backup abortet due to node failure" },
+ { 1327, DMEC, IE, "1327" },
+
+ { 1340, DMEC, IE, "Backup undefined error" },
+ { 1342, DMEC, AE, "Backup failed to allocate buffers (check configuration)" },
+ { 1343, DMEC, AE, "Backup failed to setup fs buffers (check configuration)" },
+ { 1344, DMEC, AE, "Backup failed to allocate tables (check configuration)" },
+ { 1345, DMEC, AE, "Backup failed to insert file header (check configuration)" },
+ { 1346, DMEC, AE, "Backup failed to insert table list (check configuration)" },
+ { 1347, DMEC, AE, "Backup failed to allocate table memory (check configuration)" },
+ { 1348, DMEC, AE, "Backup failed to allocate file record (check configuration)" },
+ { 1349, DMEC, AE, "Backup failed to allocate attribute record (check configuration)" },
+ { 1329, DMEC, AE, "Backup during software upgrade not supported" },
+
+ /**
+ * Node id allocation error codes
+ */
+
+ { 1700, DMEC, IE, "Undefined error" },
+ { 1701, DMEC, AE, "Node already reserved" },
+ { 1702, DMEC, AE, "Node already connected" },
+ { 1703, DMEC, AE, "Node failure handling not completed" },
+ { 1704, DMEC, AE, "Node type mismatch" },
/**
* Still uncategorized
*/
- { 720, AE, "Attribute name reused in table definition" },
- { 4004, AE, "Attribute name or id not found in the table" },
-
- { 4100, AE, "Status Error in NDB" },
- { 4101, AE, "No connections to NDB available and connect failed" },
- { 4102, AE, "Type in NdbTamper not correct" },
- { 4103, AE, "No schema connections to NDB available and connect failed" },
- { 4104, AE, "Ndb Init in wrong state, destroy Ndb object and create a new" },
- { 4105, AE, "Too many Ndb objects" },
- { 4106, AE, "All Not NULL attribute have not been defined" },
- { 4114, AE, "Transaction is already completed" },
- { 4116, AE, "Operation was not defined correctly, probably missing a key" },
- { 4117, AE, "Could not start transporter, configuration error"},
- { 4118, AE, "Parameter error in API call" },
- { 4300, AE, "Tuple Key Type not correct" },
- { 4301, AE, "Fragment Type not correct" },
- { 4302, AE, "Minimum Load Factor not correct" },
- { 4303, AE, "Maximum Load Factor not correct" },
- { 4304, AE, "Maximum Load Factor smaller than Minimum" },
- { 4305, AE, "K value must currently be set to 6" },
- { 4306, AE, "Memory Type not correct" },
- { 4307, AE, "Invalid table name" },
- { 4308, AE, "Attribute Size not correct" },
- { 4309, AE, "Fixed array too large, maximum 64000 bytes" },
- { 4310, AE, "Attribute Type not correct" },
- { 4311, AE, "Storage Mode not correct" },
- { 4312, AE, "Null Attribute Type not correct" },
- { 4313, AE, "Index only storage for non-key attribute" },
- { 4314, AE, "Storage Type of attribute not correct" },
- { 4315, AE, "No more key attributes allowed after defining variable length key attribute" },
- { 4316, AE, "Key attributes are not allowed to be NULL attributes" },
- { 4317, AE, "Too many primary keys defined in table" },
- { 4318, AE, "Invalid attribute name" },
- { 4319, AE, "createAttribute called at erroneus place" },
- { 4322, AE, "Attempt to define distribution key when not prepared to" },
- { 4323, AE, "Distribution Key set on table but not defined on first attribute" },
- { 4324, AE, "Attempt to define distribution group when not prepared to" },
- { 4325, AE, "Distribution Group set on table but not defined on first attribute" },
- { 4326, AE, "Distribution Group with erroneus number of bits" },
- { 4327, AE, "Distribution Group with 1 byte attribute is not allowed" },
- { 4328, AE, "Disk memory attributes not yet supported" },
- { 4329, AE, "Variable stored attributes not yet supported" },
-
- { 4400, AE, "Status Error in NdbSchemaCon" },
- { 4401, AE, "Only one schema operation per schema transaction" },
- { 4402, AE, "No schema operation defined before calling execute" },
-
- { 4501, AE, "Insert in hash table failed when getting table information from Ndb" },
- { 4502, AE, "GetValue not allowed in Update operation" },
- { 4503, AE, "GetValue not allowed in Insert operation" },
- { 4504, AE, "SetValue not allowed in Read operation" },
- { 4505, AE, "NULL value not allowed in primary key search" },
- { 4506, AE, "Missing getValue/setValue when calling execute" },
- { 4507, AE, "Missing operation request when calling execute" },
-
- { 4200, AE, "Status Error when defining an operation" },
- { 4201, AE, "Variable Arrays not yet supported" },
- { 4202, AE, "Set value on tuple key attribute is not allowed" },
- { 4203, AE, "Trying to set a NOT NULL attribute to NULL" },
- { 4204, AE, "Set value and Read/Delete Tuple is incompatible" },
- { 4205, AE, "No Key attribute used to define tuple" },
- { 4206, AE, "Not allowed to equal key attribute twice" },
- { 4207, AE, "Key size is limited to 4092 bytes" },
- { 4208, AE, "Trying to read a non-stored attribute" },
- { 4209, AE, "Length parameter in equal/setValue is incorrect" },
- { 4210, AE, "Ndb sent more info than the length he specified" },
- { 4211, AE, "Inconsistency in list of NdbRecAttr-objects" },
- { 4212, AE, "Ndb reports NULL value on Not NULL attribute" },
- { 4213, AE, "Not all data of an attribute has been received" },
- { 4214, AE, "Not all attributes have been received" },
- { 4215, AE, "More data received than reported in TCKEYCONF message" },
- { 4216, AE, "More than 8052 bytes in setValue cannot be handled" },
- { 4217, AE, "It is not allowed to increment any other than unsigned ints" },
- { 4218, AE, "Currently not allowed to increment NULL-able attributes" },
- { 4219, AE, "Maximum size of interpretative attributes are 64 bits" },
- { 4220, AE, "Maximum size of interpretative attributes are 64 bits" },
- { 4221, AE, "Trying to jump to a non-defined label" },
- { 4222, AE, "Label was not found, internal error" },
- { 4223, AE, "Not allowed to create jumps to yourself" },
- { 4224, AE, "Not allowed to jump to a label in a different subroutine" },
- { 4225, AE, "All primary keys defined, call setValue/getValue"},
- { 4226, AE, "Bad number when defining a label" },
- { 4227, AE, "Bad number when defining a subroutine" },
- { 4228, AE, "Illegal interpreter function in scan definition" },
- { 4229, AE, "Illegal register in interpreter function definition" },
- { 4230, AE, "Illegal state when calling getValue, probably not a read" },
- { 4231, AE, "Illegal state when calling interpreter routine" },
- { 4233, AE, "Calling execute (synchronous) when already prepared asynchronous transaction exists" },
- { 4234, AE, "Illegal to call setValue in this state" },
- { 4235, AE, "No callback from execute" },
- { 4236, AE, "Trigger name too long" },
- { 4237, AE, "Too many triggers" },
- { 4238, AE, "Trigger not found" },
- { 4239, AE, "Trigger with given name already exists"},
- { 4240, AE, "Unsupported trigger type"},
- { 4241, AE, "Index name too long" },
- { 4242, AE, "Too many indexes" },
- { 4243, AE, "Index not found" },
- { 4244, OE, "Index or table with given name already exists" },
- { 4247, AE, "Illegal index/trigger create/drop/alter request" },
- { 4248, AE, "Trigger/index name invalid" },
- { 4249, AE, "Invalid table" },
- { 4250, AE, "Invalid index type or index logging option" },
- { 4251, AE, "Cannot create unique index, duplicate keys found" },
- { 4252, AE, "Failed to allocate space for index" },
- { 4253, AE, "Failed to create index table" },
- { 4254, AE, "Table not an index table" },
- { 4255, AE, "Hash index attributes must be specified in same order as table attributes" },
- { 4258, AE, "Cannot create unique index, duplicate attributes found in definition" },
- { 4259, AE, "Invalid set of range scan bounds" },
- { 4260, UD, "NdbScanFilter: Operator is not defined in NdbScanFilter::Group"},
- { 4261, UD, "NdbScanFilter: Column is NULL"},
- { 4262, UD, "NdbScanFilter: Condition is out of bounds"},
- { 4263, IE, "Invalid blob attributes or invalid blob parts table" },
- { 4264, AE, "Invalid usage of blob attribute" },
- { 4265, AE, "The blob method is not valid in current blob state" },
- { 4266, AE, "Invalid blob seek position" },
- { 4267, IE, "Corrupted blob value" },
- { 4268, IE, "Error in blob head update forced rollback of transaction" },
- { 4269, IE, "No connection to ndb management server" },
- { 4270, IE, "Unknown blob error" },
- { 4335, AE, "Only one autoincrement column allowed per table. Having a table without primary key uses an autoincremented hidden key, i.e. a table without a primary key can not have an autoincremented column" },
- { 4271, AE, "Invalid index object, not retrieved via getIndex()" },
- { 4275, AE, "The blob method is incompatible with operation type or lock mode" }
+ { 720, DMEC, AE, "Attribute name reused in table definition" },
+ { 1405, DMEC, NR, "Subscriber manager busy with node recovery" },
+ { 1407, DMEC, SE, "Subscription not found in subscriber manager" },
+ { 1411, DMEC, TR, "Subscriber manager busy with adding/removing a subscriber" },
+ { 1412, DMEC, IS, "Can't accept more subscribers, out of space in pool" },
+ { 1413, DMEC, TR, "Subscriber manager busy with adding the subscription" },
+ { 1414, DMEC, TR, "Subscriber manager has subscribers on this subscription" },
+ { 1415, DMEC, SE, "Subscription not unique in subscriber manager" },
+ { 1416, DMEC, IS, "Can't accept more subscriptions, out of space in pool" },
+ { 1417, DMEC, SE, "Table in suscription not defined, probably dropped" },
+ { 1418, DMEC, SE, "Subscription dropped, no new subscribers allowed" },
+ { 1419, DMEC, SE, "Subscription already dropped" },
+
+ { 1420, DMEC, TR, "Subscriber manager busy with adding/removing a table" },
+
+ { 4004, DMEC, AE, "Attribute name or id not found in the table" },
+
+ { 4100, DMEC, AE, "Status Error in NDB" },
+ { 4101, DMEC, AE, "No connections to NDB available and connect failed" },
+ { 4102, DMEC, AE, "Type in NdbTamper not correct" },
+ { 4103, DMEC, AE, "No schema connections to NDB available and connect failed" },
+ { 4104, DMEC, AE, "Ndb Init in wrong state, destroy Ndb object and create a new" },
+ { 4105, DMEC, AE, "Too many Ndb objects" },
+ { 4106, DMEC, AE, "All Not NULL attribute have not been defined" },
+ { 4114, DMEC, AE, "Transaction is already completed" },
+ { 4116, DMEC, AE, "Operation was not defined correctly, probably missing a key" },
+ { 4117, DMEC, AE, "Could not start transporter, configuration error"},
+ { 4118, DMEC, AE, "Parameter error in API call" },
+ { 4300, DMEC, AE, "Tuple Key Type not correct" },
+ { 4301, DMEC, AE, "Fragment Type not correct" },
+ { 4302, DMEC, AE, "Minimum Load Factor not correct" },
+ { 4303, DMEC, AE, "Maximum Load Factor not correct" },
+ { 4304, DMEC, AE, "Maximum Load Factor smaller than Minimum" },
+ { 4305, DMEC, AE, "K value must currently be set to 6" },
+ { 4306, DMEC, AE, "Memory Type not correct" },
+ { 4307, DMEC, AE, "Invalid table name" },
+ { 4308, DMEC, AE, "Attribute Size not correct" },
+ { 4309, DMEC, AE, "Fixed array too large, maximum 64000 bytes" },
+ { 4310, DMEC, AE, "Attribute Type not correct" },
+ { 4311, DMEC, AE, "Storage Mode not correct" },
+ { 4312, DMEC, AE, "Null Attribute Type not correct" },
+ { 4313, DMEC, AE, "Index only storage for non-key attribute" },
+ { 4314, DMEC, AE, "Storage Type of attribute not correct" },
+ { 4315, DMEC, AE, "No more key attributes allowed after defining variable length key attribute" },
+ { 4316, DMEC, AE, "Key attributes are not allowed to be NULL attributes" },
+ { 4317, DMEC, AE, "Too many primary keys defined in table" },
+ { 4318, DMEC, AE, "Invalid attribute name or number" },
+ { 4319, DMEC, AE, "createAttribute called at erroneus place" },
+ { 4322, DMEC, AE, "Attempt to define distribution key when not prepared to" },
+ { 4323, DMEC, AE, "Distribution Key set on table but not defined on first attribute" },
+ { 4324, DMEC, AE, "Attempt to define distribution group when not prepared to" },
+ { 4325, DMEC, AE, "Distribution Group set on table but not defined on first attribute" },
+ { 4326, DMEC, AE, "Distribution Group with erroneus number of bits" },
+ { 4327, DMEC, AE, "Distribution Group with 1 byte attribute is not allowed" },
+ { 4328, DMEC, AE, "Disk memory attributes not yet supported" },
+ { 4329, DMEC, AE, "Variable stored attributes not yet supported" },
+
+ { 4400, DMEC, AE, "Status Error in NdbSchemaCon" },
+ { 4401, DMEC, AE, "Only one schema operation per schema transaction" },
+ { 4402, DMEC, AE, "No schema operation defined before calling execute" },
+
+ { 4501, DMEC, AE, "Insert in hash table failed when getting table information from Ndb" },
+ { 4502, DMEC, AE, "GetValue not allowed in Update operation" },
+ { 4503, DMEC, AE, "GetValue not allowed in Insert operation" },
+ { 4504, DMEC, AE, "SetValue not allowed in Read operation" },
+ { 4505, DMEC, AE, "NULL value not allowed in primary key search" },
+ { 4506, DMEC, AE, "Missing getValue/setValue when calling execute" },
+ { 4507, DMEC, AE, "Missing operation request when calling execute" },
+
+ { 4200, DMEC, AE, "Status Error when defining an operation" },
+ { 4201, DMEC, AE, "Variable Arrays not yet supported" },
+ { 4202, DMEC, AE, "Set value on tuple key attribute is not allowed" },
+ { 4203, DMEC, AE, "Trying to set a NOT NULL attribute to NULL" },
+ { 4204, DMEC, AE, "Set value and Read/Delete Tuple is incompatible" },
+ { 4205, DMEC, AE, "No Key attribute used to define tuple" },
+ { 4206, DMEC, AE, "Not allowed to equal key attribute twice" },
+ { 4207, DMEC, AE, "Key size is limited to 4092 bytes" },
+ { 4208, DMEC, AE, "Trying to read a non-stored attribute" },
+ { 4209, DMEC, AE, "Length parameter in equal/setValue is incorrect" },
+ { 4210, DMEC, AE, "Ndb sent more info than the length he specified" },
+ { 4211, DMEC, AE, "Inconsistency in list of NdbRecAttr-objects" },
+ { 4212, DMEC, AE, "Ndb reports NULL value on Not NULL attribute" },
+ { 4213, DMEC, AE, "Not all data of an attribute has been received" },
+ { 4214, DMEC, AE, "Not all attributes have been received" },
+ { 4215, DMEC, AE, "More data received than reported in TCKEYCONF message" },
+ { 4216, DMEC, AE, "More than 8052 bytes in setValue cannot be handled" },
+ { 4217, DMEC, AE, "It is not allowed to increment any other than unsigned ints" },
+ { 4218, DMEC, AE, "Currently not allowed to increment NULL-able attributes" },
+ { 4219, DMEC, AE, "Maximum size of interpretative attributes are 64 bits" },
+ { 4220, DMEC, AE, "Maximum size of interpretative attributes are 64 bits" },
+ { 4221, DMEC, AE, "Trying to jump to a non-defined label" },
+ { 4222, DMEC, AE, "Label was not found, internal error" },
+ { 4223, DMEC, AE, "Not allowed to create jumps to yourself" },
+ { 4224, DMEC, AE, "Not allowed to jump to a label in a different subroutine" },
+ { 4225, DMEC, AE, "All primary keys defined, call setValue/getValue"},
+ { 4226, DMEC, AE, "Bad number when defining a label" },
+ { 4227, DMEC, AE, "Bad number when defining a subroutine" },
+ { 4228, DMEC, AE, "Illegal interpreter function in scan definition" },
+ { 4229, DMEC, AE, "Illegal register in interpreter function definition" },
+ { 4230, DMEC, AE, "Illegal state when calling getValue, probably not a read" },
+ { 4231, DMEC, AE, "Illegal state when calling interpreter routine" },
+ { 4233, DMEC, AE, "Calling execute (synchronous) when already prepared asynchronous transaction exists" },
+ { 4234, DMEC, AE, "Illegal to call setValue in this state" },
+ { 4235, DMEC, AE, "No callback from execute" },
+ { 4236, DMEC, AE, "Trigger name too long" },
+ { 4237, DMEC, AE, "Too many triggers" },
+ { 4238, DMEC, AE, "Trigger not found" },
+ { 4239, DMEC, AE, "Trigger with given name already exists"},
+ { 4240, DMEC, AE, "Unsupported trigger type"},
+ { 4241, DMEC, AE, "Index name too long" },
+ { 4242, DMEC, AE, "Too many indexes" },
+ { 4243, DMEC, AE, "Index not found" },
+ { 4244, HA_ERR_TABLE_EXIST, OE, "Index or table with given name already exists" },
+ { 4247, DMEC, AE, "Illegal index/trigger create/drop/alter request" },
+ { 4248, DMEC, AE, "Trigger/index name invalid" },
+ { 4249, DMEC, AE, "Invalid table" },
+ { 4250, DMEC, AE, "Invalid index type or index logging option" },
+ { 4251, HA_ERR_FOUND_DUPP_UNIQUE, AE, "Cannot create unique index, duplicate keys found" },
+ { 4252, DMEC, AE, "Failed to allocate space for index" },
+ { 4253, DMEC, AE, "Failed to create index table" },
+ { 4254, DMEC, AE, "Table not an index table" },
+ { 4255, DMEC, AE, "Hash index attributes must be specified in same order as table attributes" },
+ { 4258, DMEC, AE, "Cannot create unique index, duplicate attributes found in definition" },
+ { 4259, DMEC, AE, "Invalid set of range scan bounds" },
+ { 4260, DMEC, UD, "NdbScanFilter: Operator is not defined in NdbScanFilter::Group"},
+ { 4261, DMEC, UD, "NdbScanFilter: Column is NULL"},
+ { 4262, DMEC, UD, "NdbScanFilter: Condition is out of bounds"},
+ { 4263, DMEC, IE, "Invalid blob attributes or invalid blob parts table" },
+ { 4264, DMEC, AE, "Invalid usage of blob attribute" },
+ { 4265, DMEC, AE, "The method is not valid in current blob state" },
+ { 4266, DMEC, AE, "Invalid blob seek position" },
+ { 4267, DMEC, IE, "Corrupted blob value" },
+ { 4268, DMEC, IE, "Error in blob head update forced rollback of transaction" },
+ { 4269, DMEC, IE, "No connection to ndb management server" },
+ { 4270, DMEC, IE, "Unknown blob error" },
+ { 4335, DMEC, AE, "Only one autoincrement column allowed per table. Having a table without primary key uses an autoincremented hidden key, i.e. a table without a primary key can not have an autoincremented column" },
+ { 4271, DMEC, AE, "Invalid index object, not retrieved via getIndex()" },
+ { 4272, DMEC, AE, "Table definition has undefined column" },
+ { 4273, DMEC, IE, "No blob table in dict cache" },
+ { 4274, DMEC, IE, "Corrupted main table PK in blob operation" },
+ { 4275, DMEC, AE, "The blob method is incompatible with operation type or lock mode" },
};
static
@@ -573,6 +664,7 @@
{ ST_T, OL, "Overload error"},
{ ST_T, TO, "Timeout expired"},
{ ST_T, NS, "Node shutdown"},
+ { ST_T, IT, "Internal temporary"},
{ ST_U , UR, "Unknown result error"},
{ ST_U , UE, "Unknown error code"},
@@ -613,6 +705,7 @@
if(ErrorCodes[i].code == error->code){
error->classification = ErrorCodes[i].classification;
error->message = ErrorCodes[i].message;
+ error->mysql_code = ErrorCodes[i].mysql_code;
found = 1;
break;
}
@@ -621,6 +714,7 @@
if(!found){
error->classification = UE;
error->message = "Unknown error code";
+ error->mysql_code = DMEC;
}
found = 0;
@@ -638,6 +732,7 @@
error->details = 0;
}
+#if CHECK_ERRORCODES
int
checkErrorCodes(){
int i, j;
@@ -654,7 +749,6 @@
/*static const int a = checkErrorCodes();*/
-#if CHECK_ERRORCODES
int main(void){
checkErrorCodes();
return 0;
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2397) | tomas | 23 Jan |