summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <stewart@mysql.com>2005-09-29 19:01:53 +1000
committerunknown <stewart@mysql.com>2005-09-29 19:01:53 +1000
commitaa1c81b1500aa9cfcd126d0e0742a443c29d4537 (patch)
treee85829f808527209dfc300a9265c5905c8699e27
parentaaeb2b38a56802a773525bccb1ffdcfc7e60f173 (diff)
downloadmariadb-git-aa1c81b1500aa9cfcd126d0e0742a443c29d4537.tar.gz
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
-rw-r--r--ndb/include/mgmapi/ndb_logevent.h10
-rw-r--r--ndb/src/common/debugger/EventLogger.cpp24
-rw-r--r--ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp4
-rw-r--r--ndb/src/mgmapi/ndb_logevent.cpp1
4 files changed, 34 insertions, 5 deletions
diff --git a/ndb/include/mgmapi/ndb_logevent.h b/ndb/include/mgmapi/ndb_logevent.h
index d5744b0fffe..ff0d817d593 100644
--- a/ndb/include/mgmapi/ndb_logevent.h
+++ b/ndb/include/mgmapi/ndb_logevent.h
@@ -148,9 +148,9 @@ extern "C" {
/** NDB_MGM_EVENT_CATEGORY_INFO */
NDB_LE_InfoEvent = 49,
- /* GREP */
- NDB_LE_GrepSubscriptionInfo = 52,
- NDB_LE_GrepSubscriptionAlert = 53,
+ /* SINGLE USER */
+ NDB_LE_SingleUser = 52,
+ /* NDB_LE_ UNUSED = 53, */
/** NDB_MGM_EVENT_CATEGORY_BACKUP */
NDB_LE_BackupStarted = 54,
@@ -593,6 +593,10 @@ extern "C" {
unsigned backup_id;
unsigned error;
} BackupAborted;
+ /** Log event data @ref NDB_LE_SingleUser */
+ struct {
+ unsigned node_id;
+ } SingleUser;
#ifndef DOXYGEN_FIX
};
#else
diff --git a/ndb/src/common/debugger/EventLogger.cpp b/ndb/src/common/debugger/EventLogger.cpp
index d18b0feb1ad..9a1dcb8a3e1 100644
--- a/ndb/src/common/debugger/EventLogger.cpp
+++ b/ndb/src/common/debugger/EventLogger.cpp
@@ -633,6 +633,27 @@ void getTextBackupAborted(QQQQ) {
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
BaseString::snprintf(m_text,
m_text_len,
@@ -716,6 +737,9 @@ const EventLoggerBase::EventRepLogLevelMatrix EventLoggerBase::matrix[] = {
ROW(CreateLogBytes, LogLevel::llInfo, 11, Logger::LL_INFO ),
ROW(InfoEvent, LogLevel::llInfo, 2, Logger::LL_INFO ),
+ //Single User
+ ROW(SingleUser, LogLevel::llInfo, 7, Logger::LL_INFO ),
+
// Backup
ROW(BackupStarted, LogLevel::llBackup, 7, Logger::LL_INFO ),
ROW(BackupCompleted, LogLevel::llBackup, 7, Logger::LL_INFO ),
diff --git a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
index 60f3c4e83cd..e50e6bd242b 100644
--- a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
+++ b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
@@ -1963,7 +1963,7 @@ Ndbcntr::execRESUME_REQ(Signal* signal){
jamEntry();
- signal->theData[0] = EventReport::SingleUser;
+ signal->theData[0] = NDB_LE_SingleUser;
signal->theData[1] = 2;
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
@@ -2248,7 +2248,7 @@ void Ndbcntr::execABORT_ALL_CONF(Signal* signal){
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[2] = c_stopRec.stopReq.singleUserApi;
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB);
diff --git a/ndb/src/mgmapi/ndb_logevent.cpp b/ndb/src/mgmapi/ndb_logevent.cpp
index 27e7c1f36f5..046df06754a 100644
--- a/ndb/src/mgmapi/ndb_logevent.cpp
+++ b/ndb/src/mgmapi/ndb_logevent.cpp
@@ -289,6 +289,7 @@ struct Ndb_logevent_body_row ndb_logevent_body[]= {
ROW( BackupAborted, "backup_id", 2, backup_id),
ROW( BackupAborted, "error", 3, error),
+ ROW( SingleUser, "node_id", 1, node_id),
{ NDB_LE_ILLEGAL_TYPE, 0, 0, 0, 0, 0}
};