Loading ndb/examples/ndbapi_example1/Makefile +2 −2 Original line number Diff line number Diff line Loading @@ -7,12 +7,12 @@ DEBUG = LFLAGS = -Wall INCLUDE_DIR = ../../include LIB_DIR = -L../../src/.libs \ -L../../../libmysql/.libs \ -L../../../libmysql_r/.libs \ -L../../../mysys SYS_LIB = $(TARGET): $(OBJS) $(CXX) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient -lmysys $(SYS_LIB) -o $(TARGET) $(CXX) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lz $(SYS_LIB) -o $(TARGET) $(TARGET).o: $(SRCS) $(CXX) $(CFLAGS) -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS) Loading ndb/examples/ndbapi_example1/ndbapi_example1.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,23 @@ int main() Ndb_cluster_connection *cluster_connection= new Ndb_cluster_connection(); // Object representing the cluster int r= cluster_connection->connect(5 /* retries */, 3 /* delay between retries */, 1 /* verbose */); if (r > 0) { std::cout << "Cluster connect failed, possibly resolved with more retries.\n"; exit(-1); } else if (r < 0) { std::cout << "Cluster connect failed.\n"; exit(-1); } if (cluster_connection->wait_until_ready(30,30)) { std::cout << "Cluster was not ready within 30 secs." << std::endl; Loading Loading
ndb/examples/ndbapi_example1/Makefile +2 −2 Original line number Diff line number Diff line Loading @@ -7,12 +7,12 @@ DEBUG = LFLAGS = -Wall INCLUDE_DIR = ../../include LIB_DIR = -L../../src/.libs \ -L../../../libmysql/.libs \ -L../../../libmysql_r/.libs \ -L../../../mysys SYS_LIB = $(TARGET): $(OBJS) $(CXX) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient -lmysys $(SYS_LIB) -o $(TARGET) $(CXX) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lz $(SYS_LIB) -o $(TARGET) $(TARGET).o: $(SRCS) $(CXX) $(CFLAGS) -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS) Loading
ndb/examples/ndbapi_example1/ndbapi_example1.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,23 @@ int main() Ndb_cluster_connection *cluster_connection= new Ndb_cluster_connection(); // Object representing the cluster int r= cluster_connection->connect(5 /* retries */, 3 /* delay between retries */, 1 /* verbose */); if (r > 0) { std::cout << "Cluster connect failed, possibly resolved with more retries.\n"; exit(-1); } else if (r < 0) { std::cout << "Cluster connect failed.\n"; exit(-1); } if (cluster_connection->wait_until_ready(30,30)) { std::cout << "Cluster was not ready within 30 secs." << std::endl; Loading