Index: ndb-work/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
===================================================================
storage/ndb/src/mgmsrv/ERROR_codes.txt:
WL#3704 mgmapi timeouts: manipulate some things to get infrastructure for event timeouts
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
WL#3704 mgmapi timeouts: manipulate some things to get infrastructure for event timeouts
storage/ndb/src/mgmsrv/Services.cpp:
WL#3704 mgmapi timeouts: manipulate some things to get infrastructure for event timeouts
storage/ndb/test/ndbapi/testMgm.cpp:
WL#3704 mgmapi timeouts: manipulate some things to get infrastructure for event timeouts
Also add an ERROR_codes.txt file for mgmd
Index: ndb-work/storage/ndb/src/mgmsrv/ERROR_codes.txt
===================================================================
storage/ndb/src/mgmsrv/Services.cpp:
WL#3704 mgmapi timeouts: renumber mgmd err insert to not have duplicates.
storage/ndb/test/ndbapi/testMgm.cpp:
WL#3704 mgmapi timeouts: renumber mgmd err insert to not have duplicates.
storage/ndb/src/mgmsrv/ERROR_codes.txt:
WL#3704 mgmapi timeouts: renumber mgmd err insert to not have duplicates.
In ndb_mgm_call, add checks for expired timeout in (Input|Output)Stream.
In case of timeout, we set NdbMgmHandle->last_error and return NULL.
In api calls not using ndb_mgm_call (or using it in conjunction with
own IO), they'll need to check for timeouts manually. Macros are provided
to do this.
Add ndb_mgm_disconnect_quiet(h) to disconnect without checking errors
(so we don't clobber NdbMgmHandle->last_error). This helps us provide
the *consistent* semantic that on timeout we leave the NdbMgmHandle
*disconnected*. We check for this in testMgm.
Change CHECK_REPLY in mgmapi to also check for set error in handle->last_error
This will pick up the ETIMEDOUT errors and return them to client (through
returning correct failure code for API call and setting NdbMgmHandle error).
Applications written to MGMAPI before this patch will behave as before,
and even hopefully check get_last_error and report the error back to the
end user!
Adding the last CHECK_TIMEDOUT_RET and delete in ndb_mgm_call() we
slightly change behaviour of mgmapi. Previously, if disconnect
midway through a reply, where there were only optional parameters left,
we'd get a Properties object from ndb_mgm_call() containing NULLs for
the optional parameters, leading to interesting error messages. This
enables the returning of the *real* message and actually improves the API
without breaking compatibility.
ndb_mgm_start_signallog
ndb_mgm_stop_signallog
ndb_mgm_log_signals
ndb_mgm_set_trace
ndb_mgm_insert_error
ndb_mgm_set_int64_parameter [1]
ndb_mgm_set_string_parameter [1]
ndb_mgm_purge_stale_sessions [2]
- return error code on error during ndb_mgm_call
TODO:
ndb_mgm_report_event [2]
[1] marked for removal, unused.
[2] return codes incorrect in CHECK_HANDLE/CONNECTED. undocumented.
Server side:
in Services (per session) add macro for injecting timeout error
(just waiting 10 seconds before continuing... it does work!)
We inject these errors in a number of critical places - including
the tricky api functions that don't just use ndb_mgm_call but do
their own thing (get_config, get_status and friends)
ATRT:
Expand testMgm to add timout tests for API. Fully automated.
*THEORETICALLY* timing dependent - an ultra-slow network will
cause problems and "fake" failures... I welcome other solutions.
Tests aren't exhaustive, but cover the generics and the tricky bits.
Also test some calling semantics (incl disconnected on error).
It is encouraged to add *more* mgmapi tests, not less :)
InputStream:
Fix where timedout error is set
Index: ndb-work/storage/ndb/src/mgmapi/mgmapi.cpp
===================================================================
storage/ndb/src/common/util/InputStream.cpp:
WL#3704 mgmapi timeouts: Return sane errors for timeout in mgmapi
storage/ndb/src/mgmapi/mgmapi.cpp:
WL#3704 mgmapi timeouts: Return sane errors for timeout in mgmapi
storage/ndb/src/mgmapi/mgmapi_internal.h:
WL#3704 mgmapi timeouts: Return sane errors for timeout in mgmapi
storage/ndb/src/mgmsrv/Services.cpp:
WL#3704 mgmapi timeouts: Return sane errors for timeout in mgmapi
storage/ndb/test/ndbapi/testMgm.cpp:
WL#3704 mgmapi timeouts: Return sane errors for timeout in mgmapi
Add error injection either for this connection or for whole server.
Currently nothing for injecting errors into *another* connection... but that's
perhaps getting tricky-dicky for this point in time. Perhaps needed for events
if we don't do anything fancy.
Index: ndb-work/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
===================================================================
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
WL#3704 mgmapi timeouts: Add ndb_mgmd error injection
storage/ndb/src/mgmsrv/MgmtSrvr.hpp:
WL#3704 mgmapi timeouts: Add ndb_mgmd error injection
storage/ndb/src/mgmsrv/Services.cpp:
WL#3704 mgmapi timeouts: Add ndb_mgmd error injection
storage/ndb/src/mgmsrv/Services.hpp:
WL#3704 mgmapi timeouts: Add ndb_mgmd error injection
storage/ndb/test/ndbapi/testMgm.cpp:
WL#3704 mgmapi timeouts: Add ndb_mgmd error injection
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
storage/ndb/src/kernel/blocks/ERROR_codes.txt:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp:
merge
storage/ndb/test/run-test/daily-basic-tests.txt:
merge
into perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
storage/ndb/src/kernel/blocks/ERROR_codes.txt:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
storage/ndb/test/run-test/daily-basic-tests.txt:
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp:
merge
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp:
Auto merged
Fix race in testprg...causing random TC crashes
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
remove incorrect work-around
storage/ndb/test/ndbapi/testNodeRestart.cpp:
Fix race in testprg...causing random TC crashes
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
storage/ndb/src/kernel/blocks/suma/Suma.cpp:
Auto merged
storage/ndb/test/run-test/daily-basic-tests.txt:
Auto merged
Fix bug in SUMA::resend_bucket which could cause mysqld to crash
storage/ndb/src/kernel/blocks/suma/Suma.cpp:
Remove *len* part from sz,
or an extra word will be sent (sometimes) which will cause event-api barf
storage/ndb/test/ndbapi/test_event.cpp:
test prg for bug#27169
storage/ndb/test/run-test/daily-basic-tests.txt:
test prg for bug#27169
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
storage/ndb/src/kernel/blocks/ERROR_codes.txt:
Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp:
Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/restore.cpp:
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp:
merge
storage/ndb/test/run-test/daily-basic-tests.txt:
merge
merge to 5.1, adopt testprg to optimized node recovery
storage/ndb/include/kernel/signaldata/LqhKey.hpp:
Add Restore as friend
storage/ndb/src/kernel/blocks/restore.cpp:
Give proper error message on LQHKEYREF
storage/ndb/test/ndbapi/testNodeRestart.cpp:
post merge fix, adopt to optimized node recovery...
into perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
Auto merged
storage/ndb/test/run-test/daily-basic-tests.txt:
Auto merged
storage/ndb/src/kernel/blocks/ERROR_codes.txt:
merge
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
merge
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp:
merge
storage/ndb/test/ndbapi/testNodeRestart.cpp:
merge
into dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.1/mysql-5.1-new-ndb-bj.test
sql/ha_ndbcluster.cc:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp:
Auto merged
storage/ndb/src/kernel/vm/Pool.hpp:
Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
storage/ndb/tools/restore/consumer_restore.cpp:
Auto merged
when merge from 5.0 to 5.1, update a function call in testScanFilter.cpp
beacuase the function's definition is changed from 5.0 to 5.1
storage/ndb/test/ndbapi/testScanFilter.cpp:
bug#24568
it need change f() call because NDBT_CreateTableHook definition is changed from 5.0 to 5.1
add a new file in 5.0 and rename it in 5.1 because the directory of ndb is changed from 5.0 to 5.1
storage/ndb/test/ndbapi/testScanFilter.cpp:
Rename: ndb/test/ndbapi/testScanFilter.cpp -> storage/ndb/test/ndbapi/testScanFilter.cpp
into dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.1/bug24568-5.1-new-ndb-bj
storage/ndb/src/ndbapi/NdbScanFilter.cpp:
Auto merged
storage/ndb/test/include/NDBT_Test.hpp:
Auto merged
storage/ndb/test/ndbapi/Makefile.am:
Auto merged
storage/ndb/test/src/NDBT_Test.cpp:
SCCS merged
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
storage/ndb/src/common/debugger/EventLogger.cpp:
Auto merged
storage/ndb/src/kernel/blocks/tsman.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp:
merge
write testcase for bug#26450...
no solution however...
storage/ndb/test/ndbapi/testNodeRestart.cpp:
write testcase for bug#26450...
no solution however...
into perch.ndb.mysql.com:/home/jonas/src/51-work
storage/ndb/test/ndbapi/testBitfield.cpp:
Auto merged
storage/ndb/test/run-test/daily-basic-tests.txt:
merge
into perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
storage/ndb/src/kernel/blocks/ERROR_codes.txt:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp:
Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
Auto merged
storage/ndb/test/src/NdbRestarter.cpp:
Auto merged
storage/ndb/test/include/NdbRestarter.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
merge
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
merge
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
merge
storage/ndb/test/ndbapi/testNodeRestart.cpp:
merge
storage/ndb/test/run-test/daily-basic-tests.txt:
merge
into perch.ndb.mysql.com:/home/jonas/src/51-work
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
merge
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
merge
storage/ndb/test/ndbapi/testNodeRestart.cpp:
merge
into perch.ndb.mysql.com:/home/jonas/src/51-work
storage/ndb/src/kernel/blocks/ERROR_codes.txt:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/test/include/NdbRestarter.hpp:
Auto merged
storage/ndb/test/src/NdbRestarter.cpp:
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp:
merge
storage/ndb/test/run-test/daily-basic-tests.txt:
merge
Fix testcase so that it does not leak tables...causing subsequent errors
storage/ndb/test/ndbapi/testDict.cpp:
Fix testcase so that it does not leak tables...
new behaviour is as follows:
1) node is refused to start, and should fail with message in error log that it must be restarted --initial
2) if cluster failure in this situation, node must also be restarted --intial
if not SR will fail, with this message
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Prevent node from starting _at all_ if it has performed more than 6 failed
node restart.
storage/ndb/test/ndbapi/testNodeRestart.cpp:
test prg 25984
storage/ndb/test/run-test/daily-basic-tests.txt:
testcase
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
sql/ha_ndbcluster.cc:
Auto merged
storage/ndb/include/ndbapi/NdbOperation.hpp:
Auto merged
storage/ndb/include/ndbapi/NdbTransaction.hpp:
Auto merged
storage/ndb/src/ndbapi/NdbBlob.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbIndexStat.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbOperationDefine.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbOperationExec.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbTransaction.cpp:
Auto merged
storage/ndb/test/include/HugoOperations.hpp:
Auto merged
storage/ndb/test/ndbapi/testNdbApi.cpp:
Auto merged
storage/ndb/test/src/HugoOperations.cpp:
Auto merged
1) move AbortOption from NdbTransaction to NdbOperation
2) let each operation have a "default" abort option dependant on
operation type
- read - AO_IgnoreError
- dml - AbortOnError
- scan take over - AbortOnError
3) Changed default value to execute() from AbortOnError to DefaultAbortOption, which does not change the operations abort-option.
Another value to execute(AO) is equivalent to setting AO on each operation before calling execute
4) execute() does _only_ return -1 if transaction has been aborted
otherwise, you need to check each operation for error code
sql/ha_ndbcluster.cc:
adopt to changes in aption option handling
storage/ndb/include/ndbapi/NdbOperation.hpp:
Move "ownership" of AbortOption to operation from transaction
storage/ndb/include/ndbapi/NdbTransaction.hpp:
Move "ownership" of AbortOption to operation from transaction
storage/ndb/src/ndbapi/NdbBlob.cpp:
Move "ownership" of AbortOption to operation from transaction
storage/ndb/src/ndbapi/NdbIndexStat.cpp:
Move "ownership" of AbortOption to operation from transaction
storage/ndb/src/ndbapi/NdbOperationDefine.cpp:
Put default value on abortoption dependant on operation type
storage/ndb/src/ndbapi/NdbOperationExec.cpp:
Move "ownership" of AbortOption to operation from transaction
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
Move "ownership" of AbortOption to operation from transaction
storage/ndb/src/ndbapi/NdbTransaction.cpp:
Move "ownership" of AbortOption to operation from transaction
storage/ndb/test/include/HugoOperations.hpp:
Move "ownership" of AbortOption to operation from transaction
storage/ndb/test/ndbapi/testNdbApi.cpp:
Move "ownership" of AbortOption to operation from transaction
storage/ndb/test/src/HugoOperations.cpp:
Move "ownership" of AbortOption to operation from transaction
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
storage/ndb/include/ndbapi/NdbIndexOperation.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
storage/ndb/src/ndbapi/Ndb.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbIndexOperation.cpp:
Auto merged
storage/ndb/test/ndbapi/testBlobs.cpp:
Auto merged
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
Auto merged
storage/ndb/test/ndbapi/testBasic.cpp:
Auto merged
storage/ndb/test/run-test/daily-basic-tests.txt:
Auto merged
Fix read after delete (in same op)
- lqh, handling of attrinfo
- tup, setup read for disk/varchar
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Dont save ATTRINFO "also" for DELETE, even when getting it in separate signal
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
Add disk flag to signature
(for read after delete)
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
Do setup read before read after delete
storage/ndb/test/ndbapi/testBasic.cpp:
testcase
storage/ndb/test/run-test/daily-basic-tests.txt:
testcase
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
storage/ndb/include/kernel/GlobalSignalNumbers.h:
Auto merged
storage/ndb/include/kernel/NodeInfo.hpp:
Auto merged
storage/ndb/include/kernel/signaldata/ApiRegSignalData.hpp:
Auto merged
storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp:
Auto merged
storage/ndb/include/ndb_version.h.in:
Auto merged
storage/ndb/src/common/debugger/signaldata/SignalNames.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp:
Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/suma/Suma.cpp:
Auto merged
storage/ndb/src/kernel/blocks/suma/SumaInit.cpp:
Auto merged
storage/ndb/src/kernel/vm/GlobalData.hpp:
Auto merged
storage/ndb/src/kernel/vm/SimulatedBlock.hpp:
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp:
Auto merged
storage/ndb/test/run-test/daily-basic-tests.txt:
Auto merged
into perch.ndb.mysql.com:/home/jonas/src/51-work
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp:
merge
storage/ndb/test/run-test/daily-basic-tests.txt:
merge