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
f200c567
Commit
f200c567
authored
Nov 08, 2002
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Plain Diff
Merge sinisa@work.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0
parents
0f14b3c2
d54bb36d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
13 deletions
+30
-13
client/mysqlshow.c
client/mysqlshow.c
+30
-13
No files found.
client/mysqlshow.c
View file @
f200c567
...
@@ -51,6 +51,7 @@ static my_string opt_mysql_unix_port=0;
...
@@ -51,6 +51,7 @@ static my_string opt_mysql_unix_port=0;
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
int
error
;
int
error
;
my_bool
first_argument_uses_wildcards
=
0
;
char
*
wild
;
char
*
wild
;
MYSQL
mysql
;
MYSQL
mysql
;
MY_INIT
(
argv
[
0
]);
MY_INIT
(
argv
[
0
]);
...
@@ -58,21 +59,37 @@ int main(int argc, char **argv)
...
@@ -58,21 +59,37 @@ int main(int argc, char **argv)
get_options
(
&
argc
,
&
argv
);
get_options
(
&
argc
,
&
argv
);
wild
=
0
;
wild
=
0
;
if
(
argc
&&
strcont
(
argv
[
argc
-
1
],
"*?%_"
)
)
if
(
argc
)
{
{
char
*
pos
;
char
*
pos
=
argv
[
argc
-
1
],
*
to
;
for
(
to
=
pos
;
*
pos
;
pos
++
,
to
++
)
wild
=
argv
[
--
argc
];
{
for
(
pos
=
wild
;
*
pos
;
pos
++
)
switch
(
*
pos
)
{
/* Unix wildcards to sql */
{
if
(
*
pos
==
'*'
)
case
'*'
:
*
pos
=
'%'
;
*
pos
=
'%'
;
else
if
(
*
pos
==
'?'
)
first_argument_uses_wildcards
=
1
;
*
pos
=
'_'
;
break
;
case
'?'
:
*
pos
=
'_'
;
first_argument_uses_wildcards
=
1
;
break
;
case
'%'
:
case
'_'
:
first_argument_uses_wildcards
=
1
;
break
;
case
'\\'
:
pos
++
;
default:
break
;
}
*
to
=
*
pos
;
}
}
*
to
=
*
pos
;
// just to copy a '\0' if '\\' was used
}
}
if
(
first_argument_uses_wildcards
)
wild
=
argv
[
--
argc
];
else
if
(
argc
==
3
)
/* We only want one field */
else
if
(
argc
==
3
)
/* We only want one field */
wild
=
argv
[
--
argc
];
wild
=
argv
[
--
argc
];
if
(
argc
>
2
)
if
(
argc
>
2
)
{
{
...
@@ -88,7 +105,7 @@ int main(int argc, char **argv)
...
@@ -88,7 +105,7 @@ int main(int argc, char **argv)
opt_ssl_capath
,
opt_ssl_cipher
);
opt_ssl_capath
,
opt_ssl_cipher
);
#endif
#endif
if
(
!
(
mysql_real_connect
(
&
mysql
,
host
,
user
,
opt_password
,
if
(
!
(
mysql_real_connect
(
&
mysql
,
host
,
user
,
opt_password
,
argv
[
0
],
opt_mysql_port
,
opt_mysql_unix_port
,
(
first_argument_uses_wildcards
)
?
""
:
argv
[
0
],
opt_mysql_port
,
opt_mysql_unix_port
,
0
)))
0
)))
{
{
fprintf
(
stderr
,
"%s: %s
\n
"
,
my_progname
,
mysql_error
(
&
mysql
));
fprintf
(
stderr
,
"%s: %s
\n
"
,
my_progname
,
mysql_error
(
&
mysql
));
...
...
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