Commit 664fa25e authored by Michael Widenius's avatar Michael Widenius

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
parent a5637077
...@@ -146,6 +146,13 @@ then ...@@ -146,6 +146,13 @@ then
debug_cflags="$debug_cflags $debug_extra_cflags" debug_cflags="$debug_cflags $debug_extra_cflags"
fi 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. # Configuration options.
# #
...@@ -154,6 +161,8 @@ base_configs="$base_configs --with-extra-charsets=complex " ...@@ -154,6 +161,8 @@ base_configs="$base_configs --with-extra-charsets=complex "
base_configs="$base_configs --enable-thread-safe-client " base_configs="$base_configs --enable-thread-safe-client "
base_configs="$base_configs --with-big-tables" base_configs="$base_configs --with-big-tables"
base_configs="$base_configs --with-plugin-maria --with-maria-tmp-tables --without-plugin-innodb_plugin" 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" if test -d "$path/../cmd-line-utils/readline"
then then
...@@ -163,14 +172,6 @@ then ...@@ -163,14 +172,6 @@ then
base_configs="$base_configs --with-libedit" base_configs="$base_configs --with-libedit"
fi 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_embedded_configs="$SSL_LIBRARY --with-plugins=max"
max_no_qc_configs="$SSL_LIBRARY --with-plugins=max --without-query-cache" 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" max_no_ndb_configs="$SSL_LIBRARY --with-plugins=max-no-ndb --with-embedded-server --with-libevent"
......
...@@ -231,6 +231,18 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; then ...@@ -231,6 +231,18 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; then
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
set -e 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 ".", # Really ugly, one script, "mysql_install_db", needs prefix set to ".",
# i.e. makes access relative the current directory. This matches # i.e. makes access relative the current directory. This matches
......
...@@ -1889,6 +1889,8 @@ void close_connection(THD *thd, uint errcode, bool lock) ...@@ -1889,6 +1889,8 @@ void close_connection(THD *thd, uint errcode, bool lock)
extern "C" sig_handler end_mysqld_signal(int sig __attribute__((unused))) extern "C" sig_handler end_mysqld_signal(int sig __attribute__((unused)))
{ {
DBUG_ENTER("end_mysqld_signal"); DBUG_ENTER("end_mysqld_signal");
/* Don't call kill_mysql() if signal thread is not running */
if (signal_thread_in_use)
kill_mysql(); // Take down mysqld nicely kill_mysql(); // Take down mysqld nicely
DBUG_VOID_RETURN; /* purecov: deadcode */ DBUG_VOID_RETURN; /* purecov: deadcode */
} }
......
...@@ -3226,7 +3226,6 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, ...@@ -3226,7 +3226,6 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
my_bool can_disable; my_bool can_disable;
bool disable_plugin; bool disable_plugin;
enum_plugin_load_policy plugin_load_policy= PLUGIN_ON; enum_plugin_load_policy plugin_load_policy= PLUGIN_ON;
MEM_ROOT *mem_root= alloc_root_inited(&tmp->mem_root) ? MEM_ROOT *mem_root= alloc_root_inited(&tmp->mem_root) ?
&tmp->mem_root : &plugin_mem_root; &tmp->mem_root : &plugin_mem_root;
st_mysql_sys_var **opt; st_mysql_sys_var **opt;
...@@ -3240,13 +3239,13 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, ...@@ -3240,13 +3239,13 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
DBUG_ENTER("test_plugin_options"); DBUG_ENTER("test_plugin_options");
DBUG_ASSERT(tmp->plugin && tmp->name.str); DBUG_ASSERT(tmp->plugin && tmp->name.str);
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
/* /*
The 'federated' and 'ndbcluster' storage engines are always disabled by The 'ndbcluster' storage engines is always disabled by default.
default.
*/ */
if (!(my_strcasecmp(&my_charset_latin1, tmp->name.str, "federated") && if (!my_strcasecmp(&my_charset_latin1, tmp->name.str, "ndbcluster"))
my_strcasecmp(&my_charset_latin1, tmp->name.str, "ndbcluster")))
plugin_load_policy= PLUGIN_OFF; plugin_load_policy= PLUGIN_OFF;
#endif
for (opt= tmp->plugin->system_vars; opt && *opt; opt++) for (opt= tmp->plugin->system_vars; opt && *opt; opt++)
count+= 2; /* --{plugin}-{optname} and --plugin-{plugin}-{optname} */ 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, ...@@ -3295,6 +3294,11 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
can_disable= can_disable=
my_strcasecmp(&my_charset_latin1, tmp->name.str, "MyISAM") && my_strcasecmp(&my_charset_latin1, tmp->name.str, "MyISAM") &&
my_strcasecmp(&my_charset_latin1, tmp->name.str, "MEMORY"); 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; tmp->is_mandatory= (plugin_load_policy == PLUGIN_FORCE) || !can_disable;
......
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