Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
cf3e08c5
Commit
cf3e08c5
authored
Jan 03, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
parents
fa7b260a
ab85635e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
ndb/examples/ndbapi_example1/Makefile
ndb/examples/ndbapi_example1/Makefile
+2
-2
ndb/examples/ndbapi_example1/ndbapi_example1.cpp
ndb/examples/ndbapi_example1/ndbapi_example1.cpp
+17
-0
No files found.
ndb/examples/ndbapi_example1/Makefile
View file @
cf3e08c5
...
@@ -7,12 +7,12 @@ DEBUG =
...
@@ -7,12 +7,12 @@ DEBUG =
LFLAGS
=
-Wall
LFLAGS
=
-Wall
INCLUDE_DIR
=
../../include
INCLUDE_DIR
=
../../include
LIB_DIR
=
-L
../../src/.libs
\
LIB_DIR
=
-L
../../src/.libs
\
-L
../../../libmysql/.libs
\
-L
../../../libmysql
_r
/.libs
\
-L
../../../mysys
-L
../../../mysys
SYS_LIB
=
SYS_LIB
=
$(TARGET)
:
$(OBJS)
$(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)
$(TARGET).o
:
$(SRCS)
$(CXX)
$(CFLAGS)
-I
$(INCLUDE_DIR)
-I
$(INCLUDE_DIR)
/ndbapi
$(SRCS)
$(CXX)
$(CFLAGS)
-I
$(INCLUDE_DIR)
-I
$(INCLUDE_DIR)
/ndbapi
$(SRCS)
...
...
ndb/examples/ndbapi_example1/ndbapi_example1.cpp
View file @
cf3e08c5
...
@@ -49,6 +49,23 @@ int main()
...
@@ -49,6 +49,23 @@ int main()
Ndb_cluster_connection
*
cluster_connection
=
Ndb_cluster_connection
*
cluster_connection
=
new
Ndb_cluster_connection
();
// Object representing the cluster
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
))
if
(
cluster_connection
->
wait_until_ready
(
30
,
30
))
{
{
std
::
cout
<<
"Cluster was not ready within 30 secs."
<<
std
::
endl
;
std
::
cout
<<
"Cluster was not ready within 30 secs."
<<
std
::
endl
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment