List:Commits« Previous MessageNext Message »
From:antony Date:May 31 2007 1:00am
Subject:bk commit into 5.1 tree (antony:1.2516) BUG#25800
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of antony. When antony does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-05-30 16:00:09-07:00, antony@stripped +4 -0
  Bug#25800
    "Embedded server requires mysql.plugin"
    Allow developers to choose at configure time the specific behaviour
    that they require:
      --with-embedded-load-plugin-table
    Must be specified for the embedded build to load plugins upon
    initialization from the mysql.plugin table, same as daemon build.

  config/ac-macros/embedded.m4@stripped, 2007-05-30 16:00:04-07:00, antony@stripped +60 -0
    New BitKeeper file ``config/ac-macros/embedded.m4''

  config/ac-macros/embedded.m4@stripped, 2007-05-30 16:00:04-07:00, antony@stripped +0 -0

  configure.in@stripped, 2007-05-30 16:00:04-07:00, antony@stripped +2 -34
    Bug25800
      Move libmysqld embedded options out in to seperate config file

  sql/mysqld.cc@stripped, 2007-05-30 16:00:04-07:00, antony@stripped +4 -0
    Bug25800
      Depending upon configure options, embedded builds may (or may not)
      demand to inspect the mysql.plugin table.

  sql/sql_plugin.cc@stripped, 2007-05-30 16:00:04-07:00, antony@stripped +6 -0
    Bug25800
      Surround some declarations with compiler conditionals if the 
      underlying support does not exist:
      mysqld cannot load plugins unaided without HAVE_DLOPEN

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	antony
# Host:	ppcg5.local
# Root:	/Users/antony/Work/p2-bug25800.4

--- 1.467/configure.in	2007-05-30 16:00:19 -07:00
+++ 1.468/configure.in	2007-05-30 16:00:19 -07:00
@@ -45,6 +45,7 @@ sinclude(config/ac-macros/misc.m4)
 sinclude(config/ac-macros/readline.m4)
 sinclude(config/ac-macros/ssl.m4)
 sinclude(config/ac-macros/zlib.m4)
+sinclude(config/ac-macros/embedded.m4)
 
 # Remember to add a directory sql/share/LANGUAGE
 AVAILABLE_LANGUAGES="\
@@ -2232,11 +2233,7 @@ AC_ARG_WITH(server,
     [with_server=yes]
 )
 
