Commit e00587bf authored by tomas@poseidon.(none)'s avatar tomas@poseidon.(none)

added mysql libs to ndb for debug features primarily

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