Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2433 07/02/14 15:31:00 tomas@stripped +5 -0
Merge poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
into poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
mysql-test/ndb/ndbcluster.sh
1.53 07/02/14 15:30:51 tomas@stripped +7 -64
manual merge
storage/ndb/src/ndbapi/ObjectMap.hpp
1.13 07/02/14 15:29:13 tomas@stripped +0 -0
Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp
1.36 07/02/14 15:29:13 tomas@stripped +0 -0
Auto merged
sql/ha_ndbcluster.cc
1.411 07/02/14 15:29:13 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/ObjectMap.hpp
1.7.3.2 07/02/14 15:29:12 tomas@stripped +0 -0
Merge rename: ndb/src/ndbapi/ObjectMap.hpp -> storage/ndb/src/ndbapi/ObjectMap.hpp
storage/ndb/src/common/debugger/EventLogger.cpp
1.21.10.2 07/02/14 15:29:12 tomas@stripped +0 -0
Merge rename: ndb/src/common/debugger/EventLogger.cpp -> storage/ndb/src/common/debugger/EventLogger.cpp
mysql-test/ndb/ndb_config_2_node.ini
1.21 07/02/14 15:29:12 tomas@stripped +0 -10
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tomas
# Host: poseidon.mysql.com
# Root: /home/tomas/mysql-5.1-new-ndb/RESYNC
--- 1.21.10.1/ndb/src/common/debugger/EventLogger.cpp 2007-02-14 15:25:51 +07:00
+++ 1.36/storage/ndb/src/common/debugger/EventLogger.cpp 2007-02-14 15:29:13 +07:00
@@ -15,13 +15,12 @@
#include <ndb_global.h>
-#include "EventLogger.hpp"
+#include <EventLogger.hpp>
#include <TransporterCallback.hpp>
#include <NdbConfig.h>
#include <kernel/BlockNumbers.h>
#include <signaldata/ArbitSignalData.hpp>
-#include <GrepEvent.hpp>
#include <NodeState.hpp>
#include <version.h>
@@ -528,6 +527,7 @@ void getTextUndoLogBlocked(QQQQ) {
theData[1],
theData[2]);
}
+
void getTextTransporterError(QQQQ) {
struct myTransporterError{
Uint32 errorNum;
@@ -714,6 +714,43 @@ void getTextUNDORecordsExecuted(QQQQ) {
void getTextInfoEvent(QQQQ) {
BaseString::snprintf(m_text, m_text_len, (char *)&theData[1]);
}
+const char bytes_unit[]= "B";
+const char kbytes_unit[]= "KB";
+const char mbytes_unit[]= "MB";
+static void convert_unit(unsigned &data, const char *&unit)
+{
+ if (data < 16*1024)
+ {
+ unit= bytes_unit;
+ return;
+ }
+ if (data < 16*1024*1024)
+ {
+ data= (data+1023)/1024;
+ unit= kbytes_unit;
+ return;
+ }
+ data= (data+1024*1024-1)/(1024*1024);
+ unit= mbytes_unit;
+}
+
+void getTextEventBufferStatus(QQQQ) {
+ unsigned used= theData[1], alloc= theData[2], max_= theData[3];
+ const char *used_unit, *alloc_unit, *max_unit;
+ convert_unit(used, used_unit);
+ convert_unit(alloc, alloc_unit);
+ convert_unit(max_, max_unit);
+ BaseString::snprintf(m_text, m_text_len,
+ "Event buffer status: used=%d%s(%d%) alloc=%d%s(%d%) "
+ "max=%d%s apply_gci=%lld latest_gci=%lld",
+ used, used_unit,
+ theData[2] ? (theData[1]*100)/theData[2] : 0,
+ alloc, alloc_unit,
+ theData[3] ? (theData[2]*100)/theData[3] : 0,
+ max_, max_unit,
+ theData[4]+(((Uint64)theData[5])<<32),
+ theData[6]+(((Uint64)theData[7])<<32));
+}
void getTextWarningEvent(QQQQ) {
BaseString::snprintf(m_text, m_text_len, (char *)&theData[1]);
}
@@ -966,6 +1003,7 @@ const EventLoggerBase::EventRepLogLevelM
ROW(SentHeartbeat, LogLevel::llInfo, 12, Logger::LL_INFO ),
ROW(CreateLogBytes, LogLevel::llInfo, 11, Logger::LL_INFO ),
ROW(InfoEvent, LogLevel::llInfo, 2, Logger::LL_INFO ),
+ ROW(EventBufferStatus, LogLevel::llInfo, 7, Logger::LL_INFO ),
//Single User
ROW(SingleUser, LogLevel::llInfo, 7, Logger::LL_INFO ),
@@ -1004,6 +1042,7 @@ EventLogger::close()
removeAllHandlers();
}
+#ifdef NOT_USED
static NdbOut&
operator<<(NdbOut& out, const LogLevel & ll)
{
@@ -1013,6 +1052,7 @@ operator<<(NdbOut& out, const LogLevel &
out << "]";
return out;
}
+#endif
int
EventLoggerBase::event_lookup(int eventType,
@@ -1057,6 +1097,7 @@ EventLogger::log(int eventType, const Ui
Logger::LoggerLevel severity = Logger::LL_WARNING;
LogLevel::EventCategory cat= LogLevel::llInvalid;
EventTextFunction textF;
+ char log_text[MAX_TEXT_LENGTH];
DBUG_ENTER("EventLogger::log");
DBUG_PRINT("enter",("eventType=%d, nodeid=%d", eventType, nodeId));
@@ -1070,29 +1111,29 @@ EventLogger::log(int eventType, const Ui
DBUG_PRINT("info",("m_logLevel.getLogLevel=%d", m_logLevel.getLogLevel(cat)));
if (threshold <= set){
- getText(m_text,sizeof(m_text),textF,theData,nodeId);
+ getText(log_text,sizeof(log_text),textF,theData,nodeId);
switch (severity){
case Logger::LL_ALERT:
- alert(m_text);
+ alert(log_text);
break;
case Logger::LL_CRITICAL:
- critical(m_text);
+ critical(log_text);
break;
case Logger::LL_WARNING:
- warning(m_text);
+ warning(log_text);
break;
case Logger::LL_ERROR:
- error(m_text);
+ error(log_text);
break;
case Logger::LL_INFO:
- info(m_text);
+ info(log_text);
break;
case Logger::LL_DEBUG:
- debug(m_text);
+ debug(log_text);
break;
default:
- info(m_text);
+ info(log_text);
break;
}
} // if (..
@@ -1110,7 +1151,3 @@ EventLogger::setFilterLevel(int filterLe
{
m_filterLevel = filterLevel;
}
-
-//
-// PRIVATE
-//
--- 1.7.3.1/ndb/src/ndbapi/ObjectMap.hpp 2007-02-14 15:25:52 +07:00
+++ 1.13/storage/ndb/src/ndbapi/ObjectMap.hpp 2007-02-14 15:29:13 +07:00
@@ -82,9 +82,7 @@ NdbObjectIdMap::map(void * object){
// unlock();
-#ifdef DEBUG_OBJECTMAP
- ndbout_c("NdbObjectIdMap::map(0x%x) %u", object, ff<<2);
-#endif
+ DBUG_PRINT("info",("NdbObjectIdMap::map(0x%lx) %u", (long) object, ff<<2));
return ff<<2;
}
@@ -102,15 +100,16 @@ NdbObjectIdMap::unmap(Uint32 id, void *o
m_map[i].m_next = m_firstFree;
m_firstFree = i;
} else {
- ndbout_c("Error: NdbObjectIdMap::::unmap(%u, 0x%x) obj=0x%x", id, object, obj);
+ ndbout_c("Error: NdbObjectIdMap::::unmap(%u, 0x%lx) obj=0x%lx",
+ id, (long) object, (long) obj);
+ DBUG_PRINT("error",("NdbObjectIdMap::unmap(%u, 0x%lx) obj=0x%lx",
+ id, (long) object, (long) obj));
return 0;
}
// unlock();
-#ifdef DEBUG_OBJECTMAP
- ndbout_c("NdbObjectIdMap::unmap(%u) obj=0x%x", id, obj);
-#endif
+ DBUG_PRINT("info",("NdbObjectIdMap::unmap(%u) obj=0x%lx", id, (long) obj));
return obj;
}
@@ -119,9 +118,7 @@ NdbObjectIdMap::unmap(Uint32 id, void *o
inline void *
NdbObjectIdMap::getObject(Uint32 id){
-#ifdef DEBUG_OBJECTMAP
- ndbout_c("NdbObjectIdMap::getObject(%u) obj=0x%x", id, m_map[id>>2].m_obj);
-#endif
+ // DBUG_PRINT("info",("NdbObjectIdMap::getObject(%u) obj=0x%x", id, m_map[id>>2].m_obj));
id >>= 2;
if(id < m_size){
return m_map[id].m_obj;
--- 1.410/sql/ha_ndbcluster.cc 2007-02-13 13:18:15 +07:00
+++ 1.411/sql/ha_ndbcluster.cc 2007-02-14 15:29:13 +07:00
@@ -3810,7 +3810,7 @@ int ha_ndbcluster::info(uint flag)
if (flag & HA_STATUS_AUTO)
{
DBUG_PRINT("info", ("HA_STATUS_AUTO"));
- if (m_table)
+ if (m_table && table->found_next_number_field)
{
Ndb *ndb= get_ndb();
Ndb_tuple_id_range_guard g(m_share);
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2433) | tomas | 14 Feb |