diff options
author | unknown <joreland@mysql.com> | 2005-01-12 11:27:30 +0100 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2005-01-12 11:27:30 +0100 |
commit | ce2f345a7d33d2864da5050cc0b00cb6ae4e5312 (patch) | |
tree | 19a66c231142a5a98bed53ec6deeffe2efe82bd8 /ndb | |
parent | 2123dc6ba305f6f95847af82fabb2e7d36870aea (diff) | |
parent | 2ee0dc0936df61cdc957f44a9a1e8ddbf309707e (diff) | |
download | mariadb-git-ce2f345a7d33d2864da5050cc0b00cb6ae4e5312.tar.gz |
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/home/jonas/src/mysql-5.0-ndb
Diffstat (limited to 'ndb')
25 files changed, 318 insertions, 292 deletions
diff --git a/ndb/include/Makefile.am b/ndb/include/Makefile.am index 1b298a09e26..56d9bbf01fb 100644 --- a/ndb/include/Makefile.am +++ b/ndb/include/Makefile.am @@ -31,7 +31,8 @@ mgmapiinclude_HEADERS = \ mgmapi/mgmapi.h \ mgmapi/mgmapi_debug.h \ mgmapi/mgmapi_config_parameters.h \ -mgmapi/mgmapi_config_parameters_debug.h +mgmapi/mgmapi_config_parameters_debug.h \ +mgmapi/ndb_logevent.h noinst_HEADERS = \ ndb_global.h \ diff --git a/ndb/include/debugger/EventLogger.hpp b/ndb/include/debugger/EventLogger.hpp index ddf21b79f5f..7c45dbd353d 100644 --- a/ndb/include/debugger/EventLogger.hpp +++ b/ndb/include/debugger/EventLogger.hpp @@ -40,7 +40,7 @@ public: * severity - DEBUG to ALERT (Type of log message) */ struct EventRepLogLevelMatrix { - EventReport::EventType eventType; + Ndb_logevent_type eventType; LogLevel::EventCategory eventCategory; Uint32 threshold; Logger::LoggerLevel severity; diff --git a/ndb/include/kernel/signaldata/EventReport.hpp b/ndb/include/kernel/signaldata/EventReport.hpp index 1ad6e1bf7ac..9822a0539cf 100644 --- a/ndb/include/kernel/signaldata/EventReport.hpp +++ b/ndb/include/kernel/signaldata/EventReport.hpp @@ -17,6 +17,7 @@ #ifndef SD_EVENT_REPORT_H #define SD_EVENT_REPORT_H +#include <ndb_logevent.h> #include "SignalData.hpp" /** @@ -67,98 +68,21 @@ public: 4) Add SentHeartbeat in EventLogger::getText() */ - enum EventType { - // CONNECTION - Connected = 0, - Disconnected = 1, - CommunicationClosed = 2, - CommunicationOpened = 3, - ConnectedApiVersion = 51, - // CHECKPOINT - GlobalCheckpointStarted = 4, - GlobalCheckpointCompleted = 5, - LocalCheckpointStarted = 6, - LocalCheckpointCompleted = 7, - LCPStoppedInCalcKeepGci = 8, - LCPFragmentCompleted = 9, - // STARTUP - NDBStartStarted = 10, - NDBStartCompleted = 11, - STTORRYRecieved = 12, - StartPhaseCompleted = 13, - CM_REGCONF = 14, - CM_REGREF = 15, - FIND_NEIGHBOURS = 16, - NDBStopStarted = 17, - NDBStopAborted = 18, - StartREDOLog = 19, - StartLog = 20, - UNDORecordsExecuted = 21, - - // NODERESTART - NR_CopyDict = 22, - NR_CopyDistr = 23, - NR_CopyFragsStarted = 24, - NR_CopyFragDone = 25, - NR_CopyFragsCompleted = 26, - - // NODEFAIL - NodeFailCompleted = 27, - NODE_FAILREP = 28, - ArbitState = 29, - ArbitResult = 30, - GCP_TakeoverStarted = 31, - GCP_TakeoverCompleted = 32, - LCP_TakeoverStarted = 33, - LCP_TakeoverCompleted = 34, - - // STATISTIC - TransReportCounters = 35, - OperationReportCounters = 36, - TableCreated = 37, - UndoLogBlocked = 38, - JobStatistic = 39, - SendBytesStatistic = 40, - ReceiveBytesStatistic = 41, - MemoryUsage = 50, - - // ERROR - TransporterError = 42, - TransporterWarning = 43, - MissedHeartbeat = 44, - DeadDueToHeartbeat = 45, - WarningEvent = 46, - // INFO - SentHeartbeat = 47, - CreateLogBytes = 48, - InfoEvent = 49, - - //GREP - GrepSubscriptionInfo = 52, - GrepSubscriptionAlert = 53, - - //BACKUP - BackupStarted = 54, - BackupFailedToStart = 55, - BackupCompleted = 56, - BackupAborted = 57 - }; - - void setEventType(EventType type); - EventType getEventType() const; + void setEventType(Ndb_logevent_type type); + Ndb_logevent_type getEventType() const; UintR eventType; // DATA 0 }; inline void -EventReport::setEventType(EventType type){ +EventReport::setEventType(Ndb_logevent_type type){ eventType = (UintR) type; } inline -EventReport::EventType +Ndb_logevent_type EventReport::getEventType() const { - return (EventType)eventType; + return (Ndb_logevent_type)eventType; } #endif diff --git a/ndb/include/mgmapi/ndb_logevent.h b/ndb/include/mgmapi/ndb_logevent.h new file mode 100644 index 00000000000..ca6f848206f --- /dev/null +++ b/ndb/include/mgmapi/ndb_logevent.h @@ -0,0 +1,106 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef NDB_LOGEVENT_H +#define NDB_LOGEVENT_H + +#ifdef __cplusplus +extern "C" { +#endif + + enum Ndb_logevent_type { + /* CONNECTION */ + NDB_LE_Connected = 0, + NDB_LE_Disconnected = 1, + NDB_LE_CommunicationClosed = 2, + NDB_LE_CommunicationOpened = 3, + NDB_LE_ConnectedApiVersion = 51, + /* CHECKPOINT */ + NDB_LE_GlobalCheckpointStarted = 4, + NDB_LE_GlobalCheckpointCompleted = 5, + NDB_LE_LocalCheckpointStarted = 6, + NDB_LE_LocalCheckpointCompleted = 7, + NDB_LE_LCPStoppedInCalcKeepGci = 8, + NDB_LE_LCPFragmentCompleted = 9, + /* STARTUP */ + NDB_LE_NDBStartStarted = 10, + NDB_LE_NDBStartCompleted = 11, + NDB_LE_STTORRYRecieved = 12, + NDB_LE_StartPhaseCompleted = 13, + NDB_LE_CM_REGCONF = 14, + NDB_LE_CM_REGREF = 15, + NDB_LE_FIND_NEIGHBOURS = 16, + NDB_LE_NDBStopStarted = 17, + NDB_LE_NDBStopAborted = 18, + NDB_LE_StartREDOLog = 19, + NDB_LE_StartLog = 20, + NDB_LE_UNDORecordsExecuted = 21, + + /* NODERESTART */ + NDB_LE_NR_CopyDict = 22, + NDB_LE_NR_CopyDistr = 23, + NDB_LE_NR_CopyFragsStarted = 24, + NDB_LE_NR_CopyFragDone = 25, + NDB_LE_NR_CopyFragsCompleted = 26, + + /* NODEFAIL */ + NDB_LE_NodeFailCompleted = 27, + NDB_LE_NODE_FAILREP = 28, + NDB_LE_ArbitState = 29, + NDB_LE_ArbitResult = 30, + NDB_LE_GCP_TakeoverStarted = 31, + NDB_LE_GCP_TakeoverCompleted = 32, + NDB_LE_LCP_TakeoverStarted = 33, + NDB_LE_LCP_TakeoverCompleted = 34, + + /* STATISTIC */ + NDB_LE_TransReportCounters = 35, + NDB_LE_OperationReportCounters = 36, + NDB_LE_TableCreated = 37, + NDB_LE_UndoLogBlocked = 38, + NDB_LE_JobStatistic = 39, + NDB_LE_SendBytesStatistic = 40, + NDB_LE_ReceiveBytesStatistic = 41, + NDB_LE_MemoryUsage = 50, + + /* ERROR */ + NDB_LE_TransporterError = 42, + NDB_LE_TransporterWarning = 43, + NDB_LE_MissedHeartbeat = 44, + NDB_LE_DeadDueToHeartbeat = 45, + NDB_LE_WarningEvent = 46, + + /* INFO */ + NDB_LE_SentHeartbeat = 47, + NDB_LE_CreateLogBytes = 48, + NDB_LE_InfoEvent = 49, + + /* GREP */ + NDB_LE_GrepSubscriptionInfo = 52, + NDB_LE_GrepSubscriptionAlert = 53, + + /* BACKUP */ + NDB_LE_BackupStarted = 54, + NDB_LE_BackupFailedToStart = 55, + NDB_LE_BackupCompleted = 56, + NDB_LE_BackupAborted = 57 + }; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp index 07d2407bca9..85810587e3b 100644 --- a/ndb/include/ndbapi/Ndb.hpp +++ b/ndb/include/ndbapi/Ndb.hpp @@ -34,7 +34,9 @@ an ordered index, - NdbRecAttr represents an attribute value - NdbDictionary represents meta information about tables and attributes. - - NdbError contains the specification for an error. + + In addition, the NDB API defines a structure NdbError, which contains the + specification for an error. It is also possible to receive "events" triggered when data in the database in changed. This is done through the NdbEventOperation class. diff --git a/ndb/src/common/debugger/EventLogger.cpp b/ndb/src/common/debugger/EventLogger.cpp index fe11d776208..7ffcde88ce2 100644 --- a/ndb/src/common/debugger/EventLogger.cpp +++ b/ndb/src/common/debugger/EventLogger.cpp @@ -41,75 +41,75 @@ EventLoggerBase::~EventLoggerBase() */ const EventLoggerBase::EventRepLogLevelMatrix EventLoggerBase::matrix[] = { // CONNECTION - { EventReport::Connected, LogLevel::llConnection, 8, Logger::LL_INFO }, - { EventReport::Disconnected, LogLevel::llConnection, 8, Logger::LL_ALERT }, - { EventReport::CommunicationClosed, LogLevel::llConnection, 8, Logger::LL_INFO }, - { EventReport::CommunicationOpened, LogLevel::llConnection, 8, Logger::LL_INFO }, - { EventReport::ConnectedApiVersion, LogLevel::llConnection, 8, Logger::LL_INFO }, + { NDB_LE_Connected, LogLevel::llConnection, 8, Logger::LL_INFO }, + { NDB_LE_Disconnected, LogLevel::llConnection, 8, Logger::LL_ALERT }, + { NDB_LE_CommunicationClosed, LogLevel::llConnection, 8, Logger::LL_INFO }, + { NDB_LE_CommunicationOpened, LogLevel::llConnection, 8, Logger::LL_INFO }, + { NDB_LE_ConnectedApiVersion, LogLevel::llConnection, 8, Logger::LL_INFO }, // CHECKPOINT - { EventReport::GlobalCheckpointStarted, LogLevel::llCheckpoint, 9, Logger::LL_INFO }, - { EventReport::GlobalCheckpointCompleted,LogLevel::llCheckpoint,10, Logger::LL_INFO }, - { EventReport::LocalCheckpointStarted, LogLevel::llCheckpoint, 7, Logger::LL_INFO }, - { EventReport::LocalCheckpointCompleted,LogLevel::llCheckpoint, 8, Logger::LL_INFO }, - { EventReport::LCPStoppedInCalcKeepGci, LogLevel::llCheckpoint, 0, Logger::LL_ALERT }, - { EventReport::LCPFragmentCompleted, LogLevel::llCheckpoint, 11, Logger::LL_INFO }, - { EventReport::UndoLogBlocked, LogLevel::llCheckpoint, 7, Logger::LL_INFO }, + { NDB_LE_GlobalCheckpointStarted, LogLevel::llCheckpoint, 9, Logger::LL_INFO }, + { NDB_LE_GlobalCheckpointCompleted,LogLevel::llCheckpoint,10, Logger::LL_INFO }, + { NDB_LE_LocalCheckpointStarted, LogLevel::llCheckpoint, 7, Logger::LL_INFO }, + { NDB_LE_LocalCheckpointCompleted,LogLevel::llCheckpoint, 8, Logger::LL_INFO }, + { NDB_LE_LCPStoppedInCalcKeepGci, LogLevel::llCheckpoint, 0, Logger::LL_ALERT }, + { NDB_LE_LCPFragmentCompleted, LogLevel::llCheckpoint, 11, Logger::LL_INFO }, + { NDB_LE_UndoLogBlocked, LogLevel::llCheckpoint, 7, Logger::LL_INFO }, // STARTUP - { EventReport::NDBStartStarted, LogLevel::llStartUp, 1, Logger::LL_INFO }, - { EventReport::NDBStartCompleted, LogLevel::llStartUp, 1, Logger::LL_INFO }, - { EventReport::STTORRYRecieved, LogLevel::llStartUp,15, Logger::LL_INFO }, - { EventReport::StartPhaseCompleted, LogLevel::llStartUp, 4, Logger::LL_INFO }, - { EventReport::CM_REGCONF, LogLevel::llStartUp, 3, Logger::LL_INFO }, - { EventReport::CM_REGREF, LogLevel::llStartUp, 8, Logger::LL_INFO }, - { EventReport::FIND_NEIGHBOURS, LogLevel::llStartUp, 8, Logger::LL_INFO }, - { EventReport::NDBStopStarted, LogLevel::llStartUp, 1, Logger::LL_INFO }, - { EventReport::NDBStopAborted, LogLevel::llStartUp, 1, Logger::LL_INFO }, - { EventReport::StartREDOLog, LogLevel::llStartUp, 10, Logger::LL_INFO }, - { EventReport::StartLog, LogLevel::llStartUp, 10, Logger::LL_INFO }, - { EventReport::UNDORecordsExecuted, LogLevel::llStartUp, 15, Logger::LL_INFO }, + { NDB_LE_NDBStartStarted, LogLevel::llStartUp, 1, Logger::LL_INFO }, + { NDB_LE_NDBStartCompleted, LogLevel::llStartUp, 1, Logger::LL_INFO }, + { NDB_LE_STTORRYRecieved, LogLevel::llStartUp,15, Logger::LL_INFO }, + { NDB_LE_StartPhaseCompleted, LogLevel::llStartUp, 4, Logger::LL_INFO }, + { NDB_LE_CM_REGCONF, LogLevel::llStartUp, 3, Logger::LL_INFO }, + { NDB_LE_CM_REGREF, LogLevel::llStartUp, 8, Logger::LL_INFO }, + { NDB_LE_FIND_NEIGHBOURS, LogLevel::llStartUp, 8, Logger::LL_INFO }, + { NDB_LE_NDBStopStarted, LogLevel::llStartUp, 1, Logger::LL_INFO }, + { NDB_LE_NDBStopAborted, LogLevel::llStartUp, 1, Logger::LL_INFO }, + { NDB_LE_StartREDOLog, LogLevel::llStartUp, 10, Logger::LL_INFO }, + { NDB_LE_StartLog, LogLevel::llStartUp, 10, Logger::LL_INFO }, + { NDB_LE_UNDORecordsExecuted, LogLevel::llStartUp, 15, Logger::LL_INFO }, // NODERESTART - { EventReport::NR_CopyDict, LogLevel::llNodeRestart, 8, Logger::LL_INFO }, - { EventReport::NR_CopyDistr, LogLevel::llNodeRestart, 8, Logger::LL_INFO }, - { EventReport::NR_CopyFragsStarted, LogLevel::llNodeRestart, 8, Logger::LL_INFO }, - { EventReport::NR_CopyFragDone, LogLevel::llNodeRestart, 10, Logger::LL_INFO }, - { EventReport::NR_CopyFragsCompleted, LogLevel::llNodeRestart, 8, Logger::LL_INFO }, + { NDB_LE_NR_CopyDict, LogLevel::llNodeRestart, 8, Logger::LL_INFO }, + { NDB_LE_NR_CopyDistr, LogLevel::llNodeRestart, 8, Logger::LL_INFO }, + { NDB_LE_NR_CopyFragsStarted, LogLevel::llNodeRestart, 8, Logger::LL_INFO }, + { NDB_LE_NR_CopyFragDone, LogLevel::llNodeRestart, 10, Logger::LL_INFO }, + { NDB_LE_NR_CopyFragsCompleted, LogLevel::llNodeRestart, 8, Logger::LL_INFO }, - { EventReport::NodeFailCompleted, LogLevel::llNodeRestart, 8, Logger::LL_ALERT}, - { EventReport::NODE_FAILREP, LogLevel::llNodeRestart, 8, Logger::LL_ALERT}, - { EventReport::ArbitState, LogLevel::llNodeRestart, 6, Logger::LL_INFO }, - { EventReport::ArbitResult, LogLevel::llNodeRestart, 2, Logger::LL_ALERT}, - { EventReport::GCP_TakeoverStarted, LogLevel::llNodeRestart, 7, Logger::LL_INFO }, - { EventReport::GCP_TakeoverCompleted, LogLevel::llNodeRestart, 7, Logger::LL_INFO }, - { EventReport::LCP_TakeoverStarted, LogLevel::llNodeRestart, 7, Logger::LL_INFO }, - { EventReport::LCP_TakeoverCompleted, LogLevel::llNodeRestart, 7, Logger::LL_INFO }, + { NDB_LE_NodeFailCompleted, LogLevel::llNodeRestart, 8, Logger::LL_ALERT}, + { NDB_LE_NODE_FAILREP, LogLevel::llNodeRestart, 8, Logger::LL_ALERT}, + { NDB_LE_ArbitState, LogLevel::llNodeRestart, 6, Logger::LL_INFO }, + { NDB_LE_ArbitResult, LogLevel::llNodeRestart, 2, Logger::LL_ALERT}, + { NDB_LE_GCP_TakeoverStarted, LogLevel::llNodeRestart, 7, Logger::LL_INFO }, + { NDB_LE_GCP_TakeoverCompleted, LogLevel::llNodeRestart, 7, Logger::LL_INFO }, + { NDB_LE_LCP_TakeoverStarted, LogLevel::llNodeRestart, 7, Logger::LL_INFO }, + { NDB_LE_LCP_TakeoverCompleted, LogLevel::llNodeRestart, 7, Logger::LL_INFO }, // STATISTIC - { EventReport::TransReportCounters, LogLevel::llStatistic, 8, Logger::LL_INFO }, - { EventReport::OperationReportCounters, LogLevel::llStatistic, 8, Logger::LL_INFO }, - { EventReport::TableCreated, LogLevel::llStatistic, 7, Logger::LL_INFO }, - { EventReport::JobStatistic, LogLevel::llStatistic, 9, Logger::LL_INFO }, - { EventReport::SendBytesStatistic, LogLevel::llStatistic, 9, Logger::LL_INFO }, - { EventReport::ReceiveBytesStatistic, LogLevel::llStatistic, 9, Logger::LL_INFO }, - { EventReport::MemoryUsage, LogLevel::llStatistic, 5, Logger::LL_INFO }, + { NDB_LE_TransReportCounters, LogLevel::llStatistic, 8, Logger::LL_INFO }, + { NDB_LE_OperationReportCounters, LogLevel::llStatistic, 8, Logger::LL_INFO }, + { NDB_LE_TableCreated, LogLevel::llStatistic, 7, Logger::LL_INFO }, + { NDB_LE_JobStatistic, LogLevel::llStatistic, 9, Logger::LL_INFO }, + { NDB_LE_SendBytesStatistic, LogLevel::llStatistic, 9, Logger::LL_INFO }, + { NDB_LE_ReceiveBytesStatistic, LogLevel::llStatistic, 9, Logger::LL_INFO }, + { NDB_LE_MemoryUsage, LogLevel::llStatistic, 5, Logger::LL_INFO }, // ERROR - { EventReport::TransporterError, LogLevel::llError, 2, Logger::LL_ERROR }, - { EventReport::TransporterWarning, LogLevel::llError, 8, Logger::LL_WARNING }, - { EventReport::MissedHeartbeat, LogLevel::llError, 8, Logger::LL_WARNING }, - { EventReport::DeadDueToHeartbeat, LogLevel::llError, 8, Logger::LL_ALERT }, - { EventReport::WarningEvent, LogLevel::llError, 2, Logger::LL_WARNING }, + { NDB_LE_TransporterError, LogLevel::llError, 2, Logger::LL_ERROR }, + { NDB_LE_TransporterWarning, LogLevel::llError, 8, Logger::LL_WARNING }, + { NDB_LE_MissedHeartbeat, LogLevel::llError, 8, Logger::LL_WARNING }, + { NDB_LE_DeadDueToHeartbeat, LogLevel::llError, 8, Logger::LL_ALERT }, + { NDB_LE_WarningEvent, LogLevel::llError, 2, Logger::LL_WARNING }, // INFO - { EventReport::SentHeartbeat, LogLevel::llInfo, 12, Logger::LL_INFO }, - { EventReport::CreateLogBytes, LogLevel::llInfo, 11, Logger::LL_INFO }, - { EventReport::InfoEvent, LogLevel::llInfo, 2, Logger::LL_INFO }, + { NDB_LE_SentHeartbeat, LogLevel::llInfo, 12, Logger::LL_INFO }, + { NDB_LE_CreateLogBytes, LogLevel::llInfo, 11, Logger::LL_INFO }, + { NDB_LE_InfoEvent, LogLevel::llInfo, 2, Logger::LL_INFO }, // Backup - { EventReport::BackupStarted, LogLevel::llBackup, 7, Logger::LL_INFO }, - { EventReport::BackupCompleted, LogLevel::llBackup, 7, Logger::LL_INFO }, - { EventReport::BackupFailedToStart, LogLevel::llBackup, 7, Logger::LL_ALERT}, - { EventReport::BackupAborted, LogLevel::llBackup, 7, Logger::LL_ALERT } + { NDB_LE_BackupStarted, LogLevel::llBackup, 7, Logger::LL_INFO }, + { NDB_LE_BackupCompleted, LogLevel::llBackup, 7, Logger::LL_INFO }, + { NDB_LE_BackupFailedToStart, LogLevel::llBackup, 7, Logger::LL_ALERT}, + { NDB_LE_BackupAborted, LogLevel::llBackup, 7, Logger::LL_ALERT } }; const Uint32 EventLoggerBase::matrixSize = sizeof(EventLoggerBase::matrix)/ @@ -128,15 +128,15 @@ EventLogger::getText(char * m_text, size_t m_text_len, theNodeId[0] = 0; } - EventReport::EventType eventType = (EventReport::EventType)type; + Ndb_logevent_type eventType = (Ndb_logevent_type)type; switch (eventType){ - case EventReport::Connected: + case NDB_LE_Connected: BaseString::snprintf(m_text, m_text_len, "%sNode %u Connected", theNodeId, theData[1]); break; - case EventReport::ConnectedApiVersion: + case NDB_LE_ConnectedApiVersion: BaseString::snprintf(m_text, m_text_len, "%sNode %u: API version %d.%d.%d", theNodeId, @@ -145,13 +145,13 @@ EventLogger::getText(char * m_text, size_t m_text_len, getMinor(theData[2]), getBuild(theData[2])); break; - case EventReport::Disconnected: + case NDB_LE_Disconnected: BaseString::snprintf(m_text, m_text_len, "%sNode %u Disconnected", theNodeId, theData[1]); break; - case EventReport::CommunicationClosed: + case NDB_LE_CommunicationClosed: //----------------------------------------------------------------------- // REPORT communication to node closed. //----------------------------------------------------------------------- @@ -160,7 +160,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theNodeId, theData[1]); break; - case EventReport::CommunicationOpened: + case NDB_LE_CommunicationOpened: //----------------------------------------------------------------------- // REPORT communication to node opened. //----------------------------------------------------------------------- @@ -169,7 +169,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theNodeId, theData[1]); break; - case EventReport::NDBStartStarted: + case NDB_LE_NDBStartStarted: //----------------------------------------------------------------------- // Start of NDB has been initiated. //----------------------------------------------------------------------- @@ -180,18 +180,18 @@ EventLogger::getText(char * m_text, size_t m_text_len, getMinor(theData[1]), getBuild(theData[1])); break; - case EventReport::NDBStopStarted: + case NDB_LE_NDBStopStarted: BaseString::snprintf(m_text, m_text_len, "%s%s shutdown initiated", theNodeId, (theData[1] == 1 ? "Cluster" : "Node")); break; - case EventReport::NDBStopAborted: + case NDB_LE_NDBStopAborted: BaseString::snprintf(m_text, m_text_len, "%sNode shutdown aborted", theNodeId); break; - case EventReport::NDBStartCompleted: + case NDB_LE_NDBStartCompleted: //----------------------------------------------------------------------- // Start of NDB has been completed. //----------------------------------------------------------------------- @@ -203,7 +203,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, getBuild(theData[1])); break; - case EventReport::STTORRYRecieved: + case NDB_LE_STTORRYRecieved: //----------------------------------------------------------------------- // STTORRY recevied after restart finished. //----------------------------------------------------------------------- @@ -211,7 +211,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, "%sSTTORRY received after restart finished", theNodeId); break; - case EventReport::StartPhaseCompleted:{ + case NDB_LE_StartPhaseCompleted:{ //----------------------------------------------------------------------- // REPORT Start phase completed. //----------------------------------------------------------------------- @@ -249,7 +249,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, return m_text; break; } - case EventReport::CM_REGCONF: + case NDB_LE_CM_REGCONF: BaseString::snprintf(m_text, m_text_len, "%sCM_REGCONF president = %u, own Node = %u, our dynamic id = %u" , @@ -258,7 +258,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[1], theData[3]); break; - case EventReport::CM_REGREF: + case NDB_LE_CM_REGREF: { const char* line = ""; switch (theData[3]) { @@ -290,7 +290,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, line); } break; - case EventReport::FIND_NEIGHBOURS: + case NDB_LE_FIND_NEIGHBOURS: //----------------------------------------------------------------------- // REPORT Node Restart copied a fragment. //----------------------------------------------------------------------- @@ -304,7 +304,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[2], theData[3]); break; - case EventReport::NodeFailCompleted: + case NDB_LE_NodeFailCompleted: //----------------------------------------------------------------------- // REPORT Node failure phase completed. //----------------------------------------------------------------------- @@ -341,7 +341,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, line); } break; - case EventReport::NODE_FAILREP: + case NDB_LE_NODE_FAILREP: BaseString::snprintf(m_text, m_text_len, "%sNode %u has failed. The Node state at failure " @@ -351,7 +351,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[2]); break; - case EventReport::ArbitState: + case NDB_LE_ArbitState: //----------------------------------------------------------------------- // REPORT arbitrator found or lost. //----------------------------------------------------------------------- @@ -403,7 +403,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, } } break; - case EventReport::ArbitResult: + case NDB_LE_ArbitResult: //----------------------------------------------------------------------- // REPORT arbitration result (the failures may not reach us). //----------------------------------------------------------------------- @@ -466,7 +466,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, } } break; - case EventReport::GlobalCheckpointStarted: + case NDB_LE_GlobalCheckpointStarted: //----------------------------------------------------------------------- // This event reports that a global checkpoint has been started and this // node is the master of this global checkpoint. @@ -477,7 +477,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theNodeId, theData[1]); break; - case EventReport::GlobalCheckpointCompleted: + case NDB_LE_GlobalCheckpointCompleted: //----------------------------------------------------------------------- // This event reports that a global checkpoint has been completed on this // node and the node is the master of this global checkpoint. @@ -487,7 +487,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theNodeId, theData[1]); break; - case EventReport::LocalCheckpointStarted: + case NDB_LE_LocalCheckpointStarted: //----------------------------------------------------------------------- // This event reports that a local checkpoint has been started and this // node is the master of this local checkpoint. @@ -501,7 +501,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[2], theData[3]); break; - case EventReport::LocalCheckpointCompleted: + case NDB_LE_LocalCheckpointCompleted: //----------------------------------------------------------------------- // This event reports that a local checkpoint has been completed on this // node and the node is the master of this local checkpoint. @@ -512,7 +512,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theNodeId, theData[1]); break; - case EventReport::TableCreated: + case NDB_LE_TableCreated: //----------------------------------------------------------------------- // This event reports that a table has been created. //----------------------------------------------------------------------- @@ -521,13 +521,13 @@ EventLogger::getText(char * m_text, size_t m_text_len, theNodeId, theData[1]); break; - case EventReport::LCPStoppedInCalcKeepGci: + case NDB_LE_LCPStoppedInCalcKeepGci: if (theData[1] == 0) BaseString::snprintf(m_text, m_text_len, "%sLocal Checkpoint stopped in CALCULATED_KEEP_GCI", theNodeId); break; - case EventReport::NR_CopyDict: + case NDB_LE_NR_CopyDict: //----------------------------------------------------------------------- // REPORT Node Restart completed copy of dictionary information. //----------------------------------------------------------------------- @@ -536,7 +536,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, "%sNode restart completed copy of dictionary information", theNodeId); break; - case EventReport::NR_CopyDistr: + case NDB_LE_NR_CopyDistr: //----------------------------------------------------------------------- // REPORT Node Restart completed copy of distribution information. //----------------------------------------------------------------------- @@ -545,7 +545,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, "%sNode restart completed copy of distribution information", theNodeId); break; - case EventReport::NR_CopyFragsStarted: + case NDB_LE_NR_CopyFragsStarted: //----------------------------------------------------------------------- // REPORT Node Restart is starting to copy the fragments. //----------------------------------------------------------------------- @@ -556,7 +556,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theNodeId, theData[1]); break; - case EventReport::NR_CopyFragDone: + case NDB_LE_NR_CopyFragDone: //----------------------------------------------------------------------- // REPORT Node Restart copied a fragment. //----------------------------------------------------------------------- @@ -569,7 +569,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[3], theData[1]); break; - case EventReport::NR_CopyFragsCompleted: + case NDB_LE_NR_CopyFragsCompleted: BaseString::snprintf(m_text, m_text_len, "%sNode restart completed copying the fragments " @@ -577,7 +577,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theNodeId, theData[1]); break; - case EventReport::LCPFragmentCompleted: + case NDB_LE_LCPFragmentCompleted: BaseString::snprintf(m_text, m_text_len, "%sTable ID = %u, fragment ID = %u has completed LCP " @@ -587,7 +587,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[3], theData[1]); break; - case EventReport::TransReportCounters: + case NDB_LE_TransReportCounters: // ------------------------------------------------------------------- // Report information about transaction activity once per 10 seconds. // ------------------------------------------------------------------- @@ -610,13 +610,13 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[9], theData[10]); break; - case EventReport::OperationReportCounters: + case NDB_LE_OperationReportCounters: BaseString::snprintf(m_text, m_text_len, "%sOperations=%u", theNodeId, theData[1]); break; - case EventReport::UndoLogBlocked: + case NDB_LE_UndoLogBlocked: //----------------------------------------------------------------------- // REPORT Undo Logging blocked due to buffer near to overflow. //----------------------------------------------------------------------- @@ -627,8 +627,8 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[1], theData[2]); break; - case EventReport::TransporterError: - case EventReport::TransporterWarning: + case NDB_LE_TransporterError: + case NDB_LE_TransporterWarning: BaseString::snprintf(m_text, m_text_len, "%sTransporter to node %d reported error 0x%x", @@ -636,7 +636,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[1], theData[2]); break; - case EventReport::MissedHeartbeat: + case NDB_LE_MissedHeartbeat: //----------------------------------------------------------------------- // REPORT Undo Logging blocked due to buffer near to overflow. //----------------------------------------------------------------------- @@ -647,7 +647,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[1], theData[2]); break; - case EventReport::DeadDueToHeartbeat: + case NDB_LE_DeadDueToHeartbeat: //----------------------------------------------------------------------- // REPORT Undo Logging blocked due to buffer near to overflow. //----------------------------------------------------------------------- @@ -657,14 +657,14 @@ EventLogger::getText(char * m_text, size_t m_text_len, theNodeId, theData[1]); break; - case EventReport::JobStatistic: + case NDB_LE_JobStatistic: BaseString::snprintf(m_text, m_text_len, "%sMean loop Counter in doJob last 8192 times = %u", theNodeId, theData[1]); break; - case EventReport::SendBytesStatistic: + case NDB_LE_SendBytesStatistic: BaseString::snprintf(m_text, m_text_len, "%sMean send size to Node = %d last 4096 sends = %u bytes", @@ -672,7 +672,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[1], theData[2]); break; - case EventReport::ReceiveBytesStatistic: + case NDB_LE_ReceiveBytesStatistic: BaseString::snprintf(m_text, m_text_len, "%sMean receive size to Node = %d last 4096 sends = %u bytes", @@ -680,14 +680,14 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[1], theData[2]); break; - case EventReport::SentHeartbeat: + case NDB_LE_SentHeartbeat: BaseString::snprintf(m_text, m_text_len, "%sNode Sent Heartbeat to node = %d", theNodeId, theData[1]); break; - case EventReport::CreateLogBytes: + case NDB_LE_CreateLogBytes: BaseString::snprintf(m_text, m_text_len, "%sLog part %u, log file %u, MB %u", @@ -696,7 +696,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[2], theData[3]); break; - case EventReport::StartLog: + case NDB_LE_StartLog: BaseString::snprintf(m_text, m_text_len, "%sLog part %u, start MB %u, stop MB %u, last GCI, log exec %u", @@ -706,7 +706,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[3], theData[4]); break; - case EventReport::StartREDOLog: + case NDB_LE_StartREDOLog: BaseString::snprintf(m_text, m_text_len, "%sNode: %d StartLog: [GCI Keep: %d LastCompleted: %d NewestRestorable: %d]", @@ -716,7 +716,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[3], theData[4]); break; - case EventReport::UNDORecordsExecuted:{ + case NDB_LE_UNDORecordsExecuted:{ const char* line = ""; if (theData[1] == DBTUP){ line = "DBTUP"; @@ -741,42 +741,42 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[11]); } break; - case EventReport::InfoEvent: + case NDB_LE_InfoEvent: BaseString::snprintf(m_text, m_text_len, "%s%s", theNodeId, (char *)&theData[1]); break; - case EventReport::WarningEvent: + case NDB_LE_WarningEvent: BaseString::snprintf(m_text, m_text_len, "%s%s", theNodeId, (char *)&theData[1]); break; - case EventReport::GCP_TakeoverStarted: + case NDB_LE_GCP_TakeoverStarted: BaseString::snprintf(m_text, m_text_len, "%sGCP Take over started", theNodeId); break; - case EventReport::GCP_TakeoverCompleted: + case NDB_LE_GCP_TakeoverCompleted: BaseString::snprintf(m_text, m_text_len, "%sGCP Take over completed", theNodeId); break; - case EventReport::LCP_TakeoverStarted: + case NDB_LE_LCP_TakeoverStarted: BaseString::snprintf(m_text, m_text_len, "%sLCP Take over started", theNodeId); break; - case EventReport::LCP_TakeoverCompleted: + case NDB_LE_LCP_TakeoverCompleted: BaseString::snprintf(m_text, m_text_len, "%sLCP Take over completed (state = %d)", theNodeId, theData[1]); break; - case EventReport::MemoryUsage:{ + case NDB_LE_MemoryUsage:{ const int gth = theData[1]; const int size = theData[2]; const int used = theData[3]; @@ -794,7 +794,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ); break; } - case EventReport::GrepSubscriptionInfo : + case NDB_LE_GrepSubscriptionInfo : { GrepEvent::Subscription event = (GrepEvent::Subscription)theData[1]; switch(event) { @@ -1015,7 +1015,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, break; } - case EventReport::GrepSubscriptionAlert : + case NDB_LE_GrepSubscriptionAlert : { GrepEvent::Subscription event = (GrepEvent::Subscription)theData[1]; switch(event) @@ -1261,19 +1261,19 @@ EventLogger::getText(char * m_text, size_t m_text_len, break; } - case EventReport::BackupStarted: + case NDB_LE_BackupStarted: BaseString::snprintf(m_text, m_text_len, "%sBackup %d started from node %d", theNodeId, theData[2], refToNode(theData[1])); break; - case EventReport::BackupFailedToStart: + case NDB_LE_BackupFailedToStart: BaseString::snprintf(m_text, m_text_len, "%sBackup request from %d failed to start. Error: %d", theNodeId, refToNode(theData[1]), theData[2]); break; - case EventReport::BackupCompleted: + case NDB_LE_BackupCompleted: BaseString::snprintf(m_text, m_text_len, "%sBackup %u started from node %u completed\n" @@ -1284,7 +1284,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, theData[3], theData[4], theData[6], theData[8], theData[5], theData[7]); break; - case EventReport::BackupAborted: + case NDB_LE_BackupAborted: BaseString::snprintf(m_text, m_text_len, "%sBackup %d started from %d has been aborted. Error: %d", diff --git a/ndb/src/kernel/blocks/backup/Backup.cpp b/ndb/src/kernel/blocks/backup/Backup.cpp index d72efdd0a52..86bbf27f40e 100644 --- a/ndb/src/kernel/blocks/backup/Backup.cpp +++ b/ndb/src/kernel/blocks/backup/Backup.cpp @@ -954,7 +954,7 @@ Backup::sendBackupRef(BlockReference senderRef, Signal *signal, sendSignal(senderRef, GSN_BACKUP_REF, signal, BackupRef::SignalLength, JBB); if(errorCode != BackupRef::IAmNotMaster){ - signal->theData[0] = EventReport::BackupFailedToStart; + signal->theData[0] = NDB_LE_BackupFailedToStart; signal->theData[1] = senderRef; signal->theData[2] = errorCode; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB); @@ -1246,7 +1246,7 @@ Backup::defineBackupReply(Signal* signal, BackupRecordPtr ptr, Uint32 nodeId) sendSignal(ptr.p->clientRef, GSN_BACKUP_CONF, signal, BackupConf::SignalLength, JBB); - signal->theData[0] = EventReport::BackupStarted; + signal->theData[0] = NDB_LE_BackupStarted; signal->theData[1] = ptr.p->clientRef; signal->theData[2] = ptr.p->backupId; ptr.p->nodes.copyto(NdbNodeBitmask::Size, signal->theData+3); @@ -2091,7 +2091,7 @@ Backup::stopBackupReply(Signal* signal, BackupRecordPtr ptr, Uint32 nodeId) sendSignal(ptr.p->clientRef, GSN_BACKUP_COMPLETE_REP, signal, BackupCompleteRep::SignalLength, JBB); - signal->theData[0] = EventReport::BackupCompleted; + signal->theData[0] = NDB_LE_BackupCompleted; signal->theData[1] = ptr.p->clientRef; signal->theData[2] = ptr.p->backupId; signal->theData[3] = ptr.p->startGCP; @@ -2293,7 +2293,7 @@ Backup::masterSendAbortBackup(Signal* signal, BackupRecordPtr ptr) sendSignal(ptr.p->clientRef, GSN_BACKUP_ABORT_REP, signal, BackupAbortRep::SignalLength, JBB); - signal->theData[0] = EventReport::BackupAborted; + signal->theData[0] = NDB_LE_BackupAborted; signal->theData[1] = ptr.p->clientRef; signal->theData[2] = ptr.p->backupId; signal->theData[3] = ptr.p->errorCode; diff --git a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp index c1dca184466..ba7a77fa4a9 100644 --- a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp +++ b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp @@ -188,7 +188,7 @@ void Cmvmi::execEVENT_REP(Signal* signal) // to the graphical management interface. //----------------------------------------------------------------------- EventReport * const eventReport = (EventReport *)&signal->theData[0]; - EventReport::EventType eventType = eventReport->getEventType(); + Ndb_logevent_type eventType = eventReport->getEventType(); jamEntry(); @@ -362,7 +362,7 @@ void Cmvmi::execCLOSE_COMREQ(Signal* signal) //----------------------------------------------------- // Report that the connection to the node is closed //----------------------------------------------------- - signal->theData[0] = EventReport::CommunicationClosed; + signal->theData[0] = NDB_LE_CommunicationClosed; signal->theData[1] = i; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); @@ -396,7 +396,7 @@ void Cmvmi::execOPEN_COMREQ(Signal* signal) //----------------------------------------------------- // Report that the connection to the node is opened //----------------------------------------------------- - signal->theData[0] = EventReport::CommunicationOpened; + signal->theData[0] = NDB_LE_CommunicationOpened; signal->theData[1] = tStartingNode; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); //----------------------------------------------------- @@ -408,7 +408,7 @@ void Cmvmi::execOPEN_COMREQ(Signal* signal) globalTransporterRegistry.do_connect(i); globalTransporterRegistry.setIOState(i, HaltIO); - signal->theData[0] = EventReport::CommunicationOpened; + signal->theData[0] = NDB_LE_CommunicationOpened; signal->theData[1] = i; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); } @@ -433,7 +433,7 @@ void Cmvmi::execENABLE_COMORD(Signal* signal) //----------------------------------------------------- // Report that the version of the node //----------------------------------------------------- - signal->theData[0] = EventReport::ConnectedApiVersion; + signal->theData[0] = NDB_LE_ConnectedApiVersion; signal->theData[1] = tStartingNode; signal->theData[2] = getNodeInfo(tStartingNode).m_version; @@ -475,7 +475,7 @@ void Cmvmi::execDISCONNECT_REP(Signal *signal) cancelSubscription(hostId); - signal->theData[0] = EventReport::Disconnected; + signal->theData[0] = NDB_LE_Disconnected; signal->theData[1] = hostId; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); } @@ -525,7 +525,7 @@ void Cmvmi::execCONNECT_REP(Signal *signal){ //------------------------------------------ // Also report this event to the Event handler //------------------------------------------ - signal->theData[0] = EventReport::Connected; + signal->theData[0] = NDB_LE_Connected; signal->theData[1] = hostId; signal->header.theLength = 2; diff --git a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp index 7033aecccf8..0b87a2f9691 100644 --- a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp +++ b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp @@ -8447,7 +8447,7 @@ void Dbacc::startUndoLab(Signal* signal) }//for // Send report of how many undo log records where executed - signal->theData[0] = EventReport::UNDORecordsExecuted; + signal->theData[0] = NDB_LE_UNDORecordsExecuted; signal->theData[1] = DBACC; // From block signal->theData[2] = 0; // Total records executed for (int i = 0; i < 10; i++){ @@ -11295,7 +11295,7 @@ void Dbacc::takeRecOutOfFreeOverpage(Signal* signal) void Dbacc::reportMemoryUsage(Signal* signal, int gth){ - signal->theData[0] = EventReport::MemoryUsage; + signal->theData[0] = NDB_LE_MemoryUsage; signal->theData[1] = gth; signal->theData[2] = sizeof(* rpPageptr.p); signal->theData[3] = cnoOfAllocatedPages; diff --git a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp index f88e53ef516..adae429e65d 100644 --- a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +++ b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp @@ -244,7 +244,7 @@ void Dbdih::sendSTART_RECREQ(Signal* signal, Uint32 nodeId) req->newestGci = SYSFILE->newestRestorableGCI; sendSignal(ref, GSN_START_RECREQ, signal, StartRecReq::SignalLength, JBB); - signal->theData[0] = EventReport::StartREDOLog; + signal->theData[0] = NDB_LE_StartREDOLog; signal->theData[1] = nodeId; signal->theData[2] = SYSFILE->keepGCI; signal->theData[3] = SYSFILE->lastCompletedGCI[nodeId]; @@ -1792,7 +1792,7 @@ void Dbdih::nodeDictStartConfLab(Signal* signal) /*-----------------------------------------------------------------*/ // Report that node restart has completed copy of dictionary. /*-----------------------------------------------------------------*/ - signal->theData[0] = EventReport::NR_CopyDict; + signal->theData[0] = NDB_LE_NR_CopyDict; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 1, JBB); }//Dbdih::nodeDictStartConfLab() @@ -1813,7 +1813,7 @@ void Dbdih::gcpBlockedLab(Signal* signal) /*-----------------------------------------------------------------*/ // Report that node restart has completed copy of distribution info. /*-----------------------------------------------------------------*/ - signal->theData[0] = EventReport::NR_CopyDistr; + signal->theData[0] = NDB_LE_NR_CopyDistr; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 1, JBB); /** @@ -1968,7 +1968,7 @@ void Dbdih::execSTART_COPYREQ(Signal* signal) /*-------------------------------------------------------------------------*/ // REPORT Copy process of node restart is now about to start up. /*-------------------------------------------------------------------------*/ - signal->theData[0] = EventReport::NR_CopyFragsStarted; + signal->theData[0] = NDB_LE_NR_CopyFragsStarted; signal->theData[1] = startNodeId; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); @@ -2933,7 +2933,7 @@ void Dbdih::execCREATE_FRAGCONF(Signal* signal) /* --------------------------------------------------------------------- */ // REPORT that copy of fragment has been completed. /* --------------------------------------------------------------------- */ - signal->theData[0] = EventReport::NR_CopyFragDone; + signal->theData[0] = NDB_LE_NR_CopyFragDone; signal->theData[1] = takeOverPtr.p->toStartingNode; signal->theData[2] = tabPtr.i; signal->theData[3] = takeOverPtr.p->toCurrentFragid; @@ -3169,7 +3169,7 @@ Dbdih::switchPrimaryMutex_locked(Signal* signal, Uint32 toPtrI, Uint32 retVal){ void Dbdih::toCopyCompletedLab(Signal * signal, TakeOverRecordPtr takeOverPtr) { - signal->theData[0] = EventReport::NR_CopyFragsCompleted; + signal->theData[0] = NDB_LE_NR_CopyFragsCompleted; signal->theData[1] = takeOverPtr.p->toStartingNode; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); @@ -4454,7 +4454,7 @@ void Dbdih::startGcpMasterTakeOver(Signal* signal, Uint32 oldMasterId){ sendLoopMacro(MASTER_GCPREQ, sendMASTER_GCPREQ); cgcpMasterTakeOverState = GMTOS_INITIAL; - signal->theData[0] = EventReport::GCP_TakeoverStarted; + signal->theData[0] = NDB_LE_GCP_TakeoverStarted; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 1, JBB); setLocalNodefailHandling(signal, oldMasterId, NF_GCP_TAKE_OVER); @@ -4961,7 +4961,7 @@ void Dbdih::MASTER_GCPhandling(Signal* signal, Uint32 failedNodeId) break; }//switch - signal->theData[0] = EventReport::GCP_TakeoverCompleted; + signal->theData[0] = NDB_LE_GCP_TakeoverCompleted; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 1, JBB); /*--------------------------------------------------*/ @@ -5393,7 +5393,7 @@ Dbdih::checkEmptyLcpComplete(Signal *signal){ if(isMaster()){ jam(); - signal->theData[0] = EventReport::LCP_TakeoverStarted; + signal->theData[0] = NDB_LE_LCP_TakeoverStarted; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 1, JBB); signal->theData[0] = 7012; @@ -5865,7 +5865,7 @@ void Dbdih::MASTER_LCPhandling(Signal* signal, Uint32 failedNodeId) ndbrequire(false); break; }//switch - signal->theData[0] = EventReport::LCP_TakeoverCompleted; + signal->theData[0] = NDB_LE_LCP_TakeoverCompleted; signal->theData[1] = c_lcpMasterTakeOverState.state; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); @@ -5900,7 +5900,7 @@ void Dbdih::execNF_COMPLETEREP(Signal* signal) /* -------------------------------------------------------------------- */ // Report the event that DBTC completed node failure handling. /* -------------------------------------------------------------------- */ - signal->theData[0] = EventReport::NodeFailCompleted; + signal->theData[0] = NDB_LE_NodeFailCompleted; signal->theData[1] = DBTC; signal->theData[2] = failedNodePtr.i; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB); @@ -5913,7 +5913,7 @@ void Dbdih::execNF_COMPLETEREP(Signal* signal) /* --------------------------------------------------------------------- */ // Report the event that DBDICT completed node failure handling. /* --------------------------------------------------------------------- */ - signal->theData[0] = EventReport::NodeFailCompleted; + signal->theData[0] = NDB_LE_NodeFailCompleted; signal->theData[1] = DBDICT; signal->theData[2] = failedNodePtr.i; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB); @@ -5926,7 +5926,7 @@ void Dbdih::execNF_COMPLETEREP(Signal* signal) /* --------------------------------------------------------------------- */ // Report the event that DBDIH completed node failure handling. /* --------------------------------------------------------------------- */ - signal->theData[0] = EventReport::NodeFailCompleted; + signal->theData[0] = NDB_LE_NodeFailCompleted; signal->theData[1] = DBDIH; signal->theData[2] = failedNodePtr.i; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB); @@ -5939,7 +5939,7 @@ void Dbdih::execNF_COMPLETEREP(Signal* signal) /* --------------------------------------------------------------------- */ // Report the event that DBDIH completed node failure handling. /* --------------------------------------------------------------------- */ - signal->theData[0] = EventReport::NodeFailCompleted; + signal->theData[0] = NDB_LE_NodeFailCompleted; signal->theData[1] = DBLQH; signal->theData[2] = failedNodePtr.i; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB); @@ -5974,7 +5974,7 @@ void Dbdih::execNF_COMPLETEREP(Signal* signal) /* -------------------------------------------------------------------- */ // Report the event that nodeId has completed node failure handling. /* -------------------------------------------------------------------- */ - signal->theData[0] = EventReport::NodeFailCompleted; + signal->theData[0] = NDB_LE_NodeFailCompleted; signal->theData[1] = 0; signal->theData[2] = failedNodePtr.i; signal->theData[3] = nodeId; @@ -6047,7 +6047,7 @@ void Dbdih::nodeFailCompletedCheckLab(Signal* signal, /* ---------------------------------------------------------------------- */ // Report the event that all nodes completed node failure handling. /* ---------------------------------------------------------------------- */ - signal->theData[0] = EventReport::NodeFailCompleted; + signal->theData[0] = NDB_LE_NodeFailCompleted; signal->theData[1] = 0; signal->theData[2] = failedNodePtr.i; signal->theData[3] = 0; @@ -7230,7 +7230,7 @@ void Dbdih::startGcpLab(Signal* signal, Uint32 aWaitTime) /***************************************************************************/ // Report the event that a global checkpoint has started. /***************************************************************************/ - signal->theData[0] = EventReport::GlobalCheckpointStarted; //Event type + signal->theData[0] = NDB_LE_GlobalCheckpointStarted; //Event type signal->theData[1] = cnewgcp; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); @@ -7693,7 +7693,7 @@ void Dbdih::execCOPY_GCICONF(Signal* signal) // Report the event that a global checkpoint has completed. /************************************************************************/ signal->setTrace(0); - signal->theData[0] = EventReport::GlobalCheckpointCompleted; //Event type + signal->theData[0] = NDB_LE_GlobalCheckpointCompleted; //Event type signal->theData[1] = coldgcp; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); @@ -9196,7 +9196,7 @@ void Dbdih::execTCGETOPSIZECONF(Signal* signal) ndbrequire(((int)c_lcpState.oldestRestorableGci) > 0); if (ERROR_INSERTED(7011)) { - signal->theData[0] = EventReport::LCPStoppedInCalcKeepGci; + signal->theData[0] = NDB_LE_LCPStoppedInCalcKeepGci; signal->theData[1] = 0; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); return; @@ -9282,7 +9282,7 @@ void Dbdih::storeNewLcpIdLab(Signal* signal) /***************************************************************************/ // Report the event that a local checkpoint has started. /***************************************************************************/ - signal->theData[0] = EventReport::LocalCheckpointStarted; //Event type + signal->theData[0] = NDB_LE_LocalCheckpointStarted; //Event type signal->theData[1] = SYSFILE->latestLCP_ID + 1; signal->theData[2] = c_lcpState.keepGci; signal->theData[3] = c_lcpState.oldestRestorableGci; @@ -9659,7 +9659,7 @@ void Dbdih::execLCP_FRAG_REP(Signal* signal) /* --------------------------------------------------------------------- */ // REPORT that local checkpoint have completed this fragment. /* --------------------------------------------------------------------- */ - signal->theData[0] = EventReport::LCPFragmentCompleted; + signal->theData[0] = NDB_LE_LCPFragmentCompleted; signal->theData[1] = nodeId; signal->theData[2] = tableId; signal->theData[3] = fragId; @@ -10108,7 +10108,7 @@ void Dbdih::allNodesLcpCompletedLab(Signal* signal) /***************************************************************************/ // Report the event that a local checkpoint has completed. /***************************************************************************/ - signal->theData[0] = EventReport::LocalCheckpointCompleted; //Event type + signal->theData[0] = NDB_LE_LocalCheckpointCompleted; //Event type signal->theData[1] = SYSFILE->latestLCP_ID; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); diff --git a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp index 11075438fb1..d9fe17af40a 100644 --- a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp +++ b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp @@ -420,7 +420,7 @@ void Dblqh::execCONTINUEB(Signal* signal) // Report information about transaction activity once per second. /* --------------------------------------------------------------------- */ if (signal->theData[1] == 0) { - signal->theData[0] = EventReport::OperationReportCounters; + signal->theData[0] = NDB_LE_OperationReportCounters; signal->theData[1] = c_Counters.operations; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); }//if @@ -2075,7 +2075,7 @@ void Dblqh::execTIME_SIGNAL(Signal* signal) if ((cCounterAccCommitBlocked > 0) || (cCounterTupCommitBlocked > 0)) { jam(); - signal->theData[0] = EventReport::UndoLogBlocked; + signal->theData[0] = NDB_LE_UndoLogBlocked; signal->theData[1] = cCounterTupCommitBlocked; signal->theData[2] = cCounterAccCommitBlocked; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB); diff --git a/ndb/src/kernel/blocks/dbtc/Dbtc.hpp b/ndb/src/kernel/blocks/dbtc/Dbtc.hpp index 0472d25318b..6b823de1e5a 100644 --- a/ndb/src/kernel/blocks/dbtc/Dbtc.hpp +++ b/ndb/src/kernel/blocks/dbtc/Dbtc.hpp @@ -1702,7 +1702,7 @@ private: c_scan_count = c_range_scan_count = 0; } Uint32 report(Signal* signal){ - signal->theData[0] = EventReport::TransReportCounters; + signal->theData[0] = NDB_LE_TransReportCounters; signal->theData[1] = ctransCount; signal->theData[2] = ccommitCount; signal->theData[3] = creadCount; diff --git a/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp b/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp index 808cfd33696..8c43de52a75 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp @@ -68,7 +68,7 @@ struct Chunk { void Dbtup::reportMemoryUsage(Signal* signal, int incDec){ - signal->theData[0] = EventReport::MemoryUsage; + signal->theData[0] = NDB_LE_MemoryUsage; signal->theData[1] = incDec; signal->theData[2] = sizeof(Page); signal->theData[3] = cnoOfAllocatedPages; diff --git a/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp b/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp index ed835dc057a..33d63e8ce49 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp @@ -418,7 +418,7 @@ void Dbtup::xlcRestartCompletedLab(Signal* signal) { cnoOfLocalLogInfo = 0; - signal->theData[0] = EventReport::UNDORecordsExecuted; + signal->theData[0] = NDB_LE_UNDORecordsExecuted; signal->theData[1] = DBTUP; // From block signal->theData[2] = 0; // Total records executed for (int i = 0; i < 10; i++) { diff --git a/ndb/src/kernel/blocks/grep/Grep.cpp b/ndb/src/kernel/blocks/grep/Grep.cpp index e89361dab06..0527c5415ab 100644 --- a/ndb/src/kernel/blocks/grep/Grep.cpp +++ b/ndb/src/kernel/blocks/grep/Grep.cpp @@ -599,7 +599,7 @@ Grep::PSCoord::execCREATE_SUBID_CONF(Signal* signal) c_subCoordinatorPool.release(subData); m_grep->sendEventRep(signal, - EventReport::GrepSubscriptionInfo, + NDB_LE_GrepSubscriptionInfo, GrepEvent::GrepPS_CreateSubIdConf, subId, subKey, @@ -863,7 +863,7 @@ Grep::PSCoord::execGREP_CREATE_CONF(Signal* signal) * Send event report */ m_grep->sendEventRep(signal, - EventReport::GrepSubscriptionInfo, + NDB_LE_GrepSubscriptionInfo, GrepEvent::GrepPS_SubCreateConf, subId, subKey, @@ -1099,7 +1099,7 @@ Grep::PSCoord::execGREP_START_CONF(Signal* signal) * Send event report */ m_grep->sendEventRep(signal, - EventReport::GrepSubscriptionInfo, + NDB_LE_GrepSubscriptionInfo, GrepEvent::GrepPS_SubStartMetaConf, subId, subKey, (Uint32)GrepError::GE_NO_ERROR); @@ -1115,7 +1115,7 @@ Grep::PSCoord::execGREP_START_CONF(Signal* signal) * Send event report */ m_grep->sendEventRep(signal, - EventReport::GrepSubscriptionInfo, + NDB_LE_GrepSubscriptionInfo, GrepEvent::GrepPS_SubStartDataConf, subId, subKey, (Uint32)GrepError::GE_NO_ERROR); @@ -1339,7 +1339,7 @@ Grep::PSCoord::execGREP_REMOVE_CONF(Signal* signal) *************************/ m_grep->sendEventRep(signal, - EventReport::GrepSubscriptionInfo, + NDB_LE_GrepSubscriptionInfo, GrepEvent::GrepPS_SubRemoveConf, subId, subKey, GrepError::GE_NO_ERROR); @@ -1675,7 +1675,7 @@ Grep::PSCoord::execGREP_SYNC_CONF(Signal* signal) event = GrepEvent::GrepPS_SubSyncDataConf; /* @todo Johan: Add firstGCI here. /Lars */ - m_grep->sendEventRep(signal, EventReport::GrepSubscriptionInfo, + m_grep->sendEventRep(signal, NDB_LE_GrepSubscriptionInfo, event, subId, subKey, (Uint32)GrepError::GE_NO_ERROR, lastGCI); @@ -1799,7 +1799,7 @@ Grep::PSCoord::sendRefToSS(Signal * signal, * Send event report */ m_grep->sendEventRep(signal, - EventReport::GrepSubscriptionAlert, + NDB_LE_GrepSubscriptionAlert, event, sub.m_subscriptionId, sub.m_subscriptionKey, @@ -1831,7 +1831,7 @@ Grep::PSCoord::sendRefToSS(Signal * signal, * Finally, send an event. */ m_grep->sendEventRep(signal, - EventReport::GrepSubscriptionAlert, + NDB_LE_GrepSubscriptionAlert, event, sub.m_subscriptionId, sub.m_subscriptionKey, @@ -1920,7 +1920,7 @@ Grep::PSPart::sendRefToPSCoord(Signal * signal, * Finally, send an event. */ m_grep->sendEventRep(signal, - EventReport::GrepSubscriptionAlert, + NDB_LE_GrepSubscriptionAlert, event, sub.m_subscriptionId, sub.m_subscriptionKey, @@ -1988,7 +1988,7 @@ Grep::PSPart::execSUB_SYNC_CONTINUE_REQ(Signal* signal) void Grep::sendEventRep(Signal * signal, - EventReport::EventType type, + Ndb_logevent_type type, GrepEvent::Subscription event, Uint32 subId, Uint32 subKey, diff --git a/ndb/src/kernel/blocks/grep/Grep.hpp b/ndb/src/kernel/blocks/grep/Grep.hpp index 7d3dd916ecc..a14143294e1 100644 --- a/ndb/src/kernel/blocks/grep/Grep.hpp +++ b/ndb/src/kernel/blocks/grep/Grep.hpp @@ -268,7 +268,7 @@ private: pspart.execSUB_GCP_COMPLETE_REP(s); }; void sendEventRep(Signal * signal, - EventReport::EventType type, + Ndb_logevent_type type, GrepEvent::Subscription event, Uint32 subId, Uint32 subKey, diff --git a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp index e155a51be08..3806f553b3a 100644 --- a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp +++ b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp @@ -1446,7 +1446,7 @@ void Ndbcntr::execNODE_FAILREP(Signal* signal) while(!allFailed.isclear()){ nodeId = allFailed.find(nodeId + 1); allFailed.clear(nodeId); - signal->theData[0] = EventReport::NODE_FAILREP; + signal->theData[0] = NDB_LE_NODE_FAILREP; signal->theData[1] = nodeId; signal->theData[2] = 0; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB); @@ -2028,7 +2028,7 @@ Ndbcntr::execSTOP_REQ(Signal* signal){ } } - signal->theData[0] = EventReport::NDBStopStarted; + signal->theData[0] = NDB_LE_NDBStopStarted; signal->theData[1] = StopReq::getSystemStop(c_stopRec.stopReq.requestInfo) ? 1 : 0; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); @@ -2117,7 +2117,7 @@ Ndbcntr::StopRecord::checkNodeFail(Signal* signal){ cntr.updateNodeState(signal, newState); - signal->theData[0] = EventReport::NDBStopAborted; + signal->theData[0] = NDB_LE_NDBStopAborted; cntr.sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 1, JBB); return false; @@ -2402,7 +2402,7 @@ Ndbcntr::execFSREMOVECONF(Signal* signal){ } void Ndbcntr::Missra::execSTART_ORD(Signal* signal){ - signal->theData[0] = EventReport::NDBStartStarted; + signal->theData[0] = NDB_LE_NDBStartStarted; signal->theData[1] = NDB_VERSION; cntr.sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); @@ -2524,14 +2524,14 @@ void Ndbcntr::Missra::sendNextSTTOR(Signal* signal){ * At least one wanted this start phase, report it */ jam(); - signal->theData[0] = EventReport::StartPhaseCompleted; + signal->theData[0] = NDB_LE_StartPhaseCompleted; signal->theData[1] = currentStartPhase; signal->theData[2] = cntr.ctypeOfStart; cntr.sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB); } } - signal->theData[0] = EventReport::NDBStartCompleted; + signal->theData[0] = NDB_LE_NDBStartCompleted; signal->theData[1] = NDB_VERSION; cntr.sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); diff --git a/ndb/src/kernel/blocks/qmgr/Qmgr.hpp b/ndb/src/kernel/blocks/qmgr/Qmgr.hpp index 0ff7cea6d9f..bff79215264 100644 --- a/ndb/src/kernel/blocks/qmgr/Qmgr.hpp +++ b/ndb/src/kernel/blocks/qmgr/Qmgr.hpp @@ -303,7 +303,7 @@ private: void stateArbitChoose(Signal* signal); void stateArbitCrash(Signal* signal); void computeArbitNdbMask(NodeBitmask& aMask); - void reportArbitEvent(Signal* signal, EventReport::EventType type); + void reportArbitEvent(Signal* signal, Ndb_logevent_type type); // Initialisation void initData(); diff --git a/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp b/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp index da8596076ec..04373dae93c 100644 --- a/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp +++ b/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp @@ -608,7 +608,7 @@ void Qmgr::execCM_REGCONF(Signal* signal) // Send this as an EVENT REPORT to inform about hearing about // other NDB node proclaiming to be president. /*--------------------------------------------------------------*/ - signal->theData[0] = EventReport::CM_REGCONF; + signal->theData[0] = NDB_LE_CM_REGCONF; signal->theData[1] = getOwnNodeId(); signal->theData[2] = cpresident; signal->theData[3] = TdynamicId; @@ -734,7 +734,7 @@ void Qmgr::execCM_REGREF(Signal* signal) // Send this as an EVENT REPORT to inform about hearing about // other NDB node proclaiming not to be president. /*--------------------------------------------------------------*/ - signal->theData[0] = EventReport::CM_REGREF; + signal->theData[0] = NDB_LE_CM_REGREF; signal->theData[1] = getOwnNodeId(); signal->theData[2] = TaddNodeno; //----------------------------------------- @@ -1303,7 +1303,7 @@ void Qmgr::findNeighbours(Signal* signal) }//if }//if - signal->theData[0] = EventReport::FIND_NEIGHBOURS; + signal->theData[0] = NDB_LE_FIND_NEIGHBOURS; signal->theData[1] = getOwnNodeId(); signal->theData[2] = cneighbourl; signal->theData[3] = cneighbourh; @@ -1529,7 +1529,7 @@ void Qmgr::sendHeartbeat(Signal* signal) sendSignal(localNodePtr.p->blockRef, GSN_CM_HEARTBEAT, signal, 1, JBA); #ifdef VM_TRACE - signal->theData[0] = EventReport::SentHeartbeat; + signal->theData[0] = NDB_LE_SentHeartbeat; signal->theData[1] = localNodePtr.i; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); #endif @@ -1555,7 +1555,7 @@ void Qmgr::checkHeartbeat(Signal* signal) ndbrequire(getNodeInfo(nodePtr.i).m_type == NodeInfo::DB); if(nodePtr.p->alarmCount > 2){ - signal->theData[0] = EventReport::MissedHeartbeat; + signal->theData[0] = NDB_LE_MissedHeartbeat; signal->theData[1] = nodePtr.i; signal->theData[2] = nodePtr.p->alarmCount - 1; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB); @@ -1567,7 +1567,7 @@ void Qmgr::checkHeartbeat(Signal* signal) * OUR LEFT NEIGHBOUR HAVE KEPT QUIET FOR THREE CONSECUTIVE HEARTBEAT * PERIODS. THUS WE DECLARE HIM DOWN. *----------------------------------------------------------------------*/ - signal->theData[0] = EventReport::DeadDueToHeartbeat; + signal->theData[0] = NDB_LE_DeadDueToHeartbeat; signal->theData[1] = nodePtr.i; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); @@ -1596,7 +1596,7 @@ void Qmgr::apiHbHandlingLab(Signal* signal) TnodePtr.p->alarmCount ++; if(TnodePtr.p->alarmCount > 2){ - signal->theData[0] = EventReport::MissedHeartbeat; + signal->theData[0] = NDB_LE_MissedHeartbeat; signal->theData[1] = nodeId; signal->theData[2] = TnodePtr.p->alarmCount - 1; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB); @@ -1611,7 +1611,7 @@ void Qmgr::apiHbHandlingLab(Signal* signal) /*------------------------------------------------------------------*/ /* We call node_failed to release all connections for this api node */ /*------------------------------------------------------------------*/ - signal->theData[0] = EventReport::DeadDueToHeartbeat; + signal->theData[0] = NDB_LE_DeadDueToHeartbeat; signal->theData[1] = nodeId; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); @@ -3067,7 +3067,7 @@ Qmgr::handleArbitApiFail(Signal* signal, Uint16 nodeId) jam(); return; } - reportArbitEvent(signal, EventReport::ArbitState); + reportArbitEvent(signal, NDB_LE_ArbitState); arbitRec.node = 0; switch (arbitRec.state) { case ARBIT_NULL: // should not happen @@ -3238,7 +3238,7 @@ Qmgr::handleArbitCheck(Signal* signal) arbitRec.newstate = true; break; } - reportArbitEvent(signal, EventReport::ArbitResult); + reportArbitEvent(signal, NDB_LE_ArbitResult); switch (arbitRec.state) { default: jam(); @@ -3265,7 +3265,7 @@ Qmgr::startArbitThread(Signal* signal) jam(); ndbrequire(cpresident == getOwnNodeId()); arbitRec.code = ArbitCode::ThreadStart; - reportArbitEvent(signal, EventReport::ArbitState); + reportArbitEvent(signal, NDB_LE_ArbitState); signal->theData[1] = ++arbitRec.thread; runArbitThread(signal); } @@ -3509,7 +3509,7 @@ Qmgr::execARBIT_PREPREQ(Signal* signal) arbitRec.node = sd->node; arbitRec.ticket = sd->ticket; arbitRec.code = sd->code; - reportArbitEvent(signal, EventReport::ArbitState); + reportArbitEvent(signal, NDB_LE_ArbitState); arbitRec.state = ARBIT_RUN; arbitRec.newstate = true; if (sd->code == ArbitCode::PrepAtrun) { @@ -3596,7 +3596,7 @@ Qmgr::stateArbitStart(Signal* signal) } if (arbitRec.recvCount) { jam(); - reportArbitEvent(signal, EventReport::ArbitState); + reportArbitEvent(signal, NDB_LE_ArbitState); if (arbitRec.code == ArbitCode::ApiStart) { jam(); arbitRec.state = ARBIT_RUN; @@ -3610,7 +3610,7 @@ Qmgr::stateArbitStart(Signal* signal) if (arbitRec.getTimediff() > getArbitTimeout()) { jam(); arbitRec.code = ArbitCode::ErrTimeout; - reportArbitEvent(signal, EventReport::ArbitState); + reportArbitEvent(signal, NDB_LE_ArbitState); arbitRec.state = ARBIT_INIT; arbitRec.newstate = true; return; @@ -3717,7 +3717,7 @@ Qmgr::stateArbitChoose(Signal* signal) } if (arbitRec.recvCount) { jam(); - reportArbitEvent(signal, EventReport::ArbitResult); + reportArbitEvent(signal, NDB_LE_ArbitResult); if (arbitRec.code == ArbitCode::WinChoose) { jam(); sendCommitFailReq(signal); // start commit of failed nodes @@ -3733,7 +3733,7 @@ Qmgr::stateArbitChoose(Signal* signal) if (arbitRec.getTimediff() > getArbitTimeout()) { jam(); arbitRec.code = ArbitCode::ErrTimeout; - reportArbitEvent(signal, EventReport::ArbitState); + reportArbitEvent(signal, NDB_LE_ArbitState); arbitRec.state = ARBIT_CRASH; arbitRec.newstate = true; stateArbitCrash(signal); // do it at once @@ -3834,7 +3834,7 @@ Qmgr::computeArbitNdbMask(NodeBitmask& aMask) * where sender (word 0) is event type. */ void -Qmgr::reportArbitEvent(Signal* signal, EventReport::EventType type) +Qmgr::reportArbitEvent(Signal* signal, Ndb_logevent_type type) { ArbitSignalData* sd = (ArbitSignalData*)&signal->theData[0]; sd->sender = type; diff --git a/ndb/src/kernel/vm/FastScheduler.cpp b/ndb/src/kernel/vm/FastScheduler.cpp index eca456d26dd..bd7dd2d1942 100644 --- a/ndb/src/kernel/vm/FastScheduler.cpp +++ b/ndb/src/kernel/vm/FastScheduler.cpp @@ -474,7 +474,7 @@ FastScheduler::reportDoJobStatistics(Uint32 tMeanLoopCount) { Signal signal; memset(&signal.header, 0, sizeof(signal.header)); - signal.theData[0] = EventReport::JobStatistic; + signal.theData[0] = NDB_LE_JobStatistic; signal.theData[1] = tMeanLoopCount; memset(&signal.header, 0, sizeof(SignalHeader)); diff --git a/ndb/src/kernel/vm/SimulatedBlock.cpp b/ndb/src/kernel/vm/SimulatedBlock.cpp index 94fd5769406..35c0781a24d 100644 --- a/ndb/src/kernel/vm/SimulatedBlock.cpp +++ b/ndb/src/kernel/vm/SimulatedBlock.cpp @@ -735,7 +735,7 @@ SimulatedBlock::infoEvent(const char * msg, ...) const { return; Uint32 theData[25]; - theData[0] = EventReport::InfoEvent; + theData[0] = NDB_LE_InfoEvent; char * buf = (char *)&(theData[1]); va_list ap; @@ -776,7 +776,7 @@ SimulatedBlock::warningEvent(const char * msg, ...) const { return; Uint32 theData[25]; - theData[0] = EventReport::WarningEvent; + theData[0] = NDB_LE_WarningEvent; char * buf = (char *)&(theData[1]); va_list ap; diff --git a/ndb/src/kernel/vm/TransporterCallback.cpp b/ndb/src/kernel/vm/TransporterCallback.cpp index ba929b7ea7a..0f292143c21 100644 --- a/ndb/src/kernel/vm/TransporterCallback.cpp +++ b/ndb/src/kernel/vm/TransporterCallback.cpp @@ -337,9 +337,9 @@ reportError(void * callbackObj, NodeId nodeId, TransporterError errorCode){ if(errorCode & 0x8000) - signal.theData[0] = EventReport::TransporterError; + signal.theData[0] = NDB_LE_TransporterError; else - signal.theData[0] = EventReport::TransporterWarning; + signal.theData[0] = NDB_LE_TransporterWarning; signal.theData[1] = nodeId; signal.theData[2] = errorCode; @@ -363,7 +363,7 @@ reportSendLen(void * callbackObj, signal.header.theLength = 3; signal.header.theSendersSignalId = 0; signal.header.theSendersBlockRef = numberToRef(0, globalData.ownId); - signal.theData[0] = EventReport::SendBytesStatistic; + signal.theData[0] = NDB_LE_SendBytesStatistic; signal.theData[1] = nodeId; signal.theData[2] = (bytes/count); globalScheduler.execute(&signal, JBA, CMVMI, GSN_EVENT_REP); @@ -382,7 +382,7 @@ reportReceiveLen(void * callbackObj, signal.header.theLength = 3; signal.header.theSendersSignalId = 0; signal.header.theSendersBlockRef = numberToRef(0, globalData.ownId); - signal.theData[0] = EventReport::ReceiveBytesStatistic; + signal.theData[0] = NDB_LE_ReceiveBytesStatistic; signal.theData[1] = nodeId; signal.theData[2] = (bytes/count); globalScheduler.execute(&signal, JBA, CMVMI, GSN_EVENT_REP); diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp index 63e9c5c68c7..25d7a7ad07e 100644 --- a/ndb/src/mgmsrv/MgmtSrvr.cpp +++ b/ndb/src/mgmsrv/MgmtSrvr.cpp @@ -2079,10 +2079,10 @@ MgmtSrvr::handleStatus(NodeId nodeId, bool alive) theData[1] = nodeId; if (alive) { m_started_nodes.push_back(nodeId); - theData[0] = EventReport::Connected; + theData[0] = NDB_LE_Connected; } else { handleStopReply(nodeId, 0); - theData[0] = EventReport::Disconnected; + theData[0] = NDB_LE_Disconnected; } eventReport(_ownNodeId, theData); DBUG_VOID_RETURN; @@ -2402,7 +2402,7 @@ MgmtSrvr::eventReport(NodeId nodeId, const Uint32 * theData) { const EventReport * const eventReport = (EventReport *)&theData[0]; - EventReport::EventType type = eventReport->getEventType(); + Ndb_logevent_type type = eventReport->getEventType(); // Log event g_eventLogger.log(type, theData, nodeId, &m_event_listner[0].m_logLevel); diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp index a14b6bb0efb..d6d8fc5215f 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -550,12 +550,6 @@ NdbIndexImpl::getTable() const } const NdbTableImpl * -NdbIndexImpl::getBaseTable() const -{ - return m_table; -} - -const NdbTableImpl * NdbIndexImpl::getIndexTable() const { return m_table; diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.hpp b/ndb/src/ndbapi/NdbDictionaryImpl.hpp index fb4086f5ece..2d20a0a52db 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.hpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.hpp @@ -183,7 +183,6 @@ public: void setTable(const char * table); const char * getTable() const; const NdbTableImpl * getIndexTable() const; - const NdbTableImpl * getBaseTable() const; Uint32 m_indexId; BaseString m_internalName; |