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
5f9d6640
Commit
5f9d6640
authored
Feb 24, 2009
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Plain Diff
merging.
parents
21ba22ac
37a762da
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
66 deletions
+111
-66
include/my_getopt.h
include/my_getopt.h
+1
-1
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+9
-0
mysys/default.c
mysys/default.c
+5
-5
mysys/my_getopt.c
mysys/my_getopt.c
+9
-5
sql/mysql_priv.h
sql/mysql_priv.h
+2
-1
sql/mysqld.cc
sql/mysqld.cc
+85
-54
No files found.
include/my_getopt.h
View file @
5f9d6640
...
...
@@ -72,7 +72,7 @@ extern void my_cleanup_options(const struct my_option *options);
extern
void
my_print_help
(
const
struct
my_option
*
options
);
extern
void
my_print_variables
(
const
struct
my_option
*
options
);
extern
void
my_getopt_register_get_addr
(
uchar
**
(
*
func_addr
)(
const
char
*
,
uint
,
const
struct
my_option
*
));
const
struct
my_option
*
,
int
*
));
ulonglong
getopt_ull_limit_value
(
ulonglong
num
,
const
struct
my_option
*
optp
,
my_bool
*
fix
);
...
...
libmysqld/lib_sql.cc
View file @
5f9d6640
...
...
@@ -43,6 +43,15 @@ extern char mysql_server_last_error[MYSQL_ERRMSG_SIZE];
static
my_bool
emb_read_query_result
(
MYSQL
*
mysql
);
extern
"C"
void
unireg_clear
(
int
exit_code
)
{
DBUG_ENTER
(
"unireg_clear"
);
clean_up
(
!
opt_help
&&
(
exit_code
||
!
opt_bootstrap
));
/* purecov: inspected */
my_end
(
opt_endinfo
?
MY_CHECK_ERROR
|
MY_GIVE_INFO
:
0
);
DBUG_VOID_RETURN
;
}
/*
Reads error information from the MYSQL_DATA and puts
it into proper MYSQL members
...
...
mysys/default.c
View file @
5f9d6640
...
...
@@ -144,6 +144,7 @@ static char *remove_end_comment(char *ptr);
RETURN
0 ok
1 given cinf_file doesn't exist
2 out of memory
The global variable 'my_defaults_group_suffix' is updated with value for
--defaults_group_suffix
...
...
@@ -190,7 +191,7 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv,
if
(
!
(
extra_groups
=
(
const
char
**
)
alloc_root
(
ctx
->
alloc
,
(
2
*
group
->
count
+
1
)
*
sizeof
(
char
*
))))
goto
err
;
DBUG_RETURN
(
2
)
;
for
(
i
=
0
;
i
<
group
->
count
;
i
++
)
{
...
...
@@ -199,7 +200,7 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv,
len
=
strlen
(
extra_groups
[
i
]);
if
(
!
(
ptr
=
alloc_root
(
ctx
->
alloc
,
len
+
instance_len
+
1
)))
goto
err
;
DBUG_RETURN
(
2
)
;
extra_groups
[
i
+
group
->
count
]
=
ptr
;
...
...
@@ -254,12 +255,11 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv,
}
}
DBUG_RETURN
(
error
);
DBUG_RETURN
(
0
);
err:
fprintf
(
stderr
,
"Fatal error in defaults handling. Program aborted
\n
"
);
exit
(
1
);
return
0
;
/* Keep compiler happy */
DBUG_RETURN
(
1
);
}
...
...
mysys/my_getopt.c
View file @
5f9d6640
...
...
@@ -100,10 +100,10 @@ static void default_reporter(enum loglevel level,
one. Call function 'get_one_option()' once for each option.
*/
static
uchar
**
(
*
getopt_get_addr
)(
const
char
*
,
uint
,
const
struct
my_option
*
);
static
uchar
**
(
*
getopt_get_addr
)(
const
char
*
,
uint
,
const
struct
my_option
*
,
int
*
);
void
my_getopt_register_get_addr
(
uchar
**
(
*
func_addr
)(
const
char
*
,
uint
,
const
struct
my_option
*
))
const
struct
my_option
*
,
int
*
))
{
getopt_get_addr
=
func_addr
;
}
...
...
@@ -362,8 +362,12 @@ int handle_options(int *argc, char ***argv,
my_progname
,
optp
->
name
);
return
EXIT_NO_ARGUMENT_ALLOWED
;
}
error
=
0
;
value
=
optp
->
var_type
&
GET_ASK_ADDR
?
(
*
getopt_get_addr
)(
key_name
,
(
uint
)
strlen
(
key_name
),
optp
)
:
optp
->
value
;
(
*
getopt_get_addr
)(
key_name
,
(
uint
)
strlen
(
key_name
),
optp
,
&
error
)
:
optp
->
value
;
if
(
error
)
return
error
;
if
(
optp
->
arg_type
==
NO_ARG
)
{
...
...
@@ -1092,7 +1096,7 @@ static void init_variables(const struct my_option *options,
if
(
options
->
value
)
init_one_value
(
options
,
options
->
value
,
options
->
def_value
);
if
(
options
->
var_type
&
GET_ASK_ADDR
&&
(
variable
=
(
*
getopt_get_addr
)(
""
,
0
,
options
)))
(
variable
=
(
*
getopt_get_addr
)(
""
,
0
,
options
,
0
)))
init_one_value
(
options
,
variable
,
options
->
def_value
);
}
DBUG_VOID_RETURN
;
...
...
@@ -1196,7 +1200,7 @@ void my_print_variables(const struct my_option *options)
for
(
optp
=
options
;
optp
->
id
;
optp
++
)
{
uchar
*
*
value
=
(
optp
->
var_type
&
GET_ASK_ADDR
?
(
*
getopt_get_addr
)(
""
,
0
,
optp
)
:
optp
->
value
);
(
*
getopt_get_addr
)(
""
,
0
,
optp
,
0
)
:
optp
->
value
);
if
(
value
)
{
printf
(
"%s "
,
optp
->
name
);
...
...
sql/mysql_priv.h
View file @
5f9d6640
...
...
@@ -2411,7 +2411,8 @@ extern "C" void unireg_abort(int exit_code) __attribute__((noreturn));
void
kill_delayed_threads
(
void
);
bool
check_stack_overrun
(
THD
*
thd
,
long
margin
,
uchar
*
dummy
);
#else
#define unireg_abort(exit_code) DBUG_RETURN(exit_code)
extern
"C"
void
unireg_clear
(
int
exit_code
);
#define unireg_abort(exit_code) do { unireg_clear(exit_code); DBUG_RETURN(exit_code); } while(0)
inline
void
kill_delayed_threads
(
void
)
{}
#define check_stack_overrun(A, B, C) 0
#endif
...
...
sql/mysqld.cc
View file @
5f9d6640
This diff is collapsed.
Click to expand it.
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