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
7370017d
Commit
7370017d
authored
May 02, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-4.1-9136
into mysql.com:/home/jimw/my/mysql-4.1-clean
parents
2aea94f4
b186f021
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
extra/my_print_defaults.c
extra/my_print_defaults.c
+12
-1
mysys/default.c
mysys/default.c
+6
-5
No files found.
extra/my_print_defaults.c
View file @
7370017d
...
...
@@ -27,12 +27,20 @@
const
char
*
config_file
=
"my"
;
/* Default config file */
uint
verbose
=
0
,
opt_defaults_file_used
=
0
;
const
char
*
default_dbug_option
=
"d:t:o,/tmp/my_print_defaults.trace"
;
static
struct
my_option
my_long_options
[]
=
{
{
"config-file"
,
'c'
,
"The config file to be used."
,
(
gptr
*
)
&
config_file
,
(
gptr
*
)
&
config_file
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#ifdef DBUG_OFF
{
"debug"
,
'#'
,
"This is a non-debug version. Catch this and exit"
,
0
,
0
,
0
,
GET_DISABLED
,
OPT_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#else
{
"debug"
,
'#'
,
"Output debug log"
,
(
gptr
*
)
&
default_dbug_option
,
(
gptr
*
)
&
default_dbug_option
,
0
,
GET_STR
,
OPT_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
{
"defaults-file"
,
'c'
,
"Synonym for --config-file."
,
(
gptr
*
)
&
config_file
,
(
gptr
*
)
&
config_file
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
@@ -95,6 +103,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case
'V'
:
usage
(
1
);
exit
(
0
);
case
'#'
:
DBUG_PUSH
(
argument
?
argument
:
default_dbug_option
);
break
;
}
return
0
;
}
...
...
@@ -118,7 +129,7 @@ static int get_options(int *argc,char ***argv)
int
main
(
int
argc
,
char
**
argv
)
{
int
count
,
error
;
char
**
load_default_groups
,
*
tmp_arguments
[
2
],
char
**
load_default_groups
,
*
tmp_arguments
[
3
],
**
argument
,
**
arguments
;
char
*
defaults
,
*
extra_defaults
;
MY_INIT
(
argv
[
0
]);
...
...
mysys/default.c
View file @
7370017d
...
...
@@ -144,7 +144,7 @@ int load_defaults(const char *conf_file, const char **groups,
int
*
argc
,
char
***
argv
)
{
DYNAMIC_ARRAY
args
;
const
char
**
dirs
,
*
forced_default_file
;
const
char
**
dirs
,
*
forced_default_file
,
*
forced_extra_defaults
;
TYPELIB
group
;
my_bool
found_print_defaults
=
0
;
uint
args_used
=
0
;
...
...
@@ -174,13 +174,14 @@ int load_defaults(const char *conf_file, const char **groups,
}
get_defaults_files
(
*
argc
,
*
argv
,
(
char
**
)
&
forced_default_file
,
&
defaults_extra_file
);
(
char
**
)
&
forced_default_file
,
(
char
**
)
&
forced_extra_defaults
);
if
(
forced_default_file
)
forced_default_file
=
strchr
(
forced_default_file
,
'='
)
+
1
;
if
(
defaults_extra_file
)
defaults_extra_file
=
strchr
(
defaults_extra_file
,
'='
)
+
1
;
if
(
forced_extra_defaults
)
defaults_extra_file
=
strchr
(
forced_extra_defaults
,
'='
)
+
1
;
args_used
+=
(
forced_default_file
?
1
:
0
)
+
(
defaults_extra_file
?
1
:
0
);
args_used
+=
(
forced_default_file
?
1
:
0
)
+
(
forced_extra_defaults
?
1
:
0
);
group
.
count
=
0
;
group
.
name
=
"defaults"
;
...
...
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