mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
Makefile:
fixed ndbapi_example ndbapi_example1.cpp: fixed ndbapi_example
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user