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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
e57c0909
Commit
e57c0909
authored
Jan 03, 2005
by
tomas@poseidon.ndb.mysql.com
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
9011082e
7c6458f6
Changes
2
Hide 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 @
e57c0909
...
...
@@ -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)
...
...
ndb/examples/ndbapi_example1/ndbapi_example1.cpp
View file @
e57c0909
...
...
@@ -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
;
...
...
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