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
plugin/handler_socket/perl-Net-HandlerSocket/pm_to_blib
plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.bs
plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL
libmysqld/libmysqld_exports_file.cc
......@@ -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:
return SSL_SUCCESS;
// For the moment, treat like use_certificate_file
return read_file(ctx, file, SSL_FILETYPE_PEM, Cert);
}
......
......@@ -150,7 +150,7 @@ our $default_vardir;
our $opt_usage;
our $opt_list_options;
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_verbose= 0; # Verbose output, enable with --verbose
......
......@@ -2726,9 +2726,9 @@ sub setup_vardir() {
<../plugin/*/.libs/*.so>,
<../plugin/*/*/.libs/*.so>,
<../sql/.libs/*.so>,
<../storage/*/*.so>,
<../plugin/*/*.so>,
<../sql/*.so>)
<$bindir/storage/*/*.so>,
<$bindir/plugin/*/*.so>,
<$bindir/sql/*.so>)
{
my $pname=basename($_);
symlink rel2abs($_), "$plugindir/$pname";
......
#!/bin/sh
d="$MYSQLTEST_VARDIR/tmp/long_temporary_directory_path_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789"
test -d "$d" || mkdir "$d"
rm -f "$d"/*
#!/bin/sh
# This test requires a non-lowercase tmpdir directory on a case-sensitive
# filesystem.
......
......@@ -199,6 +199,9 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
#endif
}
if (!(infoflag & MY_DONT_FREE_DBUG))
DBUG_END(); /* Must be done as late as possible */
my_thread_end();
my_thread_global_end();
my_mutex_end();
......@@ -216,9 +219,6 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
WSACleanup();
#endif /* __WIN__ */
if (!(infoflag & MY_DONT_FREE_DBUG))
DBUG_END(); /* Must be done as late as possible */
my_init_done=0;
} /* my_end */
......
#!/usr/bin/perl
####
#### Hello ... this is a heavily hacked script by Luuk
#### instead of printing the result it makes a nice gif
......
......@@ -357,11 +357,12 @@ static I_List<THD> thread_cache;
static bool binlog_format_used= false;
LEX_STRING opt_init_connect, opt_init_slave;
static mysql_cond_t COND_thread_cache, COND_flush_thread_cache;
static DYNAMIC_ARRAY all_options;
/* Global variables */
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;
my_bool opt_userstat_running;
my_bool opt_log_queries_not_using_indexes= 0;
......@@ -1178,8 +1179,9 @@ bool mysqld_embedded=1;
static my_bool plugins_are_initialized= FALSE;
#ifndef DBUG_OFF
static const char* default_dbug_option, *current_dbug_option;
static const char* default_dbug_option;
#endif
static const char *current_dbug_option;
#ifdef HAVE_LIBWRAP
const char *libwrapName= NULL;
int allow_severity = LOG_INFO;
......@@ -1710,7 +1712,7 @@ extern "C" void unireg_abort(int exit_code)
usage();
if (exit_code)
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"));
mysqld_exit(exit_code);
}
......@@ -1726,9 +1728,8 @@ static void mysqld_exit(int exit_code)
mysql_audit_finalize();
clean_up_mutexes();
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
DBUG_END(); // but this - even later
exit(exit_code); /* purecov: inspected */
}
......@@ -1803,6 +1804,7 @@ void clean_up(bool print_message)
free_global_client_stats();
free_global_table_stats();
free_global_index_stats();
delete_dynamic(&all_options);
#ifdef HAVE_REPLICATION
end_slave_list();
#endif
......@@ -3646,7 +3648,7 @@ static int init_common_variables()
set_server_version();
#ifndef EMBEDDED_LIBRARY
if (opt_help && !opt_verbose)
if (opt_abort && !opt_verbose)
unireg_abort(0);
#endif /*!EMBEDDED_LIBRARY*/
......@@ -4207,7 +4209,7 @@ static int init_server_components()
help information. Since the implementation of plugin server
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])
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);
if (plugin_init(&remaining_argc, remaining_argv,
(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.");
unireg_abort(1);
......@@ -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);
/* if the errmsg.sys is not loaded, terminate to maintain behaviour */
......@@ -4915,7 +4917,7 @@ int mysqld_main(int argc, char **argv)
We have enough space for fiddling with the argv, continue
*/
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 */
if ((user_info= check_user(mysqld_user)))
......@@ -6162,8 +6164,6 @@ pthread_handler_t handle_connections_shared_memory(void *arg)
Handle start options
******************************************************************************/
DYNAMIC_ARRAY all_options;
/**
System variables are automatically command-line options (few
exceptions are documented in sys_var.h), so don't need
......@@ -6175,6 +6175,11 @@ struct my_option my_long_options[]=
{"help", '?', "Display this help and exit.",
&opt_help, &opt_help, 0, GET_BOOL, NO_ARG, 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
{"debug-abort-slave-event-count", 0,
"Option used by mysql-test for debugging and testing of replication.",
......@@ -7210,7 +7215,6 @@ static void print_help()
my_print_variables((my_option*) all_options.buffer);
free_root(&mem_root, MYF(0));
delete_dynamic(&all_options);
}
static void usage(void)
......@@ -7478,8 +7482,8 @@ mysqld_get_one_option(int optid,
char *argument)
{
switch(optid) {
#ifndef DBUG_OFF
case '#':
#ifndef DBUG_OFF
if (!argument)
argument= (char*) default_dbug_option;
if (argument[0] == '0' && !argument[1])
......@@ -7492,8 +7496,10 @@ mysqld_get_one_option(int optid,
break;
DBUG_SET_INITIAL(argument);
opt_endinfo=1; /* unireg: memory allocation */
break;
#else
sql_print_warning("'%s' is disabled in this build", opt->name);
#endif
break;
case OPT_DEPRECATED_OPTION:
sql_print_warning("'%s' is deprecated. It does nothing and exists only "
"for compatiblity with old my.cnf files.",
......@@ -7536,7 +7542,8 @@ mysqld_get_one_option(int optid,
#ifndef EMBEDDED_LIBRARY
case 'V':
print_version();
exit(0);
opt_abort= 1; // Abort after parsing all options
break;
#endif /*EMBEDDED_LIBRARY*/
case 'W':
if (!argument)
......@@ -7879,6 +7886,8 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
if (!opt_help)
delete_dynamic(&all_options);
else
opt_abort= 1;
/* Add back the program name handle_options removes */
(*argc_ptr)++;
......@@ -8281,7 +8290,7 @@ static int test_if_case_insensitive(const char *dir_name)
if ((file= mysql_file_create(key_file_casetest,
buff, 0666, O_RDWR, MYF(0))) < 0)
{
if (!opt_help)
if (!opt_abort)
sql_print_warning("Can't create test file %s", buff);
DBUG_RETURN(-1);
}
......
......@@ -18,7 +18,6 @@ IF(BOOST_OK)
ELSE(MSVC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
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})
ENDIF(MSVC)
......
......@@ -1398,12 +1398,12 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
nd0= nd;
if (s < end - 1 && c == '.')
{
c= *++s;
++s;
if (!nd)
{
for (; s < end && c == '0'; c= *++s)
for (; s < end && (c= *s) == '0'; ++s)
nz++;
if (s < end && c > '0' && c <= '9')
if (s < end && (c= *s) > '0' && c <= '9')
{
s0= s;
nf+= nz;
......@@ -1412,7 +1412,7 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
}
goto dig_done;
}
for (; s < end && c >= '0' && c <= '9'; c = *++s)
for (; s < end && (c= *s) >= '0' && c <= '9'; ++s)
{
have_dig:
nz++;
......
......@@ -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));
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;
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