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
9ac2f960
Commit
9ac2f960
authored
Nov 19, 2008
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Plain Diff
merging
parents
2512923c
4d3f05b0
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
122 additions
and
21 deletions
+122
-21
dbug/dbug.c
dbug/dbug.c
+9
-0
include/my_dbug.h
include/my_dbug.h
+16
-0
libmysqld/examples/CMakeLists.txt
libmysqld/examples/CMakeLists.txt
+3
-3
libmysqld/libmysqld.def
libmysqld/libmysqld.def
+60
-0
mysys/mf_tempdir.c
mysys/mf_tempdir.c
+2
-0
mysys/my_getopt.c
mysys/my_getopt.c
+12
-7
sql/mysqld.cc
sql/mysqld.cc
+20
-11
No files found.
dbug/dbug.c
View file @
9ac2f960
...
@@ -2407,4 +2407,13 @@ int i_am_a_dummy_function() {
...
@@ -2407,4 +2407,13 @@ int i_am_a_dummy_function() {
return
0
;
return
0
;
}
}
#ifdef __WIN__
char
_db_doprnt_
;
char
_db_enter_
;
char
_db_pargs_
;
char
_db_process_
;
char
_db_push_
;
char
_db_return_
;
#endif
/*__WIN__*/
#endif
#endif
include/my_dbug.h
View file @
9ac2f960
...
@@ -108,6 +108,22 @@ extern FILE *_db_fp_(void);
...
@@ -108,6 +108,22 @@ extern FILE *_db_fp_(void);
#define DBUG_EXPLAIN(buf,len)
#define DBUG_EXPLAIN(buf,len)
#define DBUG_EXPLAIN_INITIAL(buf,len)
#define DBUG_EXPLAIN_INITIAL(buf,len)
#define IF_DBUG(A)
#define IF_DBUG(A)
#ifdef __WIN__
/*
On windows all the dll export has to be declared in the *.def file
so as we export these symbols in DEBUG mode we have to export
these in the RELEASE mode also. So below are the dummy symbols
for the RELEASE export
*/
extern
char
_db_doprnt_
;
extern
char
_db_enter_
;
extern
char
_db_pargs_
;
extern
char
_db_process_
;
extern
char
_db_push_
;
extern
char
_db_return_
;
#endif
/*__WIN__*/
#endif
#endif
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
libmysqld/examples/CMakeLists.txt
View file @
9ac2f960
...
@@ -29,13 +29,13 @@ ADD_DEFINITIONS(-DEMBEDDED_LIBRARY)
...
@@ -29,13 +29,13 @@ ADD_DEFINITIONS(-DEMBEDDED_LIBRARY)
ADD_EXECUTABLE
(
mysql_embedded ../../client/completion_hash.cc
ADD_EXECUTABLE
(
mysql_embedded ../../client/completion_hash.cc
../../client/mysql.cc ../../client/readline.cc
../../client/mysql.cc ../../client/readline.cc
../../client/sql_string.cc
)
../../client/sql_string.cc
)
TARGET_LINK_LIBRARIES
(
mysql_embedded
mysys yassl taocrypt zlib debug dbug regex strings
wsock32
)
TARGET_LINK_LIBRARIES
(
mysql_embedded
debug
wsock32
)
ADD_DEPENDENCIES
(
mysql_embedded libmysqld
)
ADD_DEPENDENCIES
(
mysql_embedded libmysqld
)
ADD_EXECUTABLE
(
mysqltest_embedded ../../client/mysqltest.c
)
ADD_EXECUTABLE
(
mysqltest_embedded ../../client/mysqltest.c
)
TARGET_LINK_LIBRARIES
(
mysqltest_embedded
mysys yassl taocrypt zlib debug dbug regex strings
wsock32
)
TARGET_LINK_LIBRARIES
(
mysqltest_embedded
debug
wsock32
)
ADD_DEPENDENCIES
(
mysqltest_embedded libmysqld
)
ADD_DEPENDENCIES
(
mysqltest_embedded libmysqld
)
ADD_EXECUTABLE
(
mysql_client_test_embedded ../../tests/mysql_client_test.c
)
ADD_EXECUTABLE
(
mysql_client_test_embedded ../../tests/mysql_client_test.c
)
TARGET_LINK_LIBRARIES
(
mysql_client_test_embedded debug
dbug mysys yassl taocrypt zlib strings
wsock32
)
TARGET_LINK_LIBRARIES
(
mysql_client_test_embedded debug wsock32
)
ADD_DEPENDENCIES
(
mysql_client_test_embedded libmysqld
)
ADD_DEPENDENCIES
(
mysql_client_test_embedded libmysqld
)
libmysqld/libmysqld.def
View file @
9ac2f960
...
@@ -2,6 +2,66 @@ LIBRARY LIBMYSQLD
...
@@ -2,6 +2,66 @@ LIBRARY LIBMYSQLD
DESCRIPTION 'MySQL 5.1 Embedded Server Library'
DESCRIPTION 'MySQL 5.1 Embedded Server Library'
VERSION 5.1
VERSION 5.1
EXPORTS
EXPORTS
_db_process_
_db_enter_
_db_return_
_db_push_
_db_doprnt_
_db_pargs_
strnmov
get_charset
my_memmem
my_snprintf
pthread_exit
pthread_cond_signal
dynstr_append_mem
init_dynamic_string
dynstr_free
hash_free
my_vsnprintf
dynstr_append
my_close
my_open
dynstr_set
dynstr_append_os_quoted
my_delete
my_seek
my_write
create_temp_file
fn_format
dirname_part
my_hash_insert
hash_search
test_if_hard_path
my_copy
my_mkdir
my_sleep
my_strtod
pthread_cond_wait
my_strnncoll_simple
get_dynamic
my_regerror
init_dynamic_array2
pthread_create
pthread_cond_init
my_regcomp
my_regexec
my_regex_end
my_regfree
longlong2str
my_set_exception_pointers
my_print_stacktrace
my_thread_stack_size
my_safe_print_str
my_stat
_hash_init
pthread_attr_setstacksize
pthread_attr_init
my_dirend
wild_compare
my_dir
my_micro_time
find_type_or_exit
_dig_vec_upper
_dig_vec_upper
_dig_vec_lower
_dig_vec_lower
bmove_upp
bmove_upp
...
...
mysys/mf_tempdir.c
View file @
9ac2f960
...
@@ -85,6 +85,8 @@ char *my_tmpdir(MY_TMPDIR *tmpdir)
...
@@ -85,6 +85,8 @@ char *my_tmpdir(MY_TMPDIR *tmpdir)
void
free_tmpdir
(
MY_TMPDIR
*
tmpdir
)
void
free_tmpdir
(
MY_TMPDIR
*
tmpdir
)
{
{
uint
i
;
uint
i
;
if
(
!
tmpdir
->
full_list
.
elements
)
return
;
for
(
i
=
0
;
i
<=
tmpdir
->
max
;
i
++
)
for
(
i
=
0
;
i
<=
tmpdir
->
max
;
i
++
)
my_free
(
tmpdir
->
list
[
i
],
MYF
(
0
));
my_free
(
tmpdir
->
list
[
i
],
MYF
(
0
));
delete_dynamic
(
&
tmpdir
->
full_list
);
delete_dynamic
(
&
tmpdir
->
full_list
);
...
...
mysys/my_getopt.c
View file @
9ac2f960
...
@@ -397,9 +397,10 @@ invalid value '%s'",
...
@@ -397,9 +397,10 @@ invalid value '%s'",
my_progname
,
optp
->
name
,
optend
);
my_progname
,
optp
->
name
,
optend
);
continue
;
continue
;
}
}
get_one_option
(
optp
->
id
,
optp
,
if
(
get_one_option
(
optp
->
id
,
optp
,
*
((
my_bool
*
)
value
)
?
*
((
my_bool
*
)
value
)
?
(
char
*
)
"1"
:
disabled_my_option
);
(
char
*
)
"1"
:
disabled_my_option
))
return
EXIT_ARGUMENT_INVALID
;
continue
;
continue
;
}
}
argument
=
optend
;
argument
=
optend
;
...
@@ -457,7 +458,8 @@ invalid value '%s'",
...
@@ -457,7 +458,8 @@ invalid value '%s'",
optp
->
arg_type
==
NO_ARG
)
optp
->
arg_type
==
NO_ARG
)
{
{
*
((
my_bool
*
)
optp
->
value
)
=
(
my_bool
)
1
;
*
((
my_bool
*
)
optp
->
value
)
=
(
my_bool
)
1
;
get_one_option
(
optp
->
id
,
optp
,
argument
);
if
(
get_one_option
(
optp
->
id
,
optp
,
argument
))
return
EXIT_UNSPECIFIED_ERROR
;
continue
;
continue
;
}
}
else
if
(
optp
->
arg_type
==
REQUIRED_ARG
||
else
if
(
optp
->
arg_type
==
REQUIRED_ARG
||
...
@@ -476,7 +478,8 @@ invalid value '%s'",
...
@@ -476,7 +478,8 @@ invalid value '%s'",
{
{
if
(
optp
->
var_type
==
GET_BOOL
)
if
(
optp
->
var_type
==
GET_BOOL
)
*
((
my_bool
*
)
optp
->
value
)
=
(
my_bool
)
1
;
*
((
my_bool
*
)
optp
->
value
)
=
(
my_bool
)
1
;
get_one_option
(
optp
->
id
,
optp
,
argument
);
if
(
get_one_option
(
optp
->
id
,
optp
,
argument
))
return
EXIT_UNSPECIFIED_ERROR
;
continue
;
continue
;
}
}
/* Check if there are more arguments after this one */
/* Check if there are more arguments after this one */
...
@@ -501,7 +504,8 @@ invalid value '%s'",
...
@@ -501,7 +504,8 @@ invalid value '%s'",
my_progname
,
argument
,
optp
->
name
);
my_progname
,
argument
,
optp
->
name
);
return
error
;
return
error
;
}
}
get_one_option
(
optp
->
id
,
optp
,
argument
);
if
(
get_one_option
(
optp
->
id
,
optp
,
argument
))
return
EXIT_UNSPECIFIED_ERROR
;
break
;
break
;
}
}
}
}
...
@@ -524,7 +528,8 @@ invalid value '%s'",
...
@@ -524,7 +528,8 @@ invalid value '%s'",
my_progname
,
argument
,
optp
->
name
);
my_progname
,
argument
,
optp
->
name
);
return
error
;
return
error
;
}
}
get_one_option
(
optp
->
id
,
optp
,
argument
);
if
(
get_one_option
(
optp
->
id
,
optp
,
argument
))
return
EXIT_UNSPECIFIED_ERROR
;
(
*
argc
)
--
;
/* option handled (short or long), decrease argument count */
(
*
argc
)
--
;
/* option handled (short or long), decrease argument count */
}
}
...
...
sql/mysqld.cc
View file @
9ac2f960
...
@@ -733,7 +733,7 @@ uint connection_count= 0;
...
@@ -733,7 +733,7 @@ uint connection_count= 0;
/* Function declarations */
/* Function declarations */
pthread_handler_t
signal_hand
(
void
*
arg
);
pthread_handler_t
signal_hand
(
void
*
arg
);
static
void
mysql_init_variables
(
void
);
static
int
mysql_init_variables
(
void
);
static
void
get_options
(
int
*
argc
,
char
**
argv
);
static
void
get_options
(
int
*
argc
,
char
**
argv
);
extern
"C"
my_bool
mysqld_get_one_option
(
int
,
const
struct
my_option
*
,
char
*
);
extern
"C"
my_bool
mysqld_get_one_option
(
int
,
const
struct
my_option
*
,
char
*
);
static
void
set_server_version
(
void
);
static
void
set_server_version
(
void
);
...
@@ -3141,12 +3141,12 @@ static int init_common_variables(const char *conf_file_name, int argc,
...
@@ -3141,12 +3141,12 @@ static int init_common_variables(const char *conf_file_name, int argc,
if
(
!
rpl_filter
||
!
binlog_filter
)
if
(
!
rpl_filter
||
!
binlog_filter
)
{
{
sql_perror
(
"Could not allocate replication and binlog filters"
);
sql_perror
(
"Could not allocate replication and binlog filters"
);
exit
(
1
)
;
return
1
;
}
}
if
(
init_thread_environment
())
if
(
init_thread_environment
()
||
mysql_init_variables
())
return
1
;
return
1
;
mysql_init_variables
();
#ifdef HAVE_TZNAME
#ifdef HAVE_TZNAME
{
{
...
@@ -3745,7 +3745,10 @@ version 5.0 and above. It is replaced by the binary log.");
...
@@ -3745,7 +3745,10 @@ version 5.0 and above. It is replaced by the binary log.");
{
{
/* as opt_bin_log==0, no need to free opt_bin_logname */
/* as opt_bin_log==0, no need to free opt_bin_logname */
if
(
!
(
opt_bin_logname
=
my_strdup
(
opt_update_logname
,
MYF
(
MY_WME
))))
if
(
!
(
opt_bin_logname
=
my_strdup
(
opt_update_logname
,
MYF
(
MY_WME
))))
exit
(
EXIT_OUT_OF_MEMORY
);
{
sql_print_error
(
"Out of memory"
);
return
EXIT_OUT_OF_MEMORY
;
}
sql_print_error
(
"The update log is no longer supported by MySQL in \
sql_print_error
(
"The update log is no longer supported by MySQL in \
version 5.0 and above. It is replaced by the binary log. Now starting MySQL \
version 5.0 and above. It is replaced by the binary log. Now starting MySQL \
with --log-bin='%s' instead."
,
opt_bin_logname
);
with --log-bin='%s' instead."
,
opt_bin_logname
);
...
@@ -7424,7 +7427,7 @@ To see what values a running MySQL server is using, type\n\
...
@@ -7424,7 +7427,7 @@ To see what values a running MySQL server is using, type\n\
as these are initialized by my_getopt.
as these are initialized by my_getopt.
*/
*/
static
void
mysql_init_variables
(
void
)
static
int
mysql_init_variables
(
void
)
{
{
/* Things reset to zero */
/* Things reset to zero */
opt_skip_slave_start
=
opt_reckless_slave
=
0
;
opt_skip_slave_start
=
opt_reckless_slave
=
0
;
...
@@ -7505,7 +7508,10 @@ static void mysql_init_variables(void)
...
@@ -7505,7 +7508,10 @@ static void mysql_init_variables(void)
key_caches
.
empty
();
key_caches
.
empty
();
if
(
!
(
dflt_key_cache
=
get_or_create_key_cache
(
default_key_cache_base
.
str
,
if
(
!
(
dflt_key_cache
=
get_or_create_key_cache
(
default_key_cache_base
.
str
,
default_key_cache_base
.
length
)))
default_key_cache_base
.
length
)))
exit
(
1
);
{
sql_print_error
(
"Cannot allocate the keycache"
);
return
1
;
}
/* set key_cache_hash.default_value = dflt_key_cache */
/* set key_cache_hash.default_value = dflt_key_cache */
multi_keycache_init
();
multi_keycache_init
();
...
@@ -7648,6 +7654,7 @@ static void mysql_init_variables(void)
...
@@ -7648,6 +7654,7 @@ static void mysql_init_variables(void)
tmpenv
=
DEFAULT_MYSQL_HOME
;
tmpenv
=
DEFAULT_MYSQL_HOME
;
(
void
)
strmake
(
mysql_home
,
tmpenv
,
sizeof
(
mysql_home
)
-
1
);
(
void
)
strmake
(
mysql_home
,
tmpenv
,
sizeof
(
mysql_home
)
-
1
);
#endif
#endif
return
0
;
}
}
...
@@ -7708,9 +7715,11 @@ mysqld_get_one_option(int optid,
...
@@ -7708,9 +7715,11 @@ mysqld_get_one_option(int optid,
#endif
#endif
break
;
break
;
#include <sslopt-case.h>
#include <sslopt-case.h>
#ifndef EMBEDDED_LIBRARY
case
'V'
:
case
'V'
:
print_version
();
print_version
();
exit
(
0
);
exit
(
0
);
#endif
/*EMBEDDED_LIBRARY*/
case
'W'
:
case
'W'
:
if
(
!
argument
)
if
(
!
argument
)
global_system_variables
.
log_warnings
++
;
global_system_variables
.
log_warnings
++
;
...
@@ -7939,14 +7948,14 @@ mysqld_get_one_option(int optid,
...
@@ -7939,14 +7948,14 @@ mysqld_get_one_option(int optid,
if
(
gethostname
(
myhostname
,
sizeof
(
myhostname
))
<
0
)
if
(
gethostname
(
myhostname
,
sizeof
(
myhostname
))
<
0
)
{
{
sql_perror
(
"Can't start server: cannot get my own hostname!"
);
sql_perror
(
"Can't start server: cannot get my own hostname!"
);
exit
(
1
)
;
return
1
;
}
}
ent
=
gethostbyname
(
myhostname
);
ent
=
gethostbyname
(
myhostname
);
}
}
if
(
!
ent
)
if
(
!
ent
)
{
{
sql_perror
(
"Can't start server: cannot resolve hostname!"
);
sql_perror
(
"Can't start server: cannot resolve hostname!"
);
exit
(
1
)
;
return
1
;
}
}
my_bind_addr
=
(
ulong
)
((
in_addr
*
)
ent
->
h_addr_list
[
0
])
->
s_addr
;
my_bind_addr
=
(
ulong
)
((
in_addr
*
)
ent
->
h_addr_list
[
0
])
->
s_addr
;
}
}
...
@@ -8143,8 +8152,8 @@ mysqld_get_one_option(int optid,
...
@@ -8143,8 +8152,8 @@ mysqld_get_one_option(int optid,
case
OPT_FT_BOOLEAN_SYNTAX
:
case
OPT_FT_BOOLEAN_SYNTAX
:
if
(
ft_boolean_check_syntax_string
((
uchar
*
)
argument
))
if
(
ft_boolean_check_syntax_string
((
uchar
*
)
argument
))
{
{
fprintf
(
stderr
,
"Invalid ft-boolean-syntax string: %s
\n
"
,
argument
);
sql_print_error
(
"Invalid ft-boolean-syntax string: %s
\n
"
,
argument
);
exit
(
1
)
;
return
1
;
}
}
strmake
(
ft_boolean_syntax
,
argument
,
sizeof
(
ft_boolean_syntax
)
-
1
);
strmake
(
ft_boolean_syntax
,
argument
,
sizeof
(
ft_boolean_syntax
)
-
1
);
break
;
break
;
...
...
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