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
70a25875
Commit
70a25875
authored
Apr 03, 2002
by
jani@hynda.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge and two bug fixes in my_getopt.c
parent
22a35da6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
client/mysql.cc
client/mysql.cc
+6
-11
client/mysqldump.c
client/mysqldump.c
+0
-1
myisam/myisamchk.c
myisam/myisamchk.c
+0
-1
mysys/my_getopt.c
mysys/my_getopt.c
+10
-3
No files found.
client/mysql.cc
View file @
70a25875
...
@@ -124,7 +124,7 @@ static my_bool info_flag=0,ignore_errors=0,wait_flag=0,quick=0,
...
@@ -124,7 +124,7 @@ static my_bool info_flag=0,ignore_errors=0,wait_flag=0,quick=0,
opt_compress
=
0
,
using_opt_local_infile
=
0
,
opt_compress
=
0
,
using_opt_local_infile
=
0
,
vertical
=
0
,
line_numbers
=
1
,
column_names
=
1
,
opt_html
=
0
,
vertical
=
0
,
line_numbers
=
1
,
column_names
=
1
,
opt_html
=
0
,
opt_xml
=
0
,
opt_nopager
=
1
,
opt_outfile
=
0
,
named_cmds
=
0
,
opt_xml
=
0
,
opt_nopager
=
1
,
opt_outfile
=
0
,
named_cmds
=
0
,
tty_password
=
0
.
opt_nobeep
=
0
;
tty_password
=
0
,
opt_nobeep
=
0
;
static
uint
verbose
=
0
,
opt_silent
=
0
,
opt_mysql_port
=
0
,
opt_local_infile
=
0
;
static
uint
verbose
=
0
,
opt_silent
=
0
,
opt_mysql_port
=
0
,
opt_local_infile
=
0
;
static
my_string
opt_mysql_unix_port
=
0
;
static
my_string
opt_mysql_unix_port
=
0
;
static
int
connect_flag
=
CLIENT_INTERACTIVE
;
static
int
connect_flag
=
CLIENT_INTERACTIVE
;
...
@@ -469,8 +469,8 @@ static struct my_option my_long_options[] =
...
@@ -469,8 +469,8 @@ static struct my_option my_long_options[] =
{
"debug"
,
'#'
,
"Output debug log."
,
(
gptr
*
)
&
default_dbug_option
,
{
"debug"
,
'#'
,
"Output debug log."
,
(
gptr
*
)
&
default_dbug_option
,
(
gptr
*
)
&
default_dbug_option
,
0
,
GET_STR
,
OPT_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
(
gptr
*
)
&
default_dbug_option
,
0
,
GET_STR
,
OPT_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
#endif
{
"database"
,
'D'
,
"Database to use."
,
0
,
0
,
0
,
GET_
NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
{
"database"
,
'D'
,
"Database to use."
,
0
,
0
,
0
,
GET_
STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
},
{
"execute"
,
'e'
,
"Execute command and quit. (Output like with --batch)."
,
0
,
{
"execute"
,
'e'
,
"Execute command and quit. (Output like with --batch)."
,
0
,
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"vertical"
,
'E'
,
"Print the output of a query (rows) vertically."
,
{
"vertical"
,
'E'
,
"Print the output of a query (rows) vertically."
,
...
@@ -602,8 +602,8 @@ Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB\n\
...
@@ -602,8 +602,8 @@ Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB\n\
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
\n
\
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
\n
\
and you are welcome to modify and redistribute it under the GPL license
\n
"
);
and you are welcome to modify and redistribute it under the GPL license
\n
"
);
printf
(
"Usage: %s [OPTIONS] [database]
\n
"
,
my_progname
);
printf
(
"Usage: %s [OPTIONS] [database]
\n
"
,
my_progname
);
print_defaults
(
"my"
,
load_default_groups
);
my_print_help
(
my_long_options
);
my_print_help
(
my_long_options
);
print_defaults
(
"my"
,
load_default_groups
);
my_print_variables
(
my_long_options
);
my_print_variables
(
my_long_options
);
}
}
...
@@ -619,9 +619,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -619,9 +619,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
strmov
(
mysql_charsets_dir
,
argument
);
strmov
(
mysql_charsets_dir
,
argument
);
charsets_dir
=
mysql_charsets_dir
;
charsets_dir
=
mysql_charsets_dir
;
break
;
break
;
case
OPT_DEFAULT_CHARSET
:
default_charset
=
optarg
;
break
;
case
OPT_LOCAL_INFILE
:
case
OPT_LOCAL_INFILE
:
using_opt_local_infile
=
1
;
using_opt_local_infile
=
1
;
opt_local_infile
=
test
(
!
optarg
||
atoi
(
optarg
)
>
0
);
opt_local_infile
=
test
(
!
optarg
||
atoi
(
optarg
)
>
0
);
...
@@ -711,9 +708,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -711,9 +708,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
else
else
tty_password
=
1
;
tty_password
=
1
;
}
}
break
;
case
'#'
:
case
'#'
:
DBUG_PUSH
(
argument
?
argument
:
default_dbug_option
);
DBUG_PUSH
(
argument
?
argument
:
default_dbug_option
);
info_flag
=
1
;
info_flag
=
1
;
break
;
case
's'
:
case
's'
:
if
(
argument
==
disabled_my_option
)
if
(
argument
==
disabled_my_option
)
opt_silent
=
0
;
opt_silent
=
0
;
...
@@ -753,10 +752,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -753,10 +752,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case
'?'
:
case
'?'
:
usage
(
0
);
usage
(
0
);
exit
(
0
);
exit
(
0
);
case
'#'
:
DBUG_PUSH
(
optarg
?
optarg
:
default_dbug_option
);
info_flag
=
1
;
break
;
#include "sslopt-case.h"
#include "sslopt-case.h"
}
}
return
0
;
return
0
;
...
...
client/mysqldump.c
View file @
70a25875
...
@@ -405,7 +405,6 @@ static int get_options(int *argc, char ***argv)
...
@@ -405,7 +405,6 @@ static int get_options(int *argc, char ***argv)
md_result_file
=
stdout
;
md_result_file
=
stdout
;
load_defaults
(
"my"
,
load_default_groups
,
argc
,
argv
);
load_defaults
(
"my"
,
load_default_groups
,
argc
,
argv
);
set_all_changeable_vars
(
md_changeable_vars
);
if
((
ho_error
=
handle_options
(
argc
,
argv
,
my_long_options
,
get_one_option
)))
if
((
ho_error
=
handle_options
(
argc
,
argv
,
my_long_options
,
get_one_option
)))
{
{
...
...
myisam/myisamchk.c
View file @
70a25875
...
@@ -200,7 +200,6 @@ static struct my_option my_long_options[] =
...
@@ -200,7 +200,6 @@ static struct my_option my_long_options[] =
{
"medium-check"
,
'm'
,
{
"medium-check"
,
'm'
,
"Faster than extended-check, but only finds 99.99% of all errors. Should be good enough for most cases."
,
"Faster than extended-check, but only finds 99.99% of all errors. Should be good enough for most cases."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
0
},
{
"quick"
,
'q'
,
"Faster repair by not modifying the data file."
,
0
,
0
,
0
,
{
"quick"
,
'q'
,
"Faster repair by not modifying the data file."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"read-only"
,
'T'
,
"Don't mark table as checked."
,
0
,
0
,
0
,
GET_NO_ARG
,
{
"read-only"
,
'T'
,
"Don't mark table as checked."
,
0
,
0
,
0
,
GET_NO_ARG
,
...
...
mysys/my_getopt.c
View file @
70a25875
...
@@ -300,7 +300,14 @@ int handle_options(int *argc, char ***argv,
...
@@ -300,7 +300,14 @@ int handle_options(int *argc, char ***argv,
{
{
/* Option recognized. Find next what to do with it */
/* Option recognized. Find next what to do with it */
opt_found
=
1
;
opt_found
=
1
;
if
(
optp
->
arg_type
==
REQUIRED_ARG
||
optp
->
arg_type
==
OPT_ARG
)
if
(
optp
->
var_type
==
GET_BOOL
&&
optp
->
arg_type
==
NO_ARG
)
{
*
((
my_bool
*
)
optp
->
value
)
=
(
my_bool
)
1
;
(
*
argc
)
--
;
continue
;
}
else
if
(
optp
->
arg_type
==
REQUIRED_ARG
||
optp
->
arg_type
==
OPT_ARG
)
{
{
if
(
*
(
optend
+
1
))
if
(
*
(
optend
+
1
))
{
{
...
@@ -520,7 +527,7 @@ void my_print_help(const struct my_option *options)
...
@@ -520,7 +527,7 @@ void my_print_help(const struct my_option *options)
{
{
printf
(
"%s=name%s "
,
optp
->
arg_type
==
OPT_ARG
?
"["
:
""
,
printf
(
"%s=name%s "
,
optp
->
arg_type
==
OPT_ARG
?
"["
:
""
,
optp
->
arg_type
==
OPT_ARG
?
"]"
:
""
);
optp
->
arg_type
==
OPT_ARG
?
"]"
:
""
);
col
+=
6
;
col
+=
(
optp
->
arg_type
==
OPT_ARG
)
?
8
:
6
;
}
}
else
if
(
optp
->
var_type
==
GET_NO_ARG
||
optp
->
var_type
==
GET_BOOL
)
else
if
(
optp
->
var_type
==
GET_NO_ARG
||
optp
->
var_type
==
GET_BOOL
)
{
{
...
@@ -531,7 +538,7 @@ void my_print_help(const struct my_option *options)
...
@@ -531,7 +538,7 @@ void my_print_help(const struct my_option *options)
{
{
printf
(
"%s=#%s "
,
optp
->
arg_type
==
OPT_ARG
?
"["
:
""
,
printf
(
"%s=#%s "
,
optp
->
arg_type
==
OPT_ARG
?
"["
:
""
,
optp
->
arg_type
==
OPT_ARG
?
"]"
:
""
);
optp
->
arg_type
==
OPT_ARG
?
"]"
:
""
);
col
+=
3
;
col
+=
(
optp
->
arg_type
==
OPT_ARG
)
?
5
:
3
;
}
}
if
(
col
>
name_space
)
if
(
col
>
name_space
)
{
{
...
...
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