Commit e8b2c2c3 authored by unknown's avatar unknown

added mysql libs to ndb for debug features primarily


ndb/src/mgmclient/CpcClient.cpp:
  small fix
parent 01946089
LDADD += $(top_builddir)/ndb/test/src/libNDBT.a \ LDADD += $(top_builddir)/ndb/test/src/libNDBT.a \
$(top_builddir)/ndb/src/libndbclient.la $(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \ INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \
-I$(top_srcdir)/ndb/include \ -I$(top_srcdir)/ndb/include \
......
LDADD += $(top_builddir)/ndb/src/libndbclient.la LDADD += \
$(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \ INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \
-I$(top_srcdir)/ndb/include \ -I$(top_srcdir)/ndb/include \
......
...@@ -3,7 +3,11 @@ ndbbin_PROGRAMS = ndb_cpcd ...@@ -3,7 +3,11 @@ ndbbin_PROGRAMS = ndb_cpcd
ndb_cpcd_SOURCES = main.cpp CPCD.cpp Process.cpp APIService.cpp Monitor.cpp common.cpp ndb_cpcd_SOURCES = main.cpp CPCD.cpp Process.cpp APIService.cpp Monitor.cpp common.cpp
LDADD_LOC = $(top_builddir)/ndb/src/libndbclient.la LDADD_LOC = \
$(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_util.mk.am include $(top_srcdir)/ndb/config/type_util.mk.am
......
...@@ -3,7 +3,11 @@ ndbtools_PROGRAMS = ndb_restore ...@@ -3,7 +3,11 @@ ndbtools_PROGRAMS = ndb_restore
ndb_restore_SOURCES = main.cpp consumer.cpp consumer_restore.cpp consumer_printer.cpp Restore.cpp ndb_restore_SOURCES = main.cpp consumer.cpp consumer_restore.cpp consumer_printer.cpp Restore.cpp
LDADD_LOC = $(top_builddir)/ndb/src/libndbclient.la LDADD_LOC = \
$(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.mk.am
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
ParserRow_t::IgnoreMinMax, \ ParserRow_t::IgnoreMinMax, \
0, 0, \ 0, 0, \
0, \ 0, \
(desc) } (desc), 0 }
#define CPC_END() \ #define CPC_END() \
{ 0, \ { 0, \
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
ParserRow_t::IgnoreMinMax, \ ParserRow_t::IgnoreMinMax, \
0, 0, \ 0, 0, \
0, \ 0, \
0 } 0, 0 }
#ifdef DEBUG_PRINT_PROPERTIES #ifdef DEBUG_PRINT_PROPERTIES
static void printprop(const Properties &p) { static void printprop(const Properties &p) {
......
...@@ -19,6 +19,10 @@ INCLUDES_LOC = -I$(top_srcdir)/ndb/src/ndbapi \ ...@@ -19,6 +19,10 @@ INCLUDES_LOC = -I$(top_srcdir)/ndb/src/ndbapi \
LDADD_LOC = $(top_builddir)/ndb/src/libndbclient.la \ LDADD_LOC = $(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/ndb/src/common/editline/libeditline.a \ $(top_builddir)/ndb/src/common/editline/libeditline.a \
$(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
@TERMCAP_LIB@ @TERMCAP_LIB@
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.mk.am
......
...@@ -296,6 +296,7 @@ Remark: Start transaction. Synchronous. ...@@ -296,6 +296,7 @@ Remark: Start transaction. Synchronous.
NdbConnection* NdbConnection*
Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen) Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen)
{ {
DBUG_ENTER("Ndb::startTransaction");
if (theInitState == Initialised) { if (theInitState == Initialised) {
theError.code = 0; theError.code = 0;
...@@ -312,9 +313,9 @@ Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen) ...@@ -312,9 +313,9 @@ Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen)
} else { } else {
nodeId = 0; nodeId = 0;
}//if }//if
return startTransactionLocal(aPriority, nodeId); DBUG_RETURN(startTransactionLocal(aPriority, nodeId));
} else { } else {
return NULL; DBUG_RETURN(NULL);
}//if }//if
}//Ndb::startTransaction() }//Ndb::startTransaction()
...@@ -329,9 +330,11 @@ Remark: Start transaction. Synchronous. ...@@ -329,9 +330,11 @@ Remark: Start transaction. Synchronous.
NdbConnection* NdbConnection*
Ndb::hupp(NdbConnection* pBuddyTrans) Ndb::hupp(NdbConnection* pBuddyTrans)
{ {
DBUG_ENTER("Ndb::hupp");
Uint32 aPriority = 0; Uint32 aPriority = 0;
if (pBuddyTrans == NULL){ if (pBuddyTrans == NULL){
return startTransaction(); DBUG_RETURN(startTransaction());
} }
if (theInitState == Initialised) { if (theInitState == Initialised) {
...@@ -341,19 +344,19 @@ Ndb::hupp(NdbConnection* pBuddyTrans) ...@@ -341,19 +344,19 @@ Ndb::hupp(NdbConnection* pBuddyTrans)
Uint32 nodeId = pBuddyTrans->getConnectedNodeId(); Uint32 nodeId = pBuddyTrans->getConnectedNodeId();
NdbConnection* pCon = startTransactionLocal(aPriority, nodeId); NdbConnection* pCon = startTransactionLocal(aPriority, nodeId);
if(pCon == NULL) if(pCon == NULL)
return NULL; DBUG_RETURN(NULL);
if (pCon->getConnectedNodeId() != nodeId){ if (pCon->getConnectedNodeId() != nodeId){
// We could not get a connection to the desired node // We could not get a connection to the desired node
// release the connection and return NULL // release the connection and return NULL
closeTransaction(pCon); closeTransaction(pCon);
return NULL; DBUG_RETURN(NULL);
} }
pCon->setTransactionId(pBuddyTrans->getTransactionId()); pCon->setTransactionId(pBuddyTrans->getTransactionId());
pCon->setBuddyConPtr((Uint32)pBuddyTrans->getTC_ConnectPtr()); pCon->setBuddyConPtr((Uint32)pBuddyTrans->getTC_ConnectPtr());
return pCon; DBUG_RETURN(pCon);
} else { } else {
return NULL; DBUG_RETURN(NULL);
}//if }//if
}//Ndb::hupp() }//Ndb::hupp()
...@@ -443,6 +446,8 @@ Remark: Close transaction by releasing the connection and all operations ...@@ -443,6 +446,8 @@ Remark: Close transaction by releasing the connection and all operations
void void
Ndb::closeTransaction(NdbConnection* aConnection) Ndb::closeTransaction(NdbConnection* aConnection)
{ {
DBUG_ENTER("Ndb::closeTransaction");
NdbConnection* tCon; NdbConnection* tCon;
NdbConnection* tPreviousCon; NdbConnection* tPreviousCon;
...@@ -454,7 +459,7 @@ Ndb::closeTransaction(NdbConnection* aConnection) ...@@ -454,7 +459,7 @@ Ndb::closeTransaction(NdbConnection* aConnection)
#ifdef VM_TRACE #ifdef VM_TRACE
printf("NULL into closeTransaction\n"); printf("NULL into closeTransaction\n");
#endif #endif
return; DBUG_VOID_RETURN;
}//if }//if
CHECK_STATUS_MACRO_VOID; CHECK_STATUS_MACRO_VOID;
...@@ -479,14 +484,14 @@ Ndb::closeTransaction(NdbConnection* aConnection) ...@@ -479,14 +484,14 @@ Ndb::closeTransaction(NdbConnection* aConnection)
printf("Scan timeout:ed NdbConnection-> " printf("Scan timeout:ed NdbConnection-> "
"not returning it-> memory leak\n"); "not returning it-> memory leak\n");
#endif #endif
return; DBUG_VOID_RETURN;
} }
#ifdef VM_TRACE #ifdef VM_TRACE
printf("Non-existing transaction into closeTransaction\n"); printf("Non-existing transaction into closeTransaction\n");
abort(); abort();
#endif #endif
return; DBUG_VOID_RETURN;
}//if }//if
tPreviousCon = tCon; tPreviousCon = tCon;
tCon = tCon->next(); tCon = tCon->next();
...@@ -505,7 +510,7 @@ Ndb::closeTransaction(NdbConnection* aConnection) ...@@ -505,7 +510,7 @@ Ndb::closeTransaction(NdbConnection* aConnection)
#ifdef VM_TRACE #ifdef VM_TRACE
printf("Con timeout:ed NdbConnection-> not returning it-> memory leak\n"); printf("Con timeout:ed NdbConnection-> not returning it-> memory leak\n");
#endif #endif
return; DBUG_VOID_RETURN;
} }
if (aConnection->theReleaseOnClose == false) { if (aConnection->theReleaseOnClose == false) {
...@@ -515,11 +520,12 @@ Ndb::closeTransaction(NdbConnection* aConnection) ...@@ -515,11 +520,12 @@ Ndb::closeTransaction(NdbConnection* aConnection)
Uint32 nodeId = aConnection->getConnectedNodeId(); Uint32 nodeId = aConnection->getConnectedNodeId();
aConnection->theNext = theConnectionArray[nodeId]; aConnection->theNext = theConnectionArray[nodeId];
theConnectionArray[nodeId] = aConnection; theConnectionArray[nodeId] = aConnection;
return; DBUG_VOID_RETURN;
} else { } else {
aConnection->theReleaseOnClose = false; aConnection->theReleaseOnClose = false;
releaseNdbCon(aConnection); releaseNdbCon(aConnection);
}//if }//if
DBUG_VOID_RETURN;
}//Ndb::closeTransaction() }//Ndb::closeTransaction()
/***************************************************************************** /*****************************************************************************
......
...@@ -12,7 +12,11 @@ test_SCRIPTS=atrt-analyze-result.sh atrt-gather-result.sh atrt-setup.sh \ ...@@ -12,7 +12,11 @@ test_SCRIPTS=atrt-analyze-result.sh atrt-gather-result.sh atrt-setup.sh \
atrt_SOURCES = main.cpp atrt_SOURCES = main.cpp
INCLUDES_LOC = -I$(top_srcdir)/ndb/src/mgmclient INCLUDES_LOC = -I$(top_srcdir)/ndb/src/mgmclient
LDADD_LOC = $(top_builddir)/ndb/src/mgmclient/CpcClient.o $(top_builddir)/ndb/src/libndbclient.la LDADD_LOC = $(top_builddir)/ndb/src/mgmclient/CpcClient.o \
$(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
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