summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2009-10-29 02:04:56 +0200
committerMichael Widenius <monty@askmonty.org>2009-10-29 02:04:56 +0200
commit664fa25e0e40457f2374f4372fca9a631d039c8c (patch)
tree2cc8d191f21e2d5f3c6677aeaa1bca0809e918ab
parenta5637077fbb06d038a4ce5ea2c4209edbdc7ba9e (diff)
downloadmariadb-git-664fa25e0e40457f2374f4372fca9a631d039c8c.tar.gz
Compile by default MySQL clients with libmysqldclient.a (not .so)
This makes them suitable for tar archices right away and also are easier to copy Don't disable federated storage engine by default. Don't allow one to disable the Maria storage engine if it's used for temp tables BUILD/SETUP.sh: Compile by default MySQL clients with libmysqldclient.a (not .so) This makes them suitable for tar archices right away and also are easier to copy scripts/make_binary_distribution.sh: Abort it clients are compiled with the shared libmysqlclient.so library sql/mysqld.cc: Don't call kill_mysql() if signal handler is not setup (causes a core dump). This is only relevant when starting with --gdb. sql/sql_plugin.cc: Don't disable federated storage engine by default. Don't allow one to disable the Maria storage engine if it's used for temp tables
-rwxr-xr-xBUILD/SETUP.sh17
-rw-r--r--scripts/make_binary_distribution.sh12
-rw-r--r--sql/mysqld.cc4
-rw-r--r--sql/sql_plugin.cc14
4 files changed, 33 insertions, 14 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 418ee799a2c..30148cde360 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -146,6 +146,13 @@ then
debug_cflags="$debug_cflags $debug_extra_cflags"
fi
+static_link="--with-mysqld-ldflags=-all-static "
+static_link="$static_link --with-client-ldflags=-all-static"
+# we need local-infile in all binaries for rpl000001
+# if you need to disable local-infile in the client, write a build script
+# and unset local_infile_configs
+local_infile_configs="--enable-local-infile"
+
#
# Configuration options.
#
@@ -154,6 +161,8 @@ base_configs="$base_configs --with-extra-charsets=complex "
base_configs="$base_configs --enable-thread-safe-client "
base_configs="$base_configs --with-big-tables"
base_configs="$base_configs --with-plugin-maria --with-maria-tmp-tables --without-plugin-innodb_plugin"
+# Compile our client programs with static libraries to allow them to be moved
+base_configs="$base_configs --with-mysqld-ldflags=-static --with-client-ldflags=-static"
if test -d "$path/../cmd-line-utils/readline"
then
@@ -163,14 +172,6 @@ then
base_configs="$base_configs --with-libedit"
fi
-static_link="--with-mysqld-ldflags=-all-static "
-static_link="$static_link --with-client-ldflags=-all-static"
-# we need local-infile in all binaries for rpl000001
-# if you need to disable local-infile in the client, write a build script
-# and unset local_infile_configs
-local_infile_configs="--enable-local-infile"
-
-
max_no_embedded_configs="$SSL_LIBRARY --with-plugins=max"
max_no_qc_configs="$SSL_LIBRARY --with-plugins=max --without-query-cache"
max_no_ndb_configs="$SSL_LIBRARY --with-plugins=max-no-ndb --with-embedded-server --with-libevent"
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 9595a56ef62..3e156dd668d 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -231,6 +231,18 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; then
# ----------------------------------------------------------------------
set -e
+ #
+ # Check that the client is compiled with libmysqlclient.a
+ #
+ if test -f ./client/.libs/mysql
+ then
+ echo ""
+ echo "The MySQL clients are compiled dynamicly, which is not allowed for"
+ echo "a MySQL binary tar file. Please configure with"
+ echo "--with-client-ldflags=-all-static and try again"
+ exit 1;
+ fi
+
# ----------------------------------------------------------------------
# Really ugly, one script, "mysql_install_db", needs prefix set to ".",
# i.e. makes access relative the current directory. This matches
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 6a7209cd611..497a39b95f8 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1889,7 +1889,9 @@ void close_connection(THD *thd, uint errcode, bool lock)
extern "C" sig_handler end_mysqld_signal(int sig __attribute__((unused)))
{
DBUG_ENTER("end_mysqld_signal");
- kill_mysql(); // Take down mysqld nicely
+ /* Don't call kill_mysql() if signal thread is not running */
+ if (signal_thread_in_use)
+ kill_mysql(); // Take down mysqld nicely
DBUG_VOID_RETURN; /* purecov: deadcode */
}
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index ab7d0a35bc1..a5e65d11304 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -3226,7 +3226,6 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
my_bool can_disable;
bool disable_plugin;
enum_plugin_load_policy plugin_load_policy= PLUGIN_ON;
-
MEM_ROOT *mem_root= alloc_root_inited(&tmp->mem_root) ?
&tmp->mem_root : &plugin_mem_root;
st_mysql_sys_var **opt;
@@ -3240,13 +3239,13 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
DBUG_ENTER("test_plugin_options");
DBUG_ASSERT(tmp->plugin && tmp->name.str);
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
/*
- The 'federated' and 'ndbcluster' storage engines are always disabled by
- default.
+ The 'ndbcluster' storage engines is always disabled by default.
*/
- if (!(my_strcasecmp(&my_charset_latin1, tmp->name.str, "federated") &&
- my_strcasecmp(&my_charset_latin1, tmp->name.str, "ndbcluster")))
+ if (!my_strcasecmp(&my_charset_latin1, tmp->name.str, "ndbcluster"))
plugin_load_policy= PLUGIN_OFF;
+#endif
for (opt= tmp->plugin->system_vars; opt && *opt; opt++)
count+= 2; /* --{plugin}-{optname} and --plugin-{plugin}-{optname} */
@@ -3295,6 +3294,11 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
can_disable=
my_strcasecmp(&my_charset_latin1, tmp->name.str, "MyISAM") &&
my_strcasecmp(&my_charset_latin1, tmp->name.str, "MEMORY");
+#ifdef USE_MARIA_FOR_TMP_TABLES
+ if (!can_disable)
+ can_disable= (my_strcasecmp(&my_charset_latin1, tmp->name.str, "Maria")
+ != 0);
+#endif
tmp->is_mandatory= (plugin_load_policy == PLUGIN_FORCE) || !can_disable;