List:Commits« Previous MessageNext Message »
From:holyfoot Date:October 17 2006 7:32pm
Subject:bk commit into 5.1 tree (holyfoot:1.2312) BUG#23369
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf 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, 2006-10-17 22:32:18+05:00, holyfoot@stripped +9 -0
  bug #23369 (Embedded library can't be linked)
  Problem is that some files moved to storage/*/ still keep
  dependencies to sql/ code (usually they uses THD structure)
  what can be compiled with different defines.
  So now we have to recompile that code for the embedded library.

  config/ac-macros/plugins.m4@stripped, 2006-10-17 22:32:10+05:00, holyfoot@stripped +37 -6
    macroses added to check if the handler has sql/ - dependent code

  libmysqld/Makefile.am@stripped, 2006-10-17 22:32:10+05:00, holyfoot@stripped +12 -1
    here we symlink necessary files to be recompiled

  storage/archive/plug.in@stripped, 2006-10-17 22:32:10+05:00, holyfoot@stripped +1 -0
    ha_archive.cc depends on THD

  storage/csv/plug.in@stripped, 2006-10-17 22:32:10+05:00, holyfoot@stripped +1 -0
    ha_tina.cc uses THD structure

  storage/federated/plug.in@stripped, 2006-10-17 22:32:10+05:00, holyfoot@stripped +1 -0
    ha_federated.cc uses THD structure

  storage/heap/plug.in@stripped, 2006-10-17 22:32:10+05:00, holyfoot@stripped +1 -0
    ha_heap.cc uses THD structure

  storage/innobase/plug.in@stripped, 2006-10-17 22:32:10+05:00, holyfoot@stripped +1 -0
    ha_innodb.cc uses THD structure

  storage/myisam/plug.in@stripped, 2006-10-17 22:32:11+05:00, holyfoot@stripped +1 -0
    ha_myisam.cc uses THD structure

  storage/myisammrg/plug.in@stripped, 2006-10-17 22:32:11+05:00, holyfoot@stripped +1 -0
    ha_myisammrg.cc uses THD structure

# 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:	holyfoot
# Host:	deer.(none)
# Root:	/home/hf/work/mysql-5.1.eml

--- 1.17/config/ac-macros/plugins.m4	2006-10-17 22:32:38 +05:00
+++ 1.18/config/ac-macros/plugins.m4	2006-10-17 22:32:38 +05:00
@@ -254,6 +254,28 @@ AC_DEFUN([MYSQL_PLUGIN_ACTIONS],[
 ])
 
 dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS
+dnl
+dnl SYNOPSIS
+dnl   MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS([name],[file name])
+dnl
+dnl DESCRIPTION
+dnl   Some modules in plugins keep dependance on structures
+dnl   declared in sql/ (THD class usually)
+dnl   That has to be fixed in the future, but until then
+dnl   we have to recompile these modules when we want to
+dnl   to compile server parts with the different #defines
+dnl   Normally it happens when we compile the embedded server
+dnl   Thus one should mark such files in his handler using this macro
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS],[
+ MYSQL_REQUIRE_PLUGIN([$1])
+ m4_define([MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS_]AS_TR_CPP([$1]), [$2])
+])
+
+dnl ---------------------------------------------------------------------------
 dnl Macro: MYSQL_CONFIGURE_PLUGINS
 dnl
 dnl SYNOPSIS
@@ -282,6 +304,8 @@ AC_DEFUN([MYSQL_CONFIGURE_PLUGINS],[
     AC_SUBST([mysql_pg_dirs])
     AC_SUBST([mysql_se_unittest_dirs])
     AC_SUBST([mysql_pg_unittest_dirs])
+    AC_SUBST([condition_dependent_plugin_modules])
+    AC_SUBST([condition_dependent_plugin_links])
    ])
  ])
 ])
@@ -307,6 +331,7 @@ AC_DEFUN([_MYSQL_EMIT_CHECK_PLUGIN],[
   [MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
   [MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
   [MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
+  [MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS_]AS_TR_CPP([$1]),
   [MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
  )
 ])
@@ -317,12 +342,12 @@ AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
  ])
  AC_MSG_CHECKING([whether to use ]$3)
  mysql_use_plugin_dir=""
- m4_ifdef([$10],[
-  if test "X[$mysql_plugin_]$2" = Xyes -a \
-          "X[$with_plugin_]$2" != Xno -o \
-          "X[$with_plugin_]$2" = Xyes; then
-    AC_MSG_RESULT([error])
-    AC_MSG_ERROR([disabled])
+ m4_ifdef([$12],[
+  if test "x[$mysql_plugin_]$2" = xyes -a \
+          "x[$with_plugin_]$2" != xno -o \
+          "x[$with_plugin_]$2" = xyes; then
+    ac_msg_result([error])
+    ac_msg_error([disabled])
   fi
   AC_MSG_RESULT([no])
  ],[
@@ -332,6 +357,12 @@ AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
      AC_MSG_ERROR([cannot disable mandatory plugin])
    fi
    [mysql_plugin_]$2=yes
+  ])
+  m4_ifdef([$11],[
+   if test "X[$mysql_plugin_]$2" = Xyes; then
+     condition_dependent_plugin_modules="$condition_dependent_plugin_modules
m4_bregexp($11, [[^/]+$], [\&])"
+     condition_dependent_plugin_links="$condition_dependent_plugin_links $6/$11"
+   fi
   ])
   if test "X[$with_plugin_]$2" = Xno; then
     AC_MSG_RESULT([no])

--- 1.1/storage/csv/plug.in	2006-10-17 22:32:38 +05:00
+++ 1.2/storage/csv/plug.in	2006-10-17 22:32:38 +05:00
@@ -3,3 +3,4 @@ MYSQL_STORAGE_ENGINE(csv,,      [CSV Sto
 MYSQL_PLUGIN_DIRECTORY(csv,     [storage/csv])
 MYSQL_PLUGIN_STATIC(csv,        [libcsv.a])
 MYSQL_PLUGIN_MANDATORY(csv)     dnl Used for logging
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(csv, [ha_tina.cc])

--- 1.1/storage/federated/plug.in	2006-10-17 22:32:38 +05:00
+++ 1.2/storage/federated/plug.in	2006-10-17 22:32:38 +05:00
@@ -2,3 +2,4 @@ MYSQL_STORAGE_ENGINE(federated,,[Federat
         [Connects to tables on remote MySQL servers], [max,max-no-ndb])
 MYSQL_PLUGIN_STATIC(federated,    [libfederated.a])
 MYSQL_PLUGIN_DYNAMIC(federated,   [ha_federated.la])
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(federated, [ha_federated.cc])

--- 1.1/storage/heap/plug.in	2006-10-17 22:32:38 +05:00
+++ 1.2/storage/heap/plug.in	2006-10-17 22:32:38 +05:00
@@ -3,4 +3,5 @@ MYSQL_STORAGE_ENGINE(heap,no,   [Memory 
 MYSQL_PLUGIN_DIRECTORY(heap,    [storage/heap])
 MYSQL_PLUGIN_STATIC(heap,       [libheap.a])
 MYSQL_PLUGIN_MANDATORY(heap)    dnl Memory tables
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(heap, [ha_heap.cc])
 

--- 1.3/storage/innobase/plug.in	2006-10-17 22:32:38 +05:00
+++ 1.4/storage/innobase/plug.in	2006-10-17 22:32:38 +05:00
@@ -68,4 +68,5 @@ MYSQL_PLUGIN_ACTIONS(innobase,  [
       storage/innobase/handler/Makefile
       storage/innobase/usr/Makefile)
   ])
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(innobase, [handler/ha_innodb.cc])
 

--- 1.1/storage/myisam/plug.in	2006-10-17 22:32:38 +05:00
+++ 1.2/storage/myisam/plug.in	2006-10-17 22:32:38 +05:00
@@ -3,4 +3,5 @@ MYSQL_STORAGE_ENGINE(myisam,no, [MyISAM 
 MYSQL_PLUGIN_DIRECTORY(myisam,  [storage/myisam])
 MYSQL_PLUGIN_STATIC(myisam,     [libmyisam.a])
 MYSQL_PLUGIN_MANDATORY(myisam)  dnl Default
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(myisam, [ha_myisam.cc])
 

--- 1.1/storage/myisammrg/plug.in	2006-10-17 22:32:38 +05:00
+++ 1.2/storage/myisammrg/plug.in	2006-10-17 22:32:38 +05:00
@@ -3,3 +3,4 @@ MYSQL_STORAGE_ENGINE(myisammrg,no,[MyISA
 MYSQL_PLUGIN_DIRECTORY(myisammrg,[storage/myisammrg])
 MYSQL_PLUGIN_STATIC(myisammrg,  [libmyisammrg.a])
 MYSQL_PLUGIN_MANDATORY(myisammrg)
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(myisammrg, [ha_myisammrg.cc])

--- 1.98/libmysqld/Makefile.am	2006-10-17 22:32:39 +05:00
+++ 1.99/libmysqld/Makefile.am	2006-10-17 22:32:39 +05:00
@@ -77,6 +77,8 @@ libmysqld_int_a_SOURCES= $(libmysqld_sou
 libmysqld_a_SOURCES=
 
 sqlstoragesources =	$(EXTRA_libmysqld_a_SOURCES)
+storagesources = @condition_dependent_plugin_modules@
+storagesourceslinks = @condition_dependent_plugin_links@
 
 # automake misses these
 sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy
@@ -170,12 +172,21 @@ link_sources:
 	      @LN_CP_F@ `find $(srcdir)/../sql -name "$$f"` "$$f"; \
 	    done; \
 	  fi; \
+	  if test -n "$(storagesources)" ; \
+	  then \
+	    for f in $(storagesources); do \
+	      rm -f $$f; \
+	    done; \
+	    for f in $(storagesourceslinks); do \
+	      @LN_CP_F@ $(top_srcdir)/$$f . ; \
+	    done; \
+	  fi; \
 	  rm -f client_settings.h; \
 	  @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h
 
 
 clean-local:
-	rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) | sed "s;\.lo;.c;g"` \
+	rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) $(storagesources) |
sed "s;\.lo;.c;g"` \
 	       $(top_srcdir)/linked_libmysqld_sources; \
 	rm -f client_settings.h
 

--- 1.3/storage/archive/plug.in	2006-10-17 22:32:39 +05:00
+++ 1.4/storage/archive/plug.in	2006-10-17 22:32:39 +05:00
@@ -2,3 +2,4 @@ MYSQL_STORAGE_ENGINE(archive,,  [Archive
         [Archive Storage Engine], [max,max-no-ndb])
 MYSQL_PLUGIN_STATIC(archive,    [libarchive.a])
 MYSQL_PLUGIN_DYNAMIC(archive,   [ha_archive.la])
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(archive, [ha_archive.cc])
Thread
bk commit into 5.1 tree (holyfoot:1.2312) BUG#23369holyfoot17 Oct