Commit aa1c81b1 authored by unknown's avatar unknown

merge fixes - SingleUser logging


ndb/include/mgmapi/ndb_logevent.h:
  Merge fix - add SingleUser log events
ndb/src/common/debugger/EventLogger.cpp:
  merge fix - add text for SingleUser log events.
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  merge fix
ndb/src/mgmapi/ndb_logevent.cpp:
  add SingeUser log info
parent aaeb2b38
...@@ -148,9 +148,9 @@ extern "C" { ...@@ -148,9 +148,9 @@ extern "C" {
/** NDB_MGM_EVENT_CATEGORY_INFO */ /** NDB_MGM_EVENT_CATEGORY_INFO */
NDB_LE_InfoEvent = 49, NDB_LE_InfoEvent = 49,
/* GREP */ /* SINGLE USER */
NDB_LE_GrepSubscriptionInfo = 52, NDB_LE_SingleUser = 52,
NDB_LE_GrepSubscriptionAlert = 53, /* NDB_LE_ UNUSED = 53, */
/** NDB_MGM_EVENT_CATEGORY_BACKUP */ /** NDB_MGM_EVENT_CATEGORY_BACKUP */
NDB_LE_BackupStarted = 54, NDB_LE_BackupStarted = 54,
...@@ -593,6 +593,10 @@ extern "C" { ...@@ -593,6 +593,10 @@ extern "C" {
unsigned backup_id; unsigned backup_id;
unsigned error; unsigned error;
} BackupAborted; } BackupAborted;
/** Log event data @ref NDB_LE_SingleUser */
struct {
unsigned node_id;
} SingleUser;
#ifndef DOXYGEN_FIX #ifndef DOXYGEN_FIX
}; };
#else #else
......
...@@ -633,6 +633,27 @@ void getTextBackupAborted(QQQQ) { ...@@ -633,6 +633,27 @@ void getTextBackupAborted(QQQQ) {
theData[3]); theData[3]);
} }
void getTextSingleUser(QQQQ) {
switch (theData[1])
{
case 0:
BaseString::snprintf(m_text, m_text_len, "Entering single user mode");
break;
case 1:
BaseString::snprintf(m_text, m_text_len,
"Entered single user mode "
"Node %d has exclusive access", theData[2]);
break;
case 2:
BaseString::snprintf(m_text, m_text_len,"Exiting single user mode");
break;
default:
BaseString::snprintf(m_text, m_text_len,
"Unknown single user report %d", theData[1]);
break;
}
}
#if 0 #if 0
BaseString::snprintf(m_text, BaseString::snprintf(m_text,
m_text_len, m_text_len,
...@@ -716,6 +737,9 @@ const EventLoggerBase::EventRepLogLevelMatrix EventLoggerBase::matrix[] = { ...@@ -716,6 +737,9 @@ const EventLoggerBase::EventRepLogLevelMatrix EventLoggerBase::matrix[] = {
ROW(CreateLogBytes, LogLevel::llInfo, 11, Logger::LL_INFO ), ROW(CreateLogBytes, LogLevel::llInfo, 11, Logger::LL_INFO ),
ROW(InfoEvent, LogLevel::llInfo, 2, Logger::LL_INFO ), ROW(InfoEvent, LogLevel::llInfo, 2, Logger::LL_INFO ),
//Single User
ROW(SingleUser, LogLevel::llInfo, 7, Logger::LL_INFO ),
// Backup // Backup
ROW(BackupStarted, LogLevel::llBackup, 7, Logger::LL_INFO ), ROW(BackupStarted, LogLevel::llBackup, 7, Logger::LL_INFO ),
ROW(BackupCompleted, LogLevel::llBackup, 7, Logger::LL_INFO ), ROW(BackupCompleted, LogLevel::llBackup, 7, Logger::LL_INFO ),
......
...@@ -1963,7 +1963,7 @@ Ndbcntr::execRESUME_REQ(Signal* signal){ ...@@ -1963,7 +1963,7 @@ Ndbcntr::execRESUME_REQ(Signal* signal){
jamEntry(); jamEntry();
signal->theData[0] = EventReport::SingleUser; signal->theData[0] = NDB_LE_SingleUser;
signal->theData[1] = 2; signal->theData[1] = 2;
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
...@@ -2248,7 +2248,7 @@ void Ndbcntr::execABORT_ALL_CONF(Signal* signal){ ...@@ -2248,7 +2248,7 @@ void Ndbcntr::execABORT_ALL_CONF(Signal* signal){
c_stopRec.stopReq.senderRef = 0; // the command is done c_stopRec.stopReq.senderRef = 0; // the command is done
signal->theData[0] = EventReport::SingleUser; signal->theData[0] = NDB_LE_SingleUser;
signal->theData[1] = 1; signal->theData[1] = 1;
signal->theData[2] = c_stopRec.stopReq.singleUserApi; signal->theData[2] = c_stopRec.stopReq.singleUserApi;
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB); sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB);
......
...@@ -289,6 +289,7 @@ struct Ndb_logevent_body_row ndb_logevent_body[]= { ...@@ -289,6 +289,7 @@ struct Ndb_logevent_body_row ndb_logevent_body[]= {
ROW( BackupAborted, "backup_id", 2, backup_id), ROW( BackupAborted, "backup_id", 2, backup_id),
ROW( BackupAborted, "error", 3, error), ROW( BackupAborted, "error", 3, error),
ROW( SingleUser, "node_id", 1, node_id),
{ NDB_LE_ILLEGAL_TYPE, 0, 0, 0, 0, 0} { NDB_LE_ILLEGAL_TYPE, 0, 0, 0, 0, 0}
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment