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
eed990d6
Commit
eed990d6
authored
Sep 08, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A fix (bug #3120: 'mysqladmin ping' - return error code).
parent
419ca715
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
client/mysqladmin.c
client/mysqladmin.c
+18
-3
No files found.
client/mysqladmin.c
View file @
eed990d6
...
...
@@ -246,7 +246,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int
main
(
int
argc
,
char
*
argv
[])
{
int
error
,
ho_error
;
int
error
=
0
,
ho_error
;
MYSQL
mysql
;
char
**
commands
,
**
save_argv
;
...
...
@@ -285,10 +285,25 @@ int main(int argc,char *argv[])
opt_ssl_capath
,
opt_ssl_cipher
);
#endif
if
(
sql_connect
(
&
mysql
,
option_wait
))
error
=
1
;
{
unsigned
int
err
=
mysql_errno
(
&
mysql
);
if
(
err
>=
CR_MIN_ERROR
&&
err
<=
CR_MAX_ERROR
)
error
=
1
;
else
{
/* Return 0 if all commands are PING */
for
(;
argc
>
0
;
argv
++
,
argc
--
)
{
if
(
find_type
(
argv
[
0
],
&
command_typelib
,
2
)
!=
ADMIN_PING
)
{
error
=
1
;
break
;
}
}
}
}
else
{
error
=
0
;
while
(
!
interrupted
&&
(
!
opt_count_iterations
||
nr_iterations
))
{
new_line
=
0
;
...
...
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