-AC_ARG_WITH(embedded-server,
-    [  --with-embedded-server  Build the embedded server (libmysqld).],
-    [with_embedded_server=$withval],
-    [with_embedded_server=no]
-)
+MYSQL_CONFIGURE_EMBEDDED
 
 AC_ARG_WITH(query_cache,
     [  --without-query-cache   Do not build query cache.],
@@ -2261,20 +2258,6 @@ then
   AC_DEFINE([HAVE_RTREE_KEYS], [1], [RTree keys])
 fi
 
-AC_ARG_WITH(embedded_privilege_control,
-    [  --with-embedded-privilege-control
-                          Build parts to check user's privileges.
-			  Only affects embedded library.],
-    [with_embedded_privilege_control=$withval],
-    [with_embedded_privilege_control=no]
-)
-
-if test "$with_embedded_privilege_control" = "yes"
-then
-  AC_DEFINE([HAVE_EMBEDDED_PRIVILEGE_CONTROL], [1],
-            [Access checks in embedded library])
-fi
-
 tools_dirs=""
 
 AC_ARG_WITH([mysqlmanager],
@@ -2290,21 +2273,6 @@ fi
 AC_SUBST(tools_dirs)
 
 #MYSQL_CHECK_CPU
-
-libmysqld_dirs=
-if test "$with_embedded_server" = "yes"
-then
-  libmysqld_dirs=libmysqld
-
-  AC_CONFIG_FILES(libmysqld/Makefile libmysqld/examples/Makefile)
-  # We can't build embedded library without building the server, because
-  # we depend on libmysys, libmystrings, libmyisam, etc.
-  with_server=yes
-fi
-# XXX: We need to add @libmysqld_extra_libs@ (or whatever) so that
-# mysql_config --libmysqld-libs will print out something like
-# -L/path/to/lib/mysql -lmysqld -lmyisam -lmysys -lmystrings -ldbug ...
-AC_SUBST([libmysqld_dirs])
 
 # Shall we build the docs?
 AC_ARG_WITH(docs,

--- 1.645/sql/mysqld.cc	2007-05-30 16:00:19 -07:00
+++ 1.646/sql/mysqld.cc	2007-05-30 16:00:19 -07:00
@@ -3350,7 +3350,11 @@ server.");
   }
 
   if (plugin_init(&defaults_argc, defaults_argv,
+#if defined(EMBEDDED_LIBRARY) && !defined(HAVE_EMBEDDED_LOAD_PLUGIN)
+                  PLUGIN_INIT_SKIP_PLUGIN_TABLE |
+#else
                   (opt_noacl ? PLUGIN_INIT_SKIP_PLUGIN_TABLE : 0) |
+#endif
                   (opt_help ? PLUGIN_INIT_SKIP_INITIALIZATION : 0)))
   {
     sql_print_error("Failed to initialize plugins.");
--- New file ---
+++ config/ac-macros/embedded.m4	07/05/30 16:00:04
dnl Define macros for embedded mysqld build

AC_DEFUN([MYSQL_CONFIGURE_EMBEDDED], [

AC_ARG_WITH(embedded-server,
    [  --with-embedded-server  Build the embedded server (libmysqld).],
    [with_embedded_server=$withval],
    [with_embedded_server=no]
)

AC_ARG_WITH(embedded_privilege_control,
    [  --with-embedded-privilege-control
                          Build parts to check user's privileges.
			  Only affects embedded library.],
    [with_embedded_privilege_control=$withval],
    [with_embedded_privilege_control=no]
)

AC_ARG_WITH(embedded_loads_plugin_table,
    [  --with-embedded-loads-plugin-table
			  Build parts to enable loading system plugin table.
			  Only affects embedded library.],
    [with_embedded_loads_plugin_table=$withval],
    [with_embedded_loads_plugin_table=no]
)


dnl ------------------------------------------------------------------------


if test "$with_embedded_privilege_control" = "yes"
then
  AC_DEFINE([HAVE_EMBEDDED_PRIVILEGE_CONTROL], [1],
            [Access checks in embedded library])
fi

if test "$with_embedded_loads_plugin_table" = "yes"
then
  AC_DEFINE([HAVE_EMBEDDED_LOAD_PLUGIN], [1],
            [Reads mysql.plugin table in embedded library])
fi

libmysqld_dirs=
if test "$with_embedded_server" = "yes"
then
  libmysqld_dirs=libmysqld

  AC_CONFIG_FILES(libmysqld/Makefile libmysqld/examples/Makefile)
  # We can't build embedded library without building the server, because
  # we depend on libmysys, libmystrings, libmyisam, etc.
  with_server=yes
fi
# XXX: We need to add @libmysqld_extra_libs@ (or whatever) so that
# mysql_config --libmysqld-libs will print out something like
# -L/path/to/lib/mysql -lmysqld -lmyisam -lmysys -lmystrings -ldbug ...
AC_SUBST([libmysqld_dirs])

])

dnl ------------------------------------------------------------------------


--- 1.65/sql/sql_plugin.cc	2007-05-30 16:00:19 -07:00
+++ 1.66/sql/sql_plugin.cc	2007-05-30 16:00:19 -07:00
@@ -187,9 +187,11 @@ public:
 
 
 /* prototypes */
+#ifdef HAVE_DLOPEN
 static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv);
 static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv,
                              const char *list);
+#endif /* HAVE_DLOPEN */
 static int test_plugin_options(MEM_ROOT *, struct st_plugin_int *,
                                int *, char **, my_bool);
 static bool register_builtin(struct st_mysql_plugin *, struct st_plugin_int *,
@@ -1169,6 +1171,7 @@ int plugin_init(int *argc, char **argv, 
 
   pthread_mutex_unlock(&LOCK_plugin);
 
+#ifdef HAVE_DLOPEN
   /* Register all dynamic plugins */
   if (!(flags & PLUGIN_INIT_SKIP_DYNAMIC_LOADING))
   {
@@ -1178,6 +1181,7 @@ int plugin_init(int *argc, char **argv, 
     if (!(flags & PLUGIN_INIT_SKIP_PLUGIN_TABLE))
       plugin_load(&tmp_root, argc, argv);
   }
+#endif /* HAVE_DLOPEN */
 
   if (flags & PLUGIN_INIT_SKIP_INITIALIZATION)
     goto end;
@@ -1296,6 +1300,7 @@ end:
 #endif /* NOT_USED_YET */
 
 
+#ifdef HAVE_DLOPEN
 /*
   called only by plugin_init()
 */
@@ -1439,6 +1444,7 @@ error:
                   name.str, dl.str);
   DBUG_RETURN(TRUE);
 }
+#endif /* HAVE_DLOPEN */
 
 
 void plugin_shutdown(void)
Thread
bk commit into 5.1 tree (antony:1.2516) BUG#25800antony31 May