Commit 68d6d4fc authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

merge

parents bee1d88a e45a6a17
...@@ -1132,3 +1132,4 @@ plugin/handler_socket/perl-Net-HandlerSocket/blib ...@@ -1132,3 +1132,4 @@ plugin/handler_socket/perl-Net-HandlerSocket/blib
plugin/handler_socket/perl-Net-HandlerSocket/pm_to_blib plugin/handler_socket/perl-Net-HandlerSocket/pm_to_blib
plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.bs plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.bs
plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL
libmysqld/libmysqld_exports_file.cc
...@@ -1607,10 +1607,10 @@ unsigned long ERR_get_error() ...@@ -1607,10 +1607,10 @@ unsigned long ERR_get_error()
} }
int SSL_CTX_use_certificate_chain_file(SSL_CTX*, const char*) int SSL_CTX_use_certificate_chain_file(SSL_CTX* ctx, const char* file)
{ {
// TDOD: // For the moment, treat like use_certificate_file
return SSL_SUCCESS; return read_file(ctx, file, SSL_FILETYPE_PEM, Cert);
} }
......
...@@ -150,7 +150,7 @@ our $default_vardir; ...@@ -150,7 +150,7 @@ our $default_vardir;
our $opt_usage; our $opt_usage;
our $opt_list_options; our $opt_list_options;
our $opt_suites; our $opt_suites;
our $opt_suites_default= "main,binlog,rpl,rpl_ndb,ndb,maria"; # Default suites to run our $opt_suites_default= "main,binlog,rpl,maria"; # Default suites to run
our $opt_script_debug= 0; # Script debugging, enable with --script-debug our $opt_script_debug= 0; # Script debugging, enable with --script-debug
our $opt_verbose= 0; # Verbose output, enable with --verbose our $opt_verbose= 0; # Verbose output, enable with --verbose
......
...@@ -2726,9 +2726,9 @@ sub setup_vardir() { ...@@ -2726,9 +2726,9 @@ sub setup_vardir() {
<../plugin/*/.libs/*.so>, <../plugin/*/.libs/*.so>,
<../plugin/*/*/.libs/*.so>, <../plugin/*/*/.libs/*.so>,
<../sql/.libs/*.so>, <../sql/.libs/*.so>,
<../storage/*/*.so>, <$bindir/storage/*/*.so>,
<../plugin/*/*.so>, <$bindir/plugin/*/*.so>,
<../sql/*.so>) <$bindir/sql/*.so>)
{ {
my $pname=basename($_); my $pname=basename($_);
symlink rel2abs($_), "$plugindir/$pname"; symlink rel2abs($_), "$plugindir/$pname";
......
#!/bin/sh
d="$MYSQLTEST_VARDIR/tmp/long_temporary_directory_path_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789" d="$MYSQLTEST_VARDIR/tmp/long_temporary_directory_path_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789"
test -d "$d" || mkdir "$d" test -d "$d" || mkdir "$d"
rm -f "$d"/* rm -f "$d"/*
#!/bin/sh
# This test requires a non-lowercase tmpdir directory on a case-sensitive # This test requires a non-lowercase tmpdir directory on a case-sensitive
# filesystem. # filesystem.
......
...@@ -199,6 +199,9 @@ Voluntary context switches %ld, Involuntary context switches %ld\n", ...@@ -199,6 +199,9 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
#endif #endif
} }
if (!(infoflag & MY_DONT_FREE_DBUG))
DBUG_END(); /* Must be done as late as possible */
my_thread_end(); my_thread_end();
my_thread_global_end(); my_thread_global_end();
my_mutex_end(); my_mutex_end();
...@@ -216,9 +219,6 @@ Voluntary context switches %ld, Involuntary context switches %ld\n", ...@@ -216,9 +219,6 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
WSACleanup(); WSACleanup();
#endif /* __WIN__ */ #endif /* __WIN__ */
if (!(infoflag & MY_DONT_FREE_DBUG))
DBUG_END(); /* Must be done as late as possible */
my_init_done=0; my_init_done=0;
} /* my_end */ } /* my_end */
......
#!/usr/bin/perl
#### ####
#### Hello ... this is a heavily hacked script by Luuk #### Hello ... this is a heavily hacked script by Luuk
#### instead of printing the result it makes a nice gif #### instead of printing the result it makes a nice gif
......
...@@ -357,11 +357,12 @@ static I_List<THD> thread_cache; ...@@ -357,11 +357,12 @@ static I_List<THD> thread_cache;
static bool binlog_format_used= false; static bool binlog_format_used= false;
LEX_STRING opt_init_connect, opt_init_slave; LEX_STRING opt_init_connect, opt_init_slave;
static mysql_cond_t COND_thread_cache, COND_flush_thread_cache; static mysql_cond_t COND_thread_cache, COND_flush_thread_cache;
static DYNAMIC_ARRAY all_options;
/* Global variables */ /* Global variables */
bool opt_bin_log, opt_ignore_builtin_innodb= 0; bool opt_bin_log, opt_ignore_builtin_innodb= 0;
my_bool opt_log, opt_slow_log, debug_assert_if_crashed_table= 0, opt_help= 0; my_bool opt_log, opt_slow_log, debug_assert_if_crashed_table= 0, opt_help= 0, opt_abort;
ulonglong log_output_options; ulonglong log_output_options;
my_bool opt_userstat_running; my_bool opt_userstat_running;
my_bool opt_log_queries_not_using_indexes= 0; my_bool opt_log_queries_not_using_indexes= 0;
...@@ -1178,8 +1179,9 @@ bool mysqld_embedded=1; ...@@ -1178,8 +1179,9 @@ bool mysqld_embedded=1;
static my_bool plugins_are_initialized= FALSE; static my_bool plugins_are_initialized= FALSE;
#ifndef DBUG_OFF #ifndef DBUG_OFF
static const char* default_dbug_option, *current_dbug_option; static const char* default_dbug_option;
#endif #endif
static const char *current_dbug_option;
#ifdef HAVE_LIBWRAP #ifdef HAVE_LIBWRAP
const char *libwrapName= NULL; const char *libwrapName= NULL;
int allow_severity = LOG_INFO; int allow_severity = LOG_INFO;
...@@ -1710,7 +1712,7 @@ extern "C" void unireg_abort(int exit_code) ...@@ -1710,7 +1712,7 @@ extern "C" void unireg_abort(int exit_code)
usage(); usage();
if (exit_code) if (exit_code)
sql_print_error("Aborting\n"); sql_print_error("Aborting\n");
clean_up(!opt_help && (exit_code || !opt_bootstrap)); /* purecov: inspected */ clean_up(!opt_abort && (exit_code || !opt_bootstrap)); /* purecov: inspected */
DBUG_PRINT("quit",("done with cleanup in unireg_abort")); DBUG_PRINT("quit",("done with cleanup in unireg_abort"));
mysqld_exit(exit_code); mysqld_exit(exit_code);
} }
...@@ -1726,9 +1728,8 @@ static void mysqld_exit(int exit_code) ...@@ -1726,9 +1728,8 @@ static void mysqld_exit(int exit_code)
mysql_audit_finalize(); mysql_audit_finalize();
clean_up_mutexes(); clean_up_mutexes();
clean_up_error_log_mutex(); clean_up_error_log_mutex();
my_end((opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0) | MY_DONT_FREE_DBUG); my_end((opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0));
shutdown_performance_schema(); // we do it as late as possible shutdown_performance_schema(); // we do it as late as possible
DBUG_END(); // but this - even later
exit(exit_code); /* purecov: inspected */ exit(exit_code); /* purecov: inspected */
} }
...@@ -1803,6 +1804,7 @@ void clean_up(bool print_message) ...@@ -1803,6 +1804,7 @@ void clean_up(bool print_message)
free_global_client_stats(); free_global_client_stats();
free_global_table_stats(); free_global_table_stats();
free_global_index_stats(); free_global_index_stats();
delete_dynamic(&all_options);
#ifdef HAVE_REPLICATION #ifdef HAVE_REPLICATION
end_slave_list(); end_slave_list();
#endif #endif
...@@ -3646,7 +3648,7 @@ static int init_common_variables() ...@@ -3646,7 +3648,7 @@ static int init_common_variables()
set_server_version(); set_server_version();
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
if (opt_help && !opt_verbose) if (opt_abort && !opt_verbose)
unireg_abort(0); unireg_abort(0);
#endif /*!EMBEDDED_LIBRARY*/ #endif /*!EMBEDDED_LIBRARY*/
...@@ -4207,7 +4209,7 @@ static int init_server_components() ...@@ -4207,7 +4209,7 @@ static int init_server_components()
help information. Since the implementation of plugin server help information. Since the implementation of plugin server
variables the help output is now written much later. variables the help output is now written much later.
*/ */
if (opt_error_log && !opt_help) if (opt_error_log && !opt_abort)
{ {
if (!log_error_file_ptr[0]) if (!log_error_file_ptr[0])
fn_format(log_error_file, pidfile_name, mysql_data_home, ".err", fn_format(log_error_file, pidfile_name, mysql_data_home, ".err",
...@@ -4366,7 +4368,7 @@ a file name for --log-bin-index option", opt_binlog_index_name); ...@@ -4366,7 +4368,7 @@ a file name for --log-bin-index option", opt_binlog_index_name);
if (plugin_init(&remaining_argc, remaining_argv, if (plugin_init(&remaining_argc, remaining_argv,
(opt_noacl ? PLUGIN_INIT_SKIP_PLUGIN_TABLE : 0) | (opt_noacl ? PLUGIN_INIT_SKIP_PLUGIN_TABLE : 0) |
(opt_help ? PLUGIN_INIT_SKIP_INITIALIZATION : 0))) (opt_abort ? PLUGIN_INIT_SKIP_INITIALIZATION : 0)))
{ {
sql_print_error("Failed to initialize plugins."); sql_print_error("Failed to initialize plugins.");
unireg_abort(1); unireg_abort(1);
...@@ -4410,7 +4412,7 @@ a file name for --log-bin-index option", opt_binlog_index_name); ...@@ -4410,7 +4412,7 @@ a file name for --log-bin-index option", opt_binlog_index_name);
} }
} }
if (opt_help) if (opt_abort)
unireg_abort(0); unireg_abort(0);
/* if the errmsg.sys is not loaded, terminate to maintain behaviour */ /* if the errmsg.sys is not loaded, terminate to maintain behaviour */
...@@ -4915,7 +4917,7 @@ int mysqld_main(int argc, char **argv) ...@@ -4915,7 +4917,7 @@ int mysqld_main(int argc, char **argv)
We have enough space for fiddling with the argv, continue We have enough space for fiddling with the argv, continue
*/ */
check_data_home(mysql_real_data_home); check_data_home(mysql_real_data_home);
if (my_setwd(mysql_real_data_home, opt_help ? 0 : MYF(MY_WME)) && !opt_help) if (my_setwd(mysql_real_data_home, opt_abort ? 0 : MYF(MY_WME)) && !opt_abort)
unireg_abort(1); /* purecov: inspected */ unireg_abort(1); /* purecov: inspected */
if ((user_info= check_user(mysqld_user))) if ((user_info= check_user(mysqld_user)))
...@@ -6162,8 +6164,6 @@ pthread_handler_t handle_connections_shared_memory(void *arg) ...@@ -6162,8 +6164,6 @@ pthread_handler_t handle_connections_shared_memory(void *arg)
Handle start options Handle start options
******************************************************************************/ ******************************************************************************/
DYNAMIC_ARRAY all_options;
/** /**
System variables are automatically command-line options (few System variables are automatically command-line options (few
exceptions are documented in sys_var.h), so don't need exceptions are documented in sys_var.h), so don't need
...@@ -6175,6 +6175,11 @@ struct my_option my_long_options[]= ...@@ -6175,6 +6175,11 @@ struct my_option my_long_options[]=
{"help", '?', "Display this help and exit.", {"help", '?', "Display this help and exit.",
&opt_help, &opt_help, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, &opt_help, &opt_help, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
#ifdef DBUG_OFF
{"debug", '#', "Built in DBUG debugger. Disabled in this build.",
&current_dbug_option, &current_dbug_option, 0, GET_STR, OPT_ARG,
0, 0, 0, 0, 0, 0},
#endif
#ifdef HAVE_REPLICATION #ifdef HAVE_REPLICATION
{"debug-abort-slave-event-count", 0, {"debug-abort-slave-event-count", 0,
"Option used by mysql-test for debugging and testing of replication.", "Option used by mysql-test for debugging and testing of replication.",
...@@ -7210,7 +7215,6 @@ static void print_help() ...@@ -7210,7 +7215,6 @@ static void print_help()
my_print_variables((my_option*) all_options.buffer); my_print_variables((my_option*) all_options.buffer);
free_root(&mem_root, MYF(0)); free_root(&mem_root, MYF(0));
delete_dynamic(&all_options);
} }
static void usage(void) static void usage(void)
...@@ -7478,8 +7482,8 @@ mysqld_get_one_option(int optid, ...@@ -7478,8 +7482,8 @@ mysqld_get_one_option(int optid,
char *argument) char *argument)
{ {
switch(optid) { switch(optid) {
#ifndef DBUG_OFF
case '#': case '#':
#ifndef DBUG_OFF
if (!argument) if (!argument)
argument= (char*) default_dbug_option; argument= (char*) default_dbug_option;
if (argument[0] == '0' && !argument[1]) if (argument[0] == '0' && !argument[1])
...@@ -7492,8 +7496,10 @@ mysqld_get_one_option(int optid, ...@@ -7492,8 +7496,10 @@ mysqld_get_one_option(int optid,
break; break;
DBUG_SET_INITIAL(argument); DBUG_SET_INITIAL(argument);
opt_endinfo=1; /* unireg: memory allocation */ opt_endinfo=1; /* unireg: memory allocation */
break; #else
sql_print_warning("'%s' is disabled in this build", opt->name);
#endif #endif
break;
case OPT_DEPRECATED_OPTION: case OPT_DEPRECATED_OPTION:
sql_print_warning("'%s' is deprecated. It does nothing and exists only " sql_print_warning("'%s' is deprecated. It does nothing and exists only "
"for compatiblity with old my.cnf files.", "for compatiblity with old my.cnf files.",
...@@ -7536,7 +7542,8 @@ mysqld_get_one_option(int optid, ...@@ -7536,7 +7542,8 @@ mysqld_get_one_option(int optid,
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
case 'V': case 'V':
print_version(); print_version();
exit(0); opt_abort= 1; // Abort after parsing all options
break;
#endif /*EMBEDDED_LIBRARY*/ #endif /*EMBEDDED_LIBRARY*/
case 'W': case 'W':
if (!argument) if (!argument)
...@@ -7879,6 +7886,8 @@ static int get_options(int *argc_ptr, char ***argv_ptr) ...@@ -7879,6 +7886,8 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
if (!opt_help) if (!opt_help)
delete_dynamic(&all_options); delete_dynamic(&all_options);
else
opt_abort= 1;
/* Add back the program name handle_options removes */ /* Add back the program name handle_options removes */
(*argc_ptr)++; (*argc_ptr)++;
...@@ -8281,7 +8290,7 @@ static int test_if_case_insensitive(const char *dir_name) ...@@ -8281,7 +8290,7 @@ static int test_if_case_insensitive(const char *dir_name)
if ((file= mysql_file_create(key_file_casetest, if ((file= mysql_file_create(key_file_casetest,
buff, 0666, O_RDWR, MYF(0))) < 0) buff, 0666, O_RDWR, MYF(0))) < 0)
{ {
if (!opt_help) if (!opt_abort)
sql_print_warning("Can't create test file %s", buff); sql_print_warning("Can't create test file %s", buff);
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
......
...@@ -18,7 +18,6 @@ IF(BOOST_OK) ...@@ -18,7 +18,6 @@ IF(BOOST_OK)
ELSE(MSVC) ELSE(MSVC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
STRING(REPLACE "-fno-rtti" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
ENDIF(MSVC) ENDIF(MSVC)
......
...@@ -1398,12 +1398,12 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s ...@@ -1398,12 +1398,12 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
nd0= nd; nd0= nd;
if (s < end - 1 && c == '.') if (s < end - 1 && c == '.')
{ {
c= *++s; ++s;
if (!nd) if (!nd)
{ {
for (; s < end && c == '0'; c= *++s) for (; s < end && (c= *s) == '0'; ++s)
nz++; nz++;
if (s < end && c > '0' && c <= '9') if (s < end && (c= *s) > '0' && c <= '9')
{ {
s0= s; s0= s;
nf+= nz; nf+= nz;
...@@ -1412,7 +1412,7 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s ...@@ -1412,7 +1412,7 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
} }
goto dig_done; goto dig_done;
} }
for (; s < end && c >= '0' && c <= '9'; c = *++s) for (; s < end && (c= *s) >= '0' && c <= '9'; ++s)
{ {
have_dig: have_dig:
nz++; nz++;
......
...@@ -100,7 +100,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file, ...@@ -100,7 +100,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file,
(long) ctx, cert_file, key_file)); (long) ctx, cert_file, key_file));
if (cert_file) if (cert_file)
{ {
if (SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0) if (SSL_CTX_use_certificate_chain_file(ctx, cert_file) <= 0)
{ {
*error= SSL_INITERR_CERT; *error= SSL_INITERR_CERT;
DBUG_PRINT("error",("%s from file '%s'", sslGetErrString(*error), cert_file)); DBUG_PRINT("error",("%s from file '%s'", sslGetErrString(*error), cert_file));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment