← Back to team overview

maria-developers team mailing list archive

[Branch ~maria-captains/maria/5.1] Rev 2751: Compile by default MySQL clients with libmysqldclient.a (not .so)

 

------------------------------------------------------------
revno: 2751
committer: Michael Widenius <monty@xxxxxxxxxxxx>
branch nick: mysql-maria
timestamp: Thu 2009-10-29 02:04:56 +0200
message:
  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
modified:
  BUILD/SETUP.sh
  scripts/make_binary_distribution.sh
  sql/mysqld.cc
  sql/sql_plugin.cc


--
lp:maria
https://code.launchpad.net/~maria-captains/maria/5.1

Your team Maria developers is subscribed to branch lp:maria.
To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1/+edit-subscription.
=== modified file 'BUILD/SETUP.sh'
--- BUILD/SETUP.sh	2009-10-06 14:53:46 +0000
+++ BUILD/SETUP.sh	2009-10-29 00:04:56 +0000
@@ -146,6 +146,13 @@
   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 --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 @@
     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"

=== modified file 'scripts/make_binary_distribution.sh'
--- scripts/make_binary_distribution.sh	2009-10-23 16:48:54 +0000
+++ scripts/make_binary_distribution.sh	2009-10-29 00:04:56 +0000
@@ -231,6 +231,18 @@
   # ----------------------------------------------------------------------
   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

=== modified file 'sql/mysqld.cc'
--- sql/mysqld.cc	2009-10-26 11:38:17 +0000
+++ sql/mysqld.cc	2009-10-29 00:04:56 +0000
@@ -1889,7 +1889,9 @@
 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 */
 }
 

=== modified file 'sql/sql_plugin.cc'
--- sql/sql_plugin.cc	2009-10-26 11:35:42 +0000
+++ sql/sql_plugin.cc	2009-10-29 00:04:56 +0000
@@ -3226,7 +3226,6 @@
   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 @@
   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 @@
   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;