Below is the list of changes that have just been committed into a local
4.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.2353 05/07/14 17:54:36 tomas@stripped +11 -0
added debug prints
ndb/src/common/util/SocketServer.cpp
1.12 05/07/14 17:54:32 tomas@stripped +4 -0
debug printout
ndb/src/common/util/SocketClient.cpp
1.5 05/07/14 17:54:32 tomas@stripped +2 -0
debug printout
ndb/src/common/util/Parser.cpp
1.7 05/07/14 17:54:32 tomas@stripped +12 -9
debug printout
ndb/src/common/transporter/TransporterRegistry.cpp
1.27 05/07/14 17:54:32 tomas@stripped +10 -2
debug printout
ndb/src/common/portlib/NdbThread.c
1.21 05/07/14 17:54:32 tomas@stripped +12 -4
debug printout
ndb/src/common/portlib/NdbTCP.cpp
1.11 05/07/14 17:54:32 tomas@stripped +9 -0
debug printout
ndb/src/common/portlib/NdbMutex.c
1.6 05/07/14 17:54:32 tomas@stripped +10 -6
debug prints
ndb/src/common/mgmcommon/IPCConfig.cpp
1.13 05/07/14 17:54:32 tomas@stripped +5 -2
debug prints
ndb/src/common/mgmcommon/ConfigRetriever.cpp
1.25 05/07/14 17:54:32 tomas@stripped +7 -2
debug prints
ndb/include/util/SocketServer.hpp
1.6 05/07/14 17:54:32 tomas@stripped +7 -1
added debug prints
ndb/include/portlib/NdbTCP.h
1.8 05/07/14 17:54:32 tomas@stripped +9 -3
added debug prints
# 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.ndb.mysql.com
# Root: /home/tomas/mysql-4.1-new
--- 1.7/ndb/include/portlib/NdbTCP.h 2004-11-10 00:13:24 +01:00
+++ 1.8/ndb/include/portlib/NdbTCP.h 2005-07-14 17:54:32 +02:00
@@ -31,7 +31,7 @@
#define NDB_NONBLOCK FNDELAY
#define NDB_SOCKET_TYPE int
#define NDB_INVALID_SOCKET -1
-#define NDB_CLOSE_SOCKET(x) close(x)
+#define _NDB_CLOSE_SOCKET(x) close(x)
/**
* socklen_t not defined in the header files of OSE
@@ -52,7 +52,7 @@
#define EWOULDBLOCK WSAEWOULDBLOCK
#define NDB_SOCKET_TYPE SOCKET
#define NDB_INVALID_SOCKET INVALID_SOCKET
-#define NDB_CLOSE_SOCKET(x) closesocket(x)
+#define _NDB_CLOSE_SOCKET(x) closesocket(x)
#else
@@ -64,7 +64,7 @@
#define NDB_NONBLOCK O_NONBLOCK
#define NDB_SOCKET_TYPE int
#define NDB_INVALID_SOCKET -1
-#define NDB_CLOSE_SOCKET(x) ::close(x)
+#define _NDB_CLOSE_SOCKET(x) ::close(x)
#define InetErrno errno
@@ -88,6 +88,12 @@
* inet_addr
*/
int Ndb_getInAddr(struct in_addr * dst, const char *address);
+
+#ifdef DBUG_OFF
+#define NDB_CLOSE_SOCKET(fd) _NDB_CLOSE_SOCKET(fd)
+#else
+int NDB_CLOSE_SOCKET(int fd);
+#endif
#ifdef __cplusplus
}
--- 1.5/ndb/include/util/SocketServer.hpp 2004-11-11 21:38:40 +01:00
+++ 1.6/ndb/include/util/SocketServer.hpp 2005-07-14 17:54:32 +02:00
@@ -41,7 +41,13 @@
protected:
friend class SocketServer;
friend void* sessionThread_C(void*);
- Session(NDB_SOCKET_TYPE sock): m_socket(sock){ m_stop = m_stopped = false;}
+ Session(NDB_SOCKET_TYPE sock): m_socket(sock)
+ {
+ DBUG_ENTER("SocketServer::Session");
+ DBUG_PRINT("enter",("NDB_SOCKET: %d", m_socket));
+ m_stop = m_stopped = false;
+ DBUG_VOID_RETURN;
+ }
bool m_stop; // Has the session been ordered to stop?
bool m_stopped; // Has the session stopped?
--- 1.24/ndb/src/common/mgmcommon/ConfigRetriever.cpp 2005-06-15 06:58:45 +02:00
+++ 1.25/ndb/src/common/mgmcommon/ConfigRetriever.cpp 2005-07-14 17:54:32 +02:00
@@ -47,6 +47,8 @@
ConfigRetriever::ConfigRetriever(const char * _connect_string,
Uint32 version, Uint32 node_type)
{
+ DBUG_ENTER("ConfigRetriever::ConfigRetriever");
+
m_version = version;
m_node_type = node_type;
_ownNodeId= 0;
@@ -55,23 +57,26 @@
if (m_handle == 0) {
setError(CR_ERROR, "Unable to allocate mgm handle");
- return;
+ DBUG_VOID_RETURN;
}
if (ndb_mgm_set_connectstring(m_handle, _connect_string))
{
setError(CR_ERROR, ndb_mgm_get_latest_error_desc(m_handle));
- return;
+ DBUG_VOID_RETURN;
}
resetError();
+ DBUG_VOID_RETURN;
}
ConfigRetriever::~ConfigRetriever()
{
+ DBUG_ENTER("ConfigRetriever::~ConfigRetriever");
if (m_handle) {
ndb_mgm_disconnect(m_handle);
ndb_mgm_destroy_handle(&m_handle);
}
+ DBUG_VOID_RETURN;
}
Uint32
--- 1.12/ndb/src/common/mgmcommon/IPCConfig.cpp 2005-01-28 00:42:34 +01:00
+++ 1.13/ndb/src/common/mgmcommon/IPCConfig.cpp 2005-07-14 17:54:32 +02:00
@@ -114,7 +114,10 @@
* Returns no of transporters configured
*/
int
-IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){
+IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry)
+{
+ DBUG_ENTER("IPCConfig::configureTransporters");
+
int noOfTransportersCreated = 0;
Uint32 noOfConnections;
@@ -276,7 +279,7 @@
continue;
}
}
- return noOfTransportersCreated;
+ DBUG_RETURN(noOfTransportersCreated);
}
/**
--- 1.5/ndb/src/common/portlib/NdbMutex.c 2004-08-21 09:16:07 +02:00
+++ 1.6/ndb/src/common/portlib/NdbMutex.c 2005-07-14 17:54:32 +02:00
@@ -23,33 +23,37 @@
NdbMutex* NdbMutex_Create(void)
{
+ DBUG_ENTER("NdbMutex_Create");
NdbMutex* pNdbMutex;
int result;
pNdbMutex = (NdbMutex*)NdbMem_Allocate(sizeof(NdbMutex));
+ DBUG_PRINT("info",("NdbMem_Allocate 0x%lx",pNdbMutex));
if (pNdbMutex == NULL)
- return NULL;
+ DBUG_RETURN(NULL);
result = pthread_mutex_init(pNdbMutex, NULL);
assert(result == 0);
- return pNdbMutex;
-
+ DBUG_RETURN(pNdbMutex);
}
int NdbMutex_Destroy(NdbMutex* p_mutex)
{
+ DBUG_ENTER("NdbMutex_Destroy");
int result;
if (p_mutex == NULL)
- return -1;
+ DBUG_RETURN(-1);
result = pthread_mutex_destroy(p_mutex);
- free(p_mutex);
+
+ DBUG_PRINT("info",("NdbMem_Free 0x%lx",p_mutex));
+ NdbMem_Free(p_mutex);
- return result;
+ DBUG_RETURN(result);
}
--- 1.10/ndb/src/common/portlib/NdbTCP.cpp 2004-12-08 15:24:55 +01:00
+++ 1.11/ndb/src/common/portlib/NdbTCP.cpp 2005-07-14 17:54:32 +02:00
@@ -54,6 +54,15 @@
return -1; //DBUG_RETURN(-1);
}
+#ifndef DBUG_OFF
+extern "C"
+int NDB_CLOSE_SOCKET(int fd)
+{
+ DBUG_PRINT("info", ("NDB_CLOSE_SOCKET(%d)", fd));
+ return _NDB_CLOSE_SOCKET(fd);
+}
+#endif
+
#if 0
int
Ndb_getInAddr(struct in_addr * dst, const char *address) {
--- 1.20/ndb/src/common/portlib/NdbThread.c 2005-02-02 10:50:31 +01:00
+++ 1.21/ndb/src/common/portlib/NdbThread.c 2005-07-14 17:54:32 +02:00
@@ -56,6 +56,7 @@
void *ret;
struct NdbThread * ss = (struct NdbThread *)_ss;
ret= (* ss->func)(ss->object);
+ DBUG_POP();
NdbThread_Exit(ret);
}
/* will never be reached */
@@ -70,6 +71,7 @@
const char* p_thread_name,
NDB_THREAD_PRIO thread_prio)
{
+ DBUG_ENTER("NdbThread_Create");
struct NdbThread* tmpThread;
int result;
pthread_attr_t thread_attr;
@@ -77,11 +79,13 @@
(void)thread_prio; /* remove warning for unused parameter */
if (p_thread_func == NULL)
- return 0;
+ DBUG_RETURN(NULL);
tmpThread = (struct NdbThread*)NdbMem_Allocate(sizeof(struct NdbThread));
if (tmpThread == NULL)
- return NULL;
+ DBUG_RETURN(NULL);
+
+ DBUG_PRINT("info",("thread_name: %s", p_thread_name));
strnmov(tmpThread->thread_name,p_thread_name,sizeof(tmpThread->thread_name));
@@ -108,16 +112,20 @@
assert(result==0);
pthread_attr_destroy(&thread_attr);
- return tmpThread;
+ DBUG_PRINT("exit",("ret: %lx", tmpThread));
+ DBUG_RETURN(tmpThread);
}
void NdbThread_Destroy(struct NdbThread** p_thread)
{
- if (*p_thread != NULL){
+ DBUG_ENTER("NdbThread_Destroy");
+ if (*p_thread != NULL){
+ DBUG_PRINT("enter",("*p_thread: %lx", * p_thread));
free(* p_thread);
* p_thread = 0;
}
+ DBUG_VOID_RETURN;
}
--- 1.26/ndb/src/common/transporter/TransporterRegistry.cpp 2005-05-25 16:19:14 +02:00
+++ 1.27/ndb/src/common/transporter/TransporterRegistry.cpp 2005-07-14 17:54:32 +02:00
@@ -70,7 +70,9 @@
TransporterRegistry::TransporterRegistry(void * callback,
unsigned _maxTransporters,
- unsigned sizeOfLongSignalMemory) {
+ unsigned sizeOfLongSignalMemory)
+{
+ DBUG_ENTER("TransporterRegistry::TransporterRegistry");
nodeIdSpecified = false;
maxTransporters = _maxTransporters;
@@ -107,9 +109,13 @@
theOSEReceiver = 0;
theOSEJunkSocketSend = 0;
theOSEJunkSocketRecv = 0;
+
+ DBUG_VOID_RETURN;
}
-TransporterRegistry::~TransporterRegistry() {
+TransporterRegistry::~TransporterRegistry()
+{
+ DBUG_ENTER("TransporterRegistry::~TransporterRegistry");
removeAll();
@@ -129,6 +135,8 @@
theOSEReceiver = 0;
}
#endif
+
+ DBUG_VOID_RETURN;
}
void
--- 1.6/ndb/src/common/util/Parser.cpp 2004-07-09 12:32:12 +02:00
+++ 1.7/ndb/src/common/util/Parser.cpp 2005-07-14 17:54:32 +02:00
@@ -141,7 +141,10 @@
bool
ParserImpl::run(Context * ctx, const class Properties ** pDst,
- volatile bool * stop) const {
+ volatile bool * stop) const
+{
+ DBUG_ENTER("ParserImpl::run");
+
* pDst = 0;
bool ownStop = false;
if(stop == 0)
@@ -153,24 +156,24 @@
ctx->m_currentToken = input.gets(ctx->m_tokenBuffer, sz);
if(Eof(ctx->m_currentToken)){
ctx->m_status = Parser<Dummy>::Eof;
- return false;
+ DBUG_RETURN(false);
}
if(ctx->m_currentToken[0] == 0){
ctx->m_status = Parser<Dummy>::NoLine;
- return false;
+ DBUG_RETURN(false);
}
if(Empty(ctx->m_currentToken)){
ctx->m_status = Parser<Dummy>::EmptyLine;
- return false;
+ DBUG_RETURN(false);
}
trim(ctx->m_currentToken);
ctx->m_currentCmd = matchCommand(ctx, ctx->m_currentToken, m_rows);
if(ctx->m_currentCmd == 0){
ctx->m_status = Parser<Dummy>::UnknownCommand;
- return false;
+ DBUG_RETURN(false);
}
Properties * p = new Properties();
@@ -200,19 +203,19 @@
tmp = input.gets(buf, sz);
} while((! * stop) && !Eof(tmp) && !Empty(tmp));
}
- return false;
+ DBUG_RETURN(false);
}
if(* stop){
delete p;
ctx->m_status = Parser<Dummy>::ExternalStop;
- return false;
+ DBUG_RETURN(false);
}
if(!checkMandatory(ctx, p)){
ctx->m_status = Parser<Dummy>::MissingMandatoryArgument;
delete p;
- return false;
+ DBUG_RETURN(false);
}
/**
@@ -229,7 +232,7 @@
ctx->m_status = Parser<Dummy>::Ok;
* pDst = p;
- return true;
+ DBUG_RETURN(true);
}
const ParserImpl::DummyRow*
--- 1.11/ndb/src/common/util/SocketServer.cpp 2005-02-01 19:01:34 +01:00
+++ 1.12/ndb/src/common/util/SocketServer.cpp 2005-07-14 17:54:32 +02:00
@@ -64,6 +64,8 @@
return false;
}
+ DBUG_PRINT("info",("NDB_SOCKET: %d", sock));
+
const int on = 1;
if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
(const char*)&on, sizeof(on)) == -1) {
@@ -104,6 +106,8 @@
DBUG_RETURN(false);
}
+ DBUG_PRINT("info",("NDB_SOCKET: %d", sock));
+
const int on = 1;
if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
(const char*)&on, sizeof(on)) == -1) {
--- 1.4/ndb/src/common/util/SocketClient.cpp 2004-11-15 10:43:14 +01:00
+++ 1.5/ndb/src/common/util/SocketClient.cpp 2005-07-14 17:54:32 +02:00
@@ -57,6 +57,8 @@
return false;
}
+ DBUG_PRINT("info",("NDB_SOCKET: %d", m_sockfd));
+
return true;
}
| Thread |
|---|
| • bk commit into 4.1 tree (tomas:1.2353) | tomas | 14 Jul |