summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzrignore1
-rw-r--r--extra/yassl/src/ssl.cpp6
-rwxr-xr-xmysql-test/lib/v1/mysql-test-run.pl2
-rwxr-xr-xmysql-test/mysql-test-run.pl6
-rw-r--r--mysql-test/t/long_tmpdir-master.sh1
-rw-r--r--mysql-test/t/lowercase_mixed_tmpdir-master.sh1
-rw-r--r--mysys/my_init.c6
-rw-r--r--sql-bench/graph-compare-results.sh1
-rw-r--r--sql/mysqld.cc43
-rw-r--r--storage/oqgraph/CMakeLists.txt1
-rw-r--r--strings/dtoa.c8
-rw-r--r--vio/viosslfactories.c2
12 files changed, 45 insertions, 33 deletions
diff --git a/.bzrignore b/.bzrignore
index a2947f9afe3..4dca2e49338 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -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
diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp
index 67d2d428e51..05c260e80ca 100644
--- a/extra/yassl/src/ssl.cpp
+++ b/extra/yassl/src/ssl.cpp
@@ -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);
}
diff --git a/mysql-test/lib/v1/mysql-test-run.pl b/mysql-test/lib/v1/mysql-test-run.pl
index 61ec3476ed7..f20eab80ae9 100755
--- a/mysql-test/lib/v1/mysql-test-run.pl
+++ b/mysql-test/lib/v1/mysql-test-run.pl
@@ -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
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index d04084295cf..f180f1a70cf 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -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";
diff --git a/mysql-test/t/long_tmpdir-master.sh b/mysql-test/t/long_tmpdir-master.sh
index 318955fbcca..7bcbee26105 100644
--- a/mysql-test/t/long_tmpdir-master.sh
+++ b/mysql-test/t/long_tmpdir-master.sh
@@ -1,3 +1,4 @@
+#!/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"/*
diff --git a/mysql-test/t/lowercase_mixed_tmpdir-master.sh b/mysql-test/t/lowercase_mixed_tmpdir-master.sh
index 95c26e3aa02..9330d0581ee 100644
--- a/mysql-test/t/lowercase_mixed_tmpdir-master.sh
+++ b/mysql-test/t/lowercase_mixed_tmpdir-master.sh
@@ -1,3 +1,4 @@
+#!/bin/sh
# This test requires a non-lowercase tmpdir directory on a case-sensitive
# filesystem.
diff --git a/mysys/my_init.c b/mysys/my_init.c
index 9e437162633..6a56396bd5a 100644
--- a/mysys/my_init.c
+++ b/mysys/my_init.c
@@ -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 */
diff --git a/sql-bench/graph-compare-results.sh b/sql-bench/graph-compare-results.sh
index 317ef583886..ddc9080acd6 100644
--- a/sql-bench/graph-compare-results.sh
+++ b/sql-bench/graph-compare-results.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/perl
####
#### Hello ... this is a heavily hacked script by Luuk
#### instead of printing the result it makes a nice gif
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index ccaeeacfddc..cc32411e567 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -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 @@ error:
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);
}
diff --git a/storage/oqgraph/CMakeLists.txt b/storage/oqgraph/CMakeLists.txt
index 35a105f4baa..91704d75750 100644
--- a/storage/oqgraph/CMakeLists.txt
+++ b/storage/oqgraph/CMakeLists.txt
@@ -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)
diff --git a/strings/dtoa.c b/strings/dtoa.c
index e6339bab1d9..a6912859c7f 100644
--- a/strings/dtoa.c
+++ b/strings/dtoa.c
@@ -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++;
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index d71021452d1..7c9269de853 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -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));