mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
Merge willster.(none):/home/stewart/Documents/MySQL/5.0/ndb-work
into willster.(none):/home/stewart/Documents/MySQL/5.1/ndb-work
This commit is contained in:
commit
6358a0f48c
31 changed files with 20 additions and 526 deletions
|
@ -551,13 +551,13 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
|
|||
#define GSN_ABORT_ALL_REF 446
|
||||
#define GSN_ABORT_ALL_CONF 447
|
||||
|
||||
#define GSN_STATISTICS_REQ 448
|
||||
/* 448 unused - formerly GSN_STATISTICS_REQ */
|
||||
#define GSN_STOP_ORD 449
|
||||
#define GSN_TAMPER_ORD 450
|
||||
#define GSN_SET_VAR_REQ 451
|
||||
#define GSN_SET_VAR_CONF 452
|
||||
#define GSN_SET_VAR_REF 453
|
||||
#define GSN_STATISTICS_CONF 454
|
||||
/* 451 unused - formerly GSN_SET_VAR_REQ */
|
||||
/* 452 unused - formerly GSN_SET_VAR_CONF */
|
||||
/* 453 unused - formerly GSN_SET_VAR_REF */
|
||||
/* 454 unused - formerly GSN_STATISTICS_CONF */
|
||||
|
||||
#define GSN_START_ORD 455
|
||||
/* 457 unused */
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "ndb_logevent.h"
|
||||
|
||||
#define MGM_LOGLEVELS CFG_MAX_LOGLEVEL - CFG_MIN_LOGLEVEL + 1
|
||||
#define NDB_MGM_MAX_LOGLEVEL 15
|
||||
|
||||
/**
|
||||
* @mainpage MySQL Cluster Management API
|
||||
|
|
|
@ -44,9 +44,9 @@ public:
|
|||
|
||||
class SocketOutputStream : public OutputStream {
|
||||
NDB_SOCKET_TYPE m_socket;
|
||||
unsigned m_timeout;
|
||||
unsigned m_timeout_ms;
|
||||
public:
|
||||
SocketOutputStream(NDB_SOCKET_TYPE socket, unsigned writeTimeout = 1000);
|
||||
SocketOutputStream(NDB_SOCKET_TYPE socket, unsigned write_timeout_ms = 1000);
|
||||
virtual ~SocketOutputStream() {}
|
||||
|
||||
int print(const char * fmt, ...);
|
||||
|
|
|
@ -350,15 +350,10 @@ const GsnName SignalNames [] = {
|
|||
,{ GSN_TUP_WRITELOG_REQ, "TUP_WRITELOG_REQ" }
|
||||
,{ GSN_LQH_WRITELOG_REQ, "LQH_WRITELOG_REQ" }
|
||||
|
||||
,{ GSN_STATISTICS_REQ, "STATISTICS_REQ" }
|
||||
,{ GSN_START_ORD, "START_ORD" }
|
||||
,{ GSN_STOP_ORD, "STOP_ORD" }
|
||||
,{ GSN_TAMPER_ORD, "TAMPER_ORD" }
|
||||
,{ GSN_SET_VAR_REQ, "SET_VAR_REQ" }
|
||||
,{ GSN_SET_VAR_CONF, "SET_VAR_CONF" }
|
||||
,{ GSN_SET_VAR_REF, "SET_VAR_REF" }
|
||||
,{ GSN_STATISTICS_CONF, "STATISTICS_CONF" }
|
||||
|
||||
|
||||
,{ GSN_EVENT_SUBSCRIBE_REQ, "EVENT_SUBSCRIBE_REQ" }
|
||||
,{ GSN_EVENT_SUBSCRIBE_CONF, "EVENT_SUBSCRIBE_CONF" }
|
||||
,{ GSN_EVENT_SUBSCRIBE_REF, "EVENT_SUBSCRIBE_REF" }
|
||||
|
|
|
@ -42,16 +42,16 @@ FileOutputStream::println(const char * fmt, ...){
|
|||
}
|
||||
|
||||
SocketOutputStream::SocketOutputStream(NDB_SOCKET_TYPE socket,
|
||||
unsigned timeout){
|
||||
unsigned write_timeout_ms){
|
||||
m_socket = socket;
|
||||
m_timeout = timeout;
|
||||
m_timeout_ms = write_timeout_ms;
|
||||
}
|
||||
|
||||
int
|
||||
SocketOutputStream::print(const char * fmt, ...){
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
const int ret = vprint_socket(m_socket, m_timeout, fmt, ap);
|
||||
const int ret = vprint_socket(m_socket, m_timeout_ms, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ int
|
|||
SocketOutputStream::println(const char * fmt, ...){
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
const int ret = vprintln_socket(m_socket, m_timeout, fmt, ap);
|
||||
const int ret = vprintln_socket(m_socket, m_timeout_ms, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -78,11 +78,7 @@ Cmvmi::Cmvmi(Block_context& ctx) :
|
|||
addRecSignal(GSN_OPEN_COMREQ, &Cmvmi::execOPEN_COMREQ);
|
||||
addRecSignal(GSN_TEST_ORD, &Cmvmi::execTEST_ORD);
|
||||
|
||||
addRecSignal(GSN_STATISTICS_REQ, &Cmvmi::execSTATISTICS_REQ);
|
||||
addRecSignal(GSN_TAMPER_ORD, &Cmvmi::execTAMPER_ORD);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Cmvmi::execSET_VAR_REQ);
|
||||
addRecSignal(GSN_SET_VAR_CONF, &Cmvmi::execSET_VAR_CONF);
|
||||
addRecSignal(GSN_SET_VAR_REF, &Cmvmi::execSET_VAR_REF);
|
||||
addRecSignal(GSN_STOP_ORD, &Cmvmi::execSTOP_ORD);
|
||||
addRecSignal(GSN_START_ORD, &Cmvmi::execSTART_ORD);
|
||||
addRecSignal(GSN_EVENT_SUBSCRIBE_REQ,
|
||||
|
@ -727,24 +723,6 @@ Cmvmi::execTEST_ORD(Signal * signal){
|
|||
#endif
|
||||
}
|
||||
|
||||
void Cmvmi::execSTATISTICS_REQ(Signal* signal)
|
||||
{
|
||||
// TODO Note ! This is only a test implementation...
|
||||
|
||||
static int stat1 = 0;
|
||||
jamEntry();
|
||||
|
||||
//ndbout << "data 1: " << signal->theData[1];
|
||||
|
||||
int x = signal->theData[0];
|
||||
stat1++;
|
||||
signal->theData[0] = stat1;
|
||||
sendSignal(x, GSN_STATISTICS_CONF, signal, 7, JBB);
|
||||
|
||||
}//execSTATISTICS_REQ()
|
||||
|
||||
|
||||
|
||||
void Cmvmi::execSTOP_ORD(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
|
@ -863,7 +841,7 @@ void Cmvmi::execTAMPER_ORD(Signal* signal)
|
|||
// to be able to indicate if we really introduced an error.
|
||||
#ifdef ERROR_INSERT
|
||||
TamperOrd* const tamperOrd = (TamperOrd*)&signal->theData[0];
|
||||
|
||||
signal->theData[2] = 0;
|
||||
signal->theData[1] = tamperOrd->errorNo;
|
||||
signal->theData[0] = 5;
|
||||
sendSignal(DBDIH_REF, GSN_DIHNDBTAMPER, signal, 3,JBB);
|
||||
|
@ -871,160 +849,6 @@ void Cmvmi::execTAMPER_ORD(Signal* signal)
|
|||
|
||||
}//execTAMPER_ORD()
|
||||
|
||||
|
||||
|
||||
void Cmvmi::execSET_VAR_REQ(Signal* signal)
|
||||
{
|
||||
#if 0
|
||||
|
||||
SetVarReq* const setVarReq = (SetVarReq*)&signal->theData[0];
|
||||
ConfigParamId var = setVarReq->variable();
|
||||
jamEntry();
|
||||
switch (var) {
|
||||
|
||||
// NDBCNTR_REF
|
||||
|
||||
// DBTC
|
||||
case TransactionDeadlockDetectionTimeout:
|
||||
case TransactionInactiveTime:
|
||||
case NoOfConcurrentProcessesHandleTakeover:
|
||||
sendSignal(DBTC_REF, GSN_SET_VAR_REQ, signal, 3, JBB);
|
||||
break;
|
||||
|
||||
// DBDIH
|
||||
case TimeBetweenLocalCheckpoints:
|
||||
case TimeBetweenGlobalCheckpoints:
|
||||
sendSignal(DBDIH_REF, GSN_SET_VAR_REQ, signal, 3, JBB);
|
||||
break;
|
||||
|
||||
// DBLQH
|
||||
case NoOfConcurrentCheckpointsDuringRestart:
|
||||
case NoOfConcurrentCheckpointsAfterRestart:
|
||||
sendSignal(DBLQH_REF, GSN_SET_VAR_REQ, signal, 3, JBB);
|
||||
break;
|
||||
|
||||
// DBACC
|
||||
case NoOfDiskPagesToDiskDuringRestartACC:
|
||||
case NoOfDiskPagesToDiskAfterRestartACC:
|
||||
sendSignal(DBACC_REF, GSN_SET_VAR_REQ, signal, 3, JBB);
|
||||
break;
|
||||
|
||||
// DBTUP
|
||||
case NoOfDiskPagesToDiskDuringRestartTUP:
|
||||
case NoOfDiskPagesToDiskAfterRestartTUP:
|
||||
sendSignal(DBTUP_REF, GSN_SET_VAR_REQ, signal, 3, JBB);
|
||||
break;
|
||||
|
||||
// DBDICT
|
||||
|
||||
// NDBCNTR
|
||||
case TimeToWaitAlive:
|
||||
|
||||
// QMGR
|
||||
case HeartbeatIntervalDbDb: // TODO ev till Ndbcnt också
|
||||
case HeartbeatIntervalDbApi:
|
||||
case ArbitTimeout:
|
||||
sendSignal(QMGR_REF, GSN_SET_VAR_REQ, signal, 3, JBB);
|
||||
break;
|
||||
|
||||
// NDBFS
|
||||
|
||||
// CMVMI
|
||||
case MaxNoOfSavedMessages:
|
||||
case LockPagesInMainMemory:
|
||||
case TimeBetweenWatchDogCheck:
|
||||
case StopOnError:
|
||||
handleSET_VAR_REQ(signal);
|
||||
break;
|
||||
|
||||
|
||||
// Not possible to update (this could of course be handled by each block
|
||||
// instead but I havn't investigated where they belong)
|
||||
case Id:
|
||||
case ExecuteOnComputer:
|
||||
case ShmKey:
|
||||
case MaxNoOfConcurrentOperations:
|
||||
case MaxNoOfConcurrentTransactions:
|
||||
case MemorySpaceIndexes:
|
||||
case MemorySpaceTuples:
|
||||
case MemoryDiskPages:
|
||||
case NoOfFreeDiskClusters:
|
||||
case NoOfDiskClusters:
|
||||
case NoOfFragmentLogFiles:
|
||||
case NoOfDiskClustersPerDiskFile:
|
||||
case NoOfDiskFiles:
|
||||
case MaxNoOfSavedEvents:
|
||||
default:
|
||||
|
||||
int mgmtSrvr = setVarReq->mgmtSrvrBlockRef();
|
||||
sendSignal(mgmtSrvr, GSN_SET_VAR_REF, signal, 0, JBB);
|
||||
} // switch
|
||||
|
||||
#endif
|
||||
}//execSET_VAR_REQ()
|
||||
|
||||
|
||||
void Cmvmi::execSET_VAR_CONF(Signal* signal)
|
||||
{
|
||||
int mgmtSrvr = signal->theData[0];
|
||||
sendSignal(mgmtSrvr, GSN_SET_VAR_CONF, signal, 0, JBB);
|
||||
|
||||
}//execSET_VAR_CONF()
|
||||
|
||||
|
||||
void Cmvmi::execSET_VAR_REF(Signal* signal)
|
||||
{
|
||||
int mgmtSrvr = signal->theData[0];
|
||||
sendSignal(mgmtSrvr, GSN_SET_VAR_REF, signal, 0, JBB);
|
||||
|
||||
}//execSET_VAR_REF()
|
||||
|
||||
|
||||
void Cmvmi::handleSET_VAR_REQ(Signal* signal) {
|
||||
#if 0
|
||||
SetVarReq* const setVarReq = (SetVarReq*)&signal->theData[0];
|
||||
ConfigParamId var = setVarReq->variable();
|
||||
int val = setVarReq->value();
|
||||
|
||||
switch (var) {
|
||||
case MaxNoOfSavedMessages:
|
||||
m_ctx.m_config.maxNoOfErrorLogs(val);
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
case LockPagesInMainMemory:
|
||||
int result;
|
||||
if (val == 0) {
|
||||
result = NdbMem_MemUnlockAll();
|
||||
}
|
||||
else {
|
||||
result = NdbMem_MemLockAll();
|
||||
}
|
||||
if (result == 0) {
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
}
|
||||
else {
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_REF, signal, 1, JBB);
|
||||
}
|
||||
break;
|
||||
|
||||
case TimeBetweenWatchDogCheck:
|
||||
m_ctx.m_config.timeBetweenWatchDogCheck(val);
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
case StopOnError:
|
||||
m_ctx.m_config.stopOnError(val);
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
default:
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_REF, signal, 1, JBB);
|
||||
return;
|
||||
} // switch
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef VM_TRACE
|
||||
class RefSignalTest {
|
||||
public:
|
||||
|
|
|
@ -55,20 +55,14 @@ private:
|
|||
void execSIZEALT_ACK(Signal* signal);
|
||||
void execTEST_ORD(Signal* signal);
|
||||
|
||||
void execSTATISTICS_REQ(Signal* signal);
|
||||
void execSTOP_ORD(Signal* signal);
|
||||
void execSTART_ORD(Signal* signal);
|
||||
void execTAMPER_ORD(Signal* signal);
|
||||
void execSET_VAR_REQ(Signal* signal);
|
||||
void execSET_VAR_CONF(Signal* signal);
|
||||
void execSET_VAR_REF(Signal* signal);
|
||||
|
||||
void execDUMP_STATE_ORD(Signal* signal);
|
||||
|
||||
void execEVENT_SUBSCRIBE_REQ(Signal *);
|
||||
void cancelSubscription(NodeId nodeId);
|
||||
|
||||
void handleSET_VAR_REQ(Signal* signal);
|
||||
|
||||
void execTESTSIG(Signal* signal);
|
||||
void execNODE_START_REP(Signal* signal);
|
||||
|
|
|
@ -660,7 +660,6 @@ private:
|
|||
void execNDB_STTOR(Signal* signal);
|
||||
void execDROP_TAB_REQ(Signal* signal);
|
||||
void execREAD_CONFIG_REQ(Signal* signal);
|
||||
void execSET_VAR_REQ(Signal* signal);
|
||||
void execDUMP_STATE_ORD(Signal* signal);
|
||||
|
||||
// Statement blocks
|
||||
|
|
|
@ -113,7 +113,6 @@ Dbacc::Dbacc(Block_context& ctx):
|
|||
addRecSignal(GSN_NDB_STTOR, &Dbacc::execNDB_STTOR);
|
||||
addRecSignal(GSN_DROP_TAB_REQ, &Dbacc::execDROP_TAB_REQ);
|
||||
addRecSignal(GSN_READ_CONFIG_REQ, &Dbacc::execREAD_CONFIG_REQ, true);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Dbacc::execSET_VAR_REQ);
|
||||
|
||||
initData();
|
||||
|
||||
|
|
|
@ -8511,33 +8511,6 @@ Dbacc::execDUMP_STATE_ORD(Signal* signal)
|
|||
#endif
|
||||
}//Dbacc::execDUMP_STATE_ORD()
|
||||
|
||||
void Dbacc::execSET_VAR_REQ(Signal* signal)
|
||||
{
|
||||
#if 0
|
||||
SetVarReq* const setVarReq = (SetVarReq*)&signal->theData[0];
|
||||
ConfigParamId var = setVarReq->variable();
|
||||
int val = setVarReq->value();
|
||||
|
||||
|
||||
switch (var) {
|
||||
|
||||
case NoOfDiskPagesToDiskAfterRestartACC:
|
||||
clblPagesPerTick = val;
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
case NoOfDiskPagesToDiskDuringRestartACC:
|
||||
// Valid only during start so value not set.
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
default:
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_REF, signal, 1, JBB);
|
||||
} // switch
|
||||
#endif
|
||||
|
||||
}//execSET_VAR_REQ()
|
||||
|
||||
void
|
||||
Dbacc::execREAD_PSEUDO_REQ(Signal* signal){
|
||||
jamEntry();
|
||||
|
|
|
@ -700,7 +700,6 @@ private:
|
|||
void execFSREADREF(Signal *);
|
||||
void execFSWRITECONF(Signal *);
|
||||
void execFSWRITEREF(Signal *);
|
||||
void execSET_VAR_REQ(Signal *);
|
||||
void execCHECKNODEGROUPSREQ(Signal *);
|
||||
void execSTART_INFOREQ(Signal*);
|
||||
void execSTART_INFOREF(Signal*);
|
||||
|
|
|
@ -203,7 +203,6 @@ Dbdih::Dbdih(Block_context& ctx):
|
|||
addRecSignal(GSN_FSREADREF, &Dbdih::execFSREADREF, true);
|
||||
addRecSignal(GSN_FSWRITECONF, &Dbdih::execFSWRITECONF);
|
||||
addRecSignal(GSN_FSWRITEREF, &Dbdih::execFSWRITEREF, true);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Dbdih::execSET_VAR_REQ);
|
||||
|
||||
addRecSignal(GSN_START_INFOREQ,
|
||||
&Dbdih::execSTART_INFOREQ);
|
||||
|
|
|
@ -14573,30 +14573,6 @@ Dbdih::execNDB_TAMPER(Signal* signal)
|
|||
return;
|
||||
}//Dbdih::execNDB_TAMPER()
|
||||
|
||||
void Dbdih::execSET_VAR_REQ(Signal* signal) {
|
||||
#if 0
|
||||
SetVarReq* const setVarReq = (SetVarReq*)&signal->theData[0];
|
||||
ConfigParamId var = setVarReq->variable();
|
||||
int val = setVarReq->value();
|
||||
|
||||
|
||||
switch (var) {
|
||||
case TimeBetweenLocalCheckpoints:
|
||||
c_lcpState.clcpDelay = val;
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
case TimeBetweenGlobalCheckpoints:
|
||||
cgcpDelay = val;
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
default:
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_REF, signal, 1, JBB);
|
||||
} // switch
|
||||
#endif
|
||||
}
|
||||
|
||||
void Dbdih::execBLOCK_COMMIT_ORD(Signal* signal){
|
||||
BlockCommitOrd* const block = (BlockCommitOrd *)&signal->theData[0];
|
||||
|
||||
|
|
|
@ -2169,7 +2169,6 @@ private:
|
|||
void execFSREADCONF(Signal* signal);
|
||||
void execFSREADREF(Signal* signal);
|
||||
void execSCAN_HBREP(Signal* signal);
|
||||
void execSET_VAR_REQ(Signal* signal);
|
||||
void execTIME_SIGNAL(Signal* signal);
|
||||
void execFSSYNCCONF(Signal* signal);
|
||||
|
||||
|
|
|
@ -267,7 +267,6 @@ Dblqh::Dblqh(Block_context& ctx):
|
|||
addRecSignal(GSN_FSREADCONF, &Dblqh::execFSREADCONF);
|
||||
addRecSignal(GSN_FSREADREF, &Dblqh::execFSREADREF, true);
|
||||
addRecSignal(GSN_ACC_ABORTCONF, &Dblqh::execACC_ABORTCONF);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Dblqh::execSET_VAR_REQ);
|
||||
addRecSignal(GSN_TIME_SIGNAL, &Dblqh::execTIME_SIGNAL);
|
||||
addRecSignal(GSN_FSSYNCCONF, &Dblqh::execFSSYNCCONF);
|
||||
addRecSignal(GSN_REMOVE_MARKER_ORD, &Dblqh::execREMOVE_MARKER_ORD);
|
||||
|
|
|
@ -18855,30 +18855,6 @@ Dblqh::execDUMP_STATE_ORD(Signal* signal)
|
|||
|
||||
}//Dblqh::execDUMP_STATE_ORD()
|
||||
|
||||
void Dblqh::execSET_VAR_REQ(Signal* signal)
|
||||
{
|
||||
#if 0
|
||||
SetVarReq* const setVarReq = (SetVarReq*)&signal->theData[0];
|
||||
ConfigParamId var = setVarReq->variable();
|
||||
|
||||
switch (var) {
|
||||
|
||||
case NoOfConcurrentCheckpointsAfterRestart:
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
case NoOfConcurrentCheckpointsDuringRestart:
|
||||
// Valid only during start so value not set.
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
default:
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_REF, signal, 1, JBB);
|
||||
} // switch
|
||||
#endif
|
||||
}//execSET_VAR_REQ()
|
||||
|
||||
|
||||
/* **************************************************************** */
|
||||
/* ---------------------------------------------------------------- */
|
||||
/* ---------------------- TRIGGER HANDLING ------------------------ */
|
||||
|
|
|
@ -1327,7 +1327,6 @@ private:
|
|||
void execTIME_SIGNAL(Signal* signal);
|
||||
void execAPI_FAILREQ(Signal* signal);
|
||||
void execSCAN_HBREP(Signal* signal);
|
||||
void execSET_VAR_REQ(Signal* signal);
|
||||
|
||||
void execABORT_ALL_REQ(Signal* signal);
|
||||
|
||||
|
|
|
@ -245,7 +245,6 @@ Dbtc::Dbtc(Block_context& ctx):
|
|||
addRecSignal(GSN_INCL_NODEREQ, &Dbtc::execINCL_NODEREQ);
|
||||
addRecSignal(GSN_TIME_SIGNAL, &Dbtc::execTIME_SIGNAL);
|
||||
addRecSignal(GSN_API_FAILREQ, &Dbtc::execAPI_FAILREQ);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Dbtc::execSET_VAR_REQ);
|
||||
|
||||
addRecSignal(GSN_TC_COMMIT_ACK, &Dbtc::execTC_COMMIT_ACK);
|
||||
addRecSignal(GSN_ABORT_ALL_REQ, &Dbtc::execABORT_ALL_REQ);
|
||||
|
|
|
@ -11004,36 +11004,6 @@ Dbtc::execDUMP_STATE_ORD(Signal* signal)
|
|||
}
|
||||
}//Dbtc::execDUMP_STATE_ORD()
|
||||
|
||||
void Dbtc::execSET_VAR_REQ(Signal* signal)
|
||||
{
|
||||
#if 0
|
||||
SetVarReq* const setVarReq = (SetVarReq*)&signal->theData[0];
|
||||
ConfigParamId var = setVarReq->variable();
|
||||
int val = setVarReq->value();
|
||||
|
||||
|
||||
switch (var) {
|
||||
|
||||
case TransactionInactiveTime:
|
||||
jam();
|
||||
set_appl_timeout_value(val);
|
||||
break;
|
||||
case TransactionDeadlockDetectionTimeout:
|
||||
set_timeout_value(val);
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
case NoOfConcurrentProcessesHandleTakeover:
|
||||
set_no_parallel_takeover(val);
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
default:
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_REF, signal, 1, JBB);
|
||||
} // switch
|
||||
#endif
|
||||
}
|
||||
|
||||
void Dbtc::execABORT_ALL_REQ(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
|
|
|
@ -1474,7 +1474,6 @@ private:
|
|||
void execTUP_ABORTREQ(Signal* signal);
|
||||
void execNDB_STTOR(Signal* signal);
|
||||
void execREAD_CONFIG_REQ(Signal* signal);
|
||||
void execSET_VAR_REQ(Signal* signal);
|
||||
void execDROP_TAB_REQ(Signal* signal);
|
||||
void execALTER_TAB_REQ(Signal* signal);
|
||||
void execTUP_DEALLOCREQ(Signal* signal);
|
||||
|
|
|
@ -80,7 +80,6 @@ Dbtup::Dbtup(Block_context& ctx, Pgman* pgman)
|
|||
addRecSignal(GSN_TUP_ABORTREQ, &Dbtup::execTUP_ABORTREQ);
|
||||
addRecSignal(GSN_NDB_STTOR, &Dbtup::execNDB_STTOR);
|
||||
addRecSignal(GSN_READ_CONFIG_REQ, &Dbtup::execREAD_CONFIG_REQ, true);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Dbtup::execSET_VAR_REQ);
|
||||
|
||||
// Trigger Signals
|
||||
addRecSignal(GSN_CREATE_TRIG_REQ, &Dbtup::execCREATE_TRIG_REQ);
|
||||
|
@ -724,32 +723,5 @@ void Dbtup::releaseFragrec(FragrecordPtr regFragPtr)
|
|||
cfirstfreefrag = regFragPtr.i;
|
||||
}//Dbtup::releaseFragrec()
|
||||
|
||||
void Dbtup::execSET_VAR_REQ(Signal* signal)
|
||||
{
|
||||
#if 0
|
||||
SetVarReq* const setVarReq = (SetVarReq*)signal->getDataPtrSend();
|
||||
ConfigParamId var = setVarReq->variable();
|
||||
int val = setVarReq->value();
|
||||
|
||||
switch (var) {
|
||||
|
||||
case NoOfDiskPagesToDiskAfterRestartTUP:
|
||||
clblPagesPerTick = val;
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
case NoOfDiskPagesToDiskDuringRestartTUP:
|
||||
// Valid only during start so value not set.
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
default:
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_REF, signal, 1, JBB);
|
||||
} // switch
|
||||
#endif
|
||||
|
||||
}//execSET_VAR_REQ()
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -192,7 +192,6 @@ private:
|
|||
void execNDB_STARTCONF(Signal* signal);
|
||||
void execREAD_NODESREQ(Signal* signal);
|
||||
void execNDB_STARTREF(Signal* signal);
|
||||
void execSET_VAR_REQ(Signal* signal);
|
||||
|
||||
void execSTOP_PERM_REF(Signal* signal);
|
||||
void execSTOP_PERM_CONF(Signal* signal);
|
||||
|
|
|
@ -81,7 +81,6 @@ Ndbcntr::Ndbcntr(Block_context& ctx):
|
|||
addRecSignal(GSN_NDB_STARTCONF, &Ndbcntr::execNDB_STARTCONF);
|
||||
addRecSignal(GSN_READ_NODESREQ, &Ndbcntr::execREAD_NODESREQ);
|
||||
addRecSignal(GSN_NDB_STARTREF, &Ndbcntr::execNDB_STARTREF);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Ndbcntr::execSET_VAR_REQ);
|
||||
|
||||
addRecSignal(GSN_STOP_PERM_REF, &Ndbcntr::execSTOP_PERM_REF);
|
||||
addRecSignal(GSN_STOP_PERM_CONF, &Ndbcntr::execSTOP_PERM_CONF);
|
||||
|
|
|
@ -2067,23 +2067,6 @@ Ndbcntr::execDUMP_STATE_ORD(Signal* signal)
|
|||
|
||||
}//Ndbcntr::execDUMP_STATE_ORD()
|
||||
|
||||
void Ndbcntr::execSET_VAR_REQ(Signal* signal) {
|
||||
#if 0
|
||||
SetVarReq* const setVarReq = (SetVarReq*)&signal->theData[0];
|
||||
ConfigParamId var = setVarReq->variable();
|
||||
|
||||
switch (var) {
|
||||
case TimeToWaitAlive:
|
||||
// Valid only during start so value not set.
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
default:
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_REF, signal, 1, JBB);
|
||||
}// switch
|
||||
#endif
|
||||
}//Ndbcntr::execSET_VAR_REQ()
|
||||
|
||||
void Ndbcntr::updateNodeState(Signal* signal, const NodeState& newState) const{
|
||||
NodeStateRep * const stateRep = (NodeStateRep *)&signal->theData[0];
|
||||
|
||||
|
|
|
@ -249,7 +249,6 @@ private:
|
|||
void execAPI_REGREQ(Signal* signal);
|
||||
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);
|
||||
|
|
|
@ -90,7 +90,6 @@ Qmgr::Qmgr(Block_context& ctx)
|
|||
addRecSignal(GSN_API_FAILREQ, &Qmgr::execAPI_FAILREQ);
|
||||
addRecSignal(GSN_API_FAILCONF, &Qmgr::execAPI_FAILCONF);
|
||||
addRecSignal(GSN_READ_NODESREQ, &Qmgr::execREAD_NODESREQ);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Qmgr::execSET_VAR_REQ);
|
||||
addRecSignal(GSN_API_BROADCAST_REP, &Qmgr::execAPI_BROADCAST_REP);
|
||||
|
||||
addRecSignal(GSN_NODE_FAILREP, &Qmgr::execNODE_FAILREP);
|
||||
|
|
|
@ -5010,34 +5010,6 @@ Qmgr::execDUMP_STATE_ORD(Signal* signal)
|
|||
#endif
|
||||
}//Qmgr::execDUMP_STATE_ORD()
|
||||
|
||||
void Qmgr::execSET_VAR_REQ(Signal* signal)
|
||||
{
|
||||
#if 0
|
||||
SetVarReq* const setVarReq = (SetVarReq*)&signal->theData[0];
|
||||
ConfigParamId var = setVarReq->variable();
|
||||
UintR val = setVarReq->value();
|
||||
|
||||
switch (var) {
|
||||
case HeartbeatIntervalDbDb:
|
||||
setHbDelay(val/10);
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
case HeartbeatIntervalDbApi:
|
||||
setHbApiDelay(val/10);
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
case ArbitTimeout:
|
||||
setArbitTimeout(val);
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
|
||||
break;
|
||||
|
||||
default:
|
||||
sendSignal(CMVMI_REF, GSN_SET_VAR_REF, signal, 1, JBB);
|
||||
}// switch
|
||||
#endif
|
||||
}//execSET_VAR_REQ()
|
||||
|
||||
void
|
||||
Qmgr::execAPI_BROADCAST_REP(Signal* signal)
|
||||
|
|
|
@ -2233,43 +2233,6 @@ ndb_mgm_alloc_nodeid(NdbMgmHandle handle, unsigned int version, int nodetype,
|
|||
return nodeid;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* Global Replication
|
||||
******************************************************************************/
|
||||
extern "C"
|
||||
int
|
||||
ndb_mgm_rep_command(NdbMgmHandle handle, unsigned int request,
|
||||
unsigned int* replication_id,
|
||||
struct ndb_mgm_reply* /*reply*/)
|
||||
{
|
||||
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_rep_command");
|
||||
const ParserRow<ParserDummy> replication_reply[] = {
|
||||
MGM_CMD("global replication reply", NULL, ""),
|
||||
MGM_ARG("result", String, Mandatory, "Error message"),
|
||||
MGM_ARG("id", Int, Optional, "Id of global replication"),
|
||||
MGM_END()
|
||||
};
|
||||
CHECK_HANDLE(handle, -1);
|
||||
CHECK_CONNECTED(handle, -1);
|
||||
|
||||
Properties args;
|
||||
args.put("request", request);
|
||||
const Properties *reply;
|
||||
reply = ndb_mgm_call(handle, replication_reply, "rep", &args);
|
||||
CHECK_REPLY(reply, -1);
|
||||
|
||||
const char * result;
|
||||
reply->get("result", &result);
|
||||
reply->get("id", replication_id);
|
||||
if(strcmp(result,"Ok")!=0) {
|
||||
delete reply;
|
||||
return -1;
|
||||
}
|
||||
|
||||
delete reply;
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C"
|
||||
int
|
||||
ndb_mgm_set_int_parameter(NdbMgmHandle handle,
|
||||
|
|
|
@ -594,7 +594,6 @@ private:
|
|||
*/
|
||||
enum WaitSignalType {
|
||||
NO_WAIT, // We don't expect to receive any signal
|
||||
WAIT_SET_VAR, // Accept SET_VAR_CONF and SET_VAR_REF
|
||||
WAIT_SUBSCRIBE_CONF // Accept event subscription confirmation
|
||||
};
|
||||
|
||||
|
|
|
@ -349,19 +349,6 @@ MgmApiSession::runSession()
|
|||
|
||||
switch(ctx.m_status) {
|
||||
case Parser_t::UnknownCommand:
|
||||
#ifdef MGM_GET_CONFIG_BACKWARDS_COMPAT
|
||||
/* Backwards compatibility for old NDBs that still use
|
||||
* the old "GET CONFIG" command.
|
||||
*/
|
||||
size_t i;
|
||||
for(i=0; i<strlen(ctx.m_currentToken); i++)
|
||||
ctx.m_currentToken[i] = toupper(ctx.m_currentToken[i]);
|
||||
|
||||
if(strncmp("GET CONFIG ",
|
||||
ctx.m_currentToken,
|
||||
strlen("GET CONFIG ")) == 0)
|
||||
getConfig_old(ctx);
|
||||
#endif /* MGM_GET_CONFIG_BACKWARDS_COMPAT */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -382,32 +369,6 @@ MgmApiSession::runSession()
|
|||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
#ifdef MGM_GET_CONFIG_BACKWARDS_COMPAT
|
||||
void
|
||||
MgmApiSession::getConfig_old(Parser_t::Context &ctx) {
|
||||
Properties args;
|
||||
|
||||
Uint32 version, node;
|
||||
|
||||
if(sscanf(ctx.m_currentToken, "GET CONFIG %d %d",
|
||||
(int *)&version, (int *)&node) != 2) {
|
||||
m_output->println("Expected 2 arguments for GET CONFIG");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Put arguments in properties object so we can call the real function */
|
||||
args.put("version", version);
|
||||
args.put("node", node);
|
||||
getConfig_common(ctx, args, true);
|
||||
}
|
||||
#endif /* MGM_GET_CONFIG_BACKWARDS_COMPAT */
|
||||
|
||||
void
|
||||
MgmApiSession::getConfig(Parser_t::Context &ctx,
|
||||
const class Properties &args) {
|
||||
getConfig_common(ctx, args);
|
||||
}
|
||||
|
||||
static Properties *
|
||||
backward(const char * base, const Properties* reply){
|
||||
Properties * ret = new Properties();
|
||||
|
@ -584,9 +545,9 @@ MgmApiSession::get_nodeid(Parser_t::Context &,
|
|||
}
|
||||
|
||||
void
|
||||
MgmApiSession::getConfig_common(Parser_t::Context &,
|
||||
const class Properties &args,
|
||||
bool compat) {
|
||||
MgmApiSession::getConfig(Parser_t::Context &,
|
||||
const class Properties &args)
|
||||
{
|
||||
Uint32 version, node = 0;
|
||||
|
||||
args.get("version", &version);
|
||||
|
@ -600,47 +561,6 @@ MgmApiSession::getConfig_common(Parser_t::Context &,
|
|||
return;
|
||||
}
|
||||
|
||||
if(version > 0 && version < makeVersion(3, 5, 0) && compat){
|
||||
Properties *reply = backward("", conf->m_oldConfig);
|
||||
reply->put("Version", version);
|
||||
reply->put("LocalNodeId", node);
|
||||
|
||||
backward("", reply);
|
||||
//reply->print();
|
||||
|
||||
const Uint32 size = reply->getPackedSize();
|
||||
Uint32 *buffer = new Uint32[size/4+1];
|
||||
|
||||
reply->pack(buffer);
|
||||
delete reply;
|
||||
|
||||
const int uurows = (size + 44)/45;
|
||||
char * uubuf = new char[uurows * 62+5];
|
||||
|
||||
const int uusz = uuencode_mem(uubuf, (char *)buffer, size);
|
||||
delete[] buffer;
|
||||
|
||||
m_output->println("GET CONFIG %d %d %d %d %d",
|
||||
0, version, node, size, uusz);
|
||||
|
||||
m_output->println("begin 664 Ndb_cfg.bin");
|
||||
|
||||
/* XXX Need to write directly to the socket, because the uubuf is not
|
||||
* NUL-terminated. This could/should probably be done in a nicer way.
|
||||
*/
|
||||
write_socket(m_socket, MAX_WRITE_TIMEOUT, uubuf, uusz);
|
||||
delete[] uubuf;
|
||||
|
||||
m_output->println("end");
|
||||
m_output->println("");
|
||||
return;
|
||||
}
|
||||
|
||||
if(compat){
|
||||
m_output->println("GET CONFIG %d %d %d %d %d",1, version, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if(node != 0){
|
||||
bool compatible;
|
||||
switch (m_mgmsrv.getNodeType(node)) {
|
||||
|
@ -856,8 +776,7 @@ MgmApiSession::setClusterLogLevel(Parser<MgmApiSession>::Context &,
|
|||
|
||||
DBUG_PRINT("enter",("node=%d, category=%d, level=%d", node, cat, level));
|
||||
|
||||
/* XXX should use constants for this value */
|
||||
if(level > 15) {
|
||||
if(level > NDB_MGM_MAX_LOGLEVEL) {
|
||||
m_output->println(reply);
|
||||
m_output->println("result: Invalid loglevel %d", level);
|
||||
m_output->println("");
|
||||
|
@ -900,8 +819,7 @@ MgmApiSession::setLogLevel(Parser<MgmApiSession>::Context &,
|
|||
args.get("category", &cat);
|
||||
args.get("level", &level);
|
||||
|
||||
/* XXX should use constants for this value */
|
||||
if(level > 15) {
|
||||
if(level > NDB_MGM_MAX_LOGLEVEL) {
|
||||
m_output->println("set loglevel reply");
|
||||
m_output->println("result: Invalid loglevel", errorString.c_str());
|
||||
m_output->println("");
|
||||
|
@ -1604,7 +1522,7 @@ MgmApiSession::listen_event(Parser<MgmApiSession>::Context & ctx,
|
|||
}
|
||||
|
||||
int level = atoi(spec[1].c_str());
|
||||
if(level < 0 || level > 15){
|
||||
if(level < 0 || level > NDB_MGM_MAX_LOGLEVEL){
|
||||
msg.appfmt("Invalid level: >%s<", spec[1].c_str());
|
||||
result = -1;
|
||||
goto done;
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
|
||||
#include "MgmtSrvr.hpp"
|
||||
|
||||
/** Undefine this to remove backwards compatibility for "GET CONFIG". */
|
||||
#define MGM_GET_CONFIG_BACKWARDS_COMPAT
|
||||
|
||||
class MgmApiSession : public SocketServer::Session
|
||||
{
|
||||
static void stop_session_if_timed_out(SocketServer::Session *_s, void *data);
|
||||
|
@ -49,9 +46,6 @@ private:
|
|||
Parser_t::Context *m_ctx;
|
||||
Uint64 m_session_id;
|
||||
|
||||
void getConfig_common(Parser_t::Context &ctx,
|
||||
const class Properties &args,
|
||||
bool compat = false);
|
||||
const char *get_error_text(int err_no)
|
||||
{ return m_mgmsrv.getErrorText(err_no, m_err_str, sizeof(m_err_str)); }
|
||||
|
||||
|
@ -61,9 +55,6 @@ public:
|
|||
void runSession();
|
||||
|
||||
void getConfig(Parser_t::Context &ctx, const class Properties &args);
|
||||
#ifdef MGM_GET_CONFIG_BACKWARDS_COMPAT
|
||||
void getConfig_old(Parser_t::Context &ctx);
|
||||
#endif /* MGM_GET_CONFIG_BACKWARDS_COMPAT */
|
||||
|
||||
void get_nodeid(Parser_t::Context &ctx, const class Properties &args);
|
||||
void getVersion(Parser_t::Context &ctx, const class Properties &args);
|
||||
|
|
Loading…
Add table
Reference in a new issue