updated example makefiles to add libmystrings

    temporary added trace printouts for ndb autotest
parent 34c5892c
...@@ -10,11 +10,11 @@ TOP_SRCDIR = ../../.. ...@@ -10,11 +10,11 @@ TOP_SRCDIR = ../../..
INCLUDE_DIR = $(TOP_SRCDIR) INCLUDE_DIR = $(TOP_SRCDIR)
LIB_DIR = -L$(TOP_SRCDIR)/ndb/src/.libs \ LIB_DIR = -L$(TOP_SRCDIR)/ndb/src/.libs \
-L$(TOP_SRCDIR)/libmysql_r/.libs \ -L$(TOP_SRCDIR)/libmysql_r/.libs \
-L$(TOP_SRCDIR)/mysys -L$(TOP_SRCDIR)/mysys -L$(TOP_SRCDIR)/strings
SYS_LIB = SYS_LIB =
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lz $(SYS_LIB) -o $(TARGET) $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lmystrings -lz $(SYS_LIB) -o $(TARGET)
$(TARGET).o: $(SRCS) $(TARGET).o: $(SRCS)
$(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/extra -I$(INCLUDE_DIR)/ndb/include -I$(INCLUDE_DIR)/ndb/include/ndbapi $(SRCS) $(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/extra -I$(INCLUDE_DIR)/ndb/include -I$(INCLUDE_DIR)/ndb/include/ndbapi $(SRCS)
......
...@@ -8,11 +8,11 @@ LFLAGS = -Wall ...@@ -8,11 +8,11 @@ LFLAGS = -Wall
INCLUDE_DIR = ../../include INCLUDE_DIR = ../../include
LIB_DIR = -L../../src/.libs \ LIB_DIR = -L../../src/.libs \
-L../../../libmysql_r/.libs \ -L../../../libmysql_r/.libs \
-L../../../mysys -L../../../mysys -L../../../strings
SYS_LIB = SYS_LIB =
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
$(CXX) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lz $(SYS_LIB) -o $(TARGET) $(CXX) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lmystrings -lz $(SYS_LIB) -o $(TARGET)
$(TARGET).o: $(SRCS) $(TARGET).o: $(SRCS)
$(CXX) $(CFLAGS) -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS) $(CXX) $(CFLAGS) -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS)
......
...@@ -10,11 +10,11 @@ TOP_SRCDIR = ../../.. ...@@ -10,11 +10,11 @@ TOP_SRCDIR = ../../..
INCLUDE_DIR = $(TOP_SRCDIR)/ndb/include INCLUDE_DIR = $(TOP_SRCDIR)/ndb/include
LIB_DIR = -L$(TOP_SRCDIR)/ndb/src/.libs \ LIB_DIR = -L$(TOP_SRCDIR)/ndb/src/.libs \
-L$(TOP_SRCDIR)/libmysql_r/.libs \ -L$(TOP_SRCDIR)/libmysql_r/.libs \
-L$(TOP_SRCDIR)/mysys -L$(TOP_SRCDIR)/mysys -L$(TOP_SRCDIR)/strings
SYS_LIB = SYS_LIB =
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lz $(SYS_LIB) -o $(TARGET) $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lmystrings -lz $(SYS_LIB) -o $(TARGET)
$(TARGET).o: $(SRCS) $(TARGET).o: $(SRCS)
$(CXX) $(CFLAGS) -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS) $(CXX) $(CFLAGS) -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS)
......
...@@ -8,11 +8,11 @@ LFLAGS = -Wall ...@@ -8,11 +8,11 @@ LFLAGS = -Wall
INCLUDE_DIR = ../../include INCLUDE_DIR = ../../include
LIB_DIR = -L../../src/.libs \ LIB_DIR = -L../../src/.libs \
-L../../../libmysql_r/.libs \ -L../../../libmysql_r/.libs \
-L../../../mysys -L../../../mysys -L../../../strings
SYS_LIB = SYS_LIB =
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
$(CXX) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lz $(SYS_LIB) -o $(TARGET) $(CXX) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lmystrings -lz $(SYS_LIB) -o $(TARGET)
$(TARGET).o: $(SRCS) $(TARGET).o: $(SRCS)
$(CXX) $(CFLAGS) -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS) $(CXX) $(CFLAGS) -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS)
......
...@@ -10,11 +10,11 @@ TOP_SRCDIR = ../../.. ...@@ -10,11 +10,11 @@ TOP_SRCDIR = ../../..
INCLUDE_DIR = $(TOP_SRCDIR) INCLUDE_DIR = $(TOP_SRCDIR)
LIB_DIR = -L$(TOP_SRCDIR)/ndb/src/.libs \ LIB_DIR = -L$(TOP_SRCDIR)/ndb/src/.libs \
-L$(TOP_SRCDIR)/libmysql_r/.libs \ -L$(TOP_SRCDIR)/libmysql_r/.libs \
-L$(TOP_SRCDIR)/mysys -L$(TOP_SRCDIR)/mysys -L$(TOP_SRCDIR)/strings
SYS_LIB = SYS_LIB =
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lz $(SYS_LIB) -o $(TARGET) $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lmystrings -lz $(SYS_LIB) -o $(TARGET)
$(TARGET).o: $(SRCS) $(TARGET).o: $(SRCS)
$(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/extra -I$(INCLUDE_DIR)/ndb/include -I$(INCLUDE_DIR)/ndb/include/ndbapi $(SRCS) $(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/extra -I$(INCLUDE_DIR)/ndb/include -I$(INCLUDE_DIR)/ndb/include/ndbapi $(SRCS)
......
...@@ -10,11 +10,11 @@ TOP_SRCDIR = ../../.. ...@@ -10,11 +10,11 @@ TOP_SRCDIR = ../../..
INCLUDE_DIR = $(TOP_SRCDIR) INCLUDE_DIR = $(TOP_SRCDIR)
LIB_DIR = -L$(TOP_SRCDIR)/ndb/src/.libs \ LIB_DIR = -L$(TOP_SRCDIR)/ndb/src/.libs \
-L$(TOP_SRCDIR)/libmysql_r/.libs \ -L$(TOP_SRCDIR)/libmysql_r/.libs \
-L$(TOP_SRCDIR)/mysys -L$(TOP_SRCDIR)/mysys -L$(TOP_SRCDIR)/strings
SYS_LIB = SYS_LIB =
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lz $(SYS_LIB) -o $(TARGET) $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lmystrings -lz $(SYS_LIB) -o $(TARGET)
$(TARGET).o: $(SRCS) $(TARGET).o: $(SRCS)
$(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/ndb/include -I$(INCLUDE_DIR)/ndb/include/ndbapi $(SRCS) $(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/ndb/include -I$(INCLUDE_DIR)/ndb/include/ndbapi $(SRCS)
......
...@@ -10,11 +10,11 @@ TOP_SRCDIR = ../../.. ...@@ -10,11 +10,11 @@ TOP_SRCDIR = ../../..
INCLUDE_DIR = $(TOP_SRCDIR) INCLUDE_DIR = $(TOP_SRCDIR)
LIB_DIR = -L$(TOP_SRCDIR)/ndb/src/.libs \ LIB_DIR = -L$(TOP_SRCDIR)/ndb/src/.libs \
-L$(TOP_SRCDIR)/libmysql_r/.libs \ -L$(TOP_SRCDIR)/libmysql_r/.libs \
-L$(TOP_SRCDIR)/mysys -L$(TOP_SRCDIR)/mysys -L$(TOP_SRCDIR)/strings
SYS_LIB = SYS_LIB =
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lz $(SYS_LIB) -o $(TARGET) $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lmystrings -lz $(SYS_LIB) -o $(TARGET)
$(TARGET).o: $(SRCS) $(TARGET).o: $(SRCS)
$(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/ndb/include -I$(INCLUDE_DIR)/ndb/include/ndbapi $(SRCS) $(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/ndb/include -I$(INCLUDE_DIR)/ndb/include/ndbapi $(SRCS)
......
...@@ -1531,12 +1531,16 @@ bool TransporterRegistry::connect_client(NdbMgmHandle *h) ...@@ -1531,12 +1531,16 @@ bool TransporterRegistry::connect_client(NdbMgmHandle *h)
Uint32 mgm_nodeid= ndb_mgm_get_mgmd_nodeid(*h); Uint32 mgm_nodeid= ndb_mgm_get_mgmd_nodeid(*h);
if(!mgm_nodeid) if(!mgm_nodeid)
{
ndbout_c("%s: %d", __FILE__, __LINE__);
return false; return false;
}
Transporter * t = theTransporters[mgm_nodeid]; Transporter * t = theTransporters[mgm_nodeid];
if (!t) if (!t)
{
ndbout_c("%s: %d", __FILE__, __LINE__);
return false; return false;
}
DBUG_RETURN(t->connect_client(connect_ndb_mgmd(h))); DBUG_RETURN(t->connect_client(connect_ndb_mgmd(h)));
} }
...@@ -1550,6 +1554,7 @@ NDB_SOCKET_TYPE TransporterRegistry::connect_ndb_mgmd(NdbMgmHandle *h) ...@@ -1550,6 +1554,7 @@ NDB_SOCKET_TYPE TransporterRegistry::connect_ndb_mgmd(NdbMgmHandle *h)
if ( h==NULL || *h == NULL ) if ( h==NULL || *h == NULL )
{ {
ndbout_c("%s: %d", __FILE__, __LINE__);
return NDB_INVALID_SOCKET; return NDB_INVALID_SOCKET;
} }
...@@ -1562,6 +1567,10 @@ NDB_SOCKET_TYPE TransporterRegistry::connect_ndb_mgmd(NdbMgmHandle *h) ...@@ -1562,6 +1567,10 @@ NDB_SOCKET_TYPE TransporterRegistry::connect_ndb_mgmd(NdbMgmHandle *h)
m_transporter_interface[i].m_s_service_port, m_transporter_interface[i].m_s_service_port,
&mgm_reply) < 0) &mgm_reply) < 0)
{ {
ndbout_c("Error: %s: %d",
ndb_mgm_get_latest_error_desc(*h),
ndb_mgm_get_latest_error(*h));
ndbout_c("%s: %d", __FILE__, __LINE__);
ndb_mgm_destroy_handle(h); ndb_mgm_destroy_handle(h);
return NDB_INVALID_SOCKET; return NDB_INVALID_SOCKET;
} }
...@@ -1572,7 +1581,13 @@ NDB_SOCKET_TYPE TransporterRegistry::connect_ndb_mgmd(NdbMgmHandle *h) ...@@ -1572,7 +1581,13 @@ NDB_SOCKET_TYPE TransporterRegistry::connect_ndb_mgmd(NdbMgmHandle *h)
*/ */
NDB_SOCKET_TYPE sockfd= ndb_mgm_convert_to_transporter(h); NDB_SOCKET_TYPE sockfd= ndb_mgm_convert_to_transporter(h);
if ( sockfd == NDB_INVALID_SOCKET) if ( sockfd == NDB_INVALID_SOCKET)
{
ndbout_c("Error: %s: %d",
ndb_mgm_get_latest_error_desc(*h),
ndb_mgm_get_latest_error(*h));
ndbout_c("%s: %d", __FILE__, __LINE__);
ndb_mgm_destroy_handle(h); ndb_mgm_destroy_handle(h);
}
return sockfd; return sockfd;
} }
......
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