List:Commits« Previous MessageNext Message »
From:Horst.Hunger Date:April 21 2010 9:10am
Subject:bzr commit into mysql-next-mr-bugfixing branch (horst.hunger:3143) Bug#40942
Bug#47759
View as plain text  
#At file:///home/horst/bzr/next-mr-47759-2/ based on revid:mats@stripped

 3143 Horst.Hunger	2010-04-21
      Patch for bug#47759 after review including a test. The result file is empty as the test failed due to bug#40942. The plugin test needs to be completed after this bug will be fixed.

    added:
      mysql-test/include/have_federated_plugin.inc
      mysql-test/suite/federated/federated_plugin-master.opt
      mysql-test/suite/federated/federated_plugin.result
      mysql-test/suite/federated/federated_plugin.test
    modified:
      storage/federated/Makefile.am
=== added file 'mysql-test/include/have_federated_plugin.inc'
--- a/mysql-test/include/have_federated_plugin.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/have_federated_plugin.inc	2010-04-21 09:10:01 +0000
@@ -0,0 +1,5 @@
+if (`select plugin_library IS NULL from information_schema.plugins where plugin_name LIKE '%federated%'`)
+{
+  --skip federated plugin not available
+}
+

=== added file 'mysql-test/suite/federated/federated_plugin-master.opt'
--- a/mysql-test/suite/federated/federated_plugin-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/federated/federated_plugin-master.opt	2010-04-21 09:10:01 +0000
@@ -0,0 +1,2 @@
+--plugin_dir=../storage/federated/.libs
+

=== added file 'mysql-test/suite/federated/federated_plugin.result'

=== added file 'mysql-test/suite/federated/federated_plugin.test'
--- a/mysql-test/suite/federated/federated_plugin.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/federated/federated_plugin.test	2010-04-21 09:10:01 +0000
@@ -0,0 +1,22 @@
+--source include/not_windows.inc
+--source include/have_federated_plugin.inc
+
+CREATE TABLE t1(a int) ENGINE=FEDERATED;
+DROP TABLE t1;
+
+INSTALL PLUGIN federated SONAME 'ha_federated.so';
+--error 1125
+INSTALL PLUGIN FEDERATED SONAME 'ha_federated.so';
+
+UNINSTALL PLUGIN federated;
+
+INSTALL PLUGIN federated SONAME 'ha_federated.so';
+
+CREATE TABLE t1(a int) ENGINE=FEDERATED;
+
+DROP TABLE t1;
+
+UNINSTALL PLUGIN federated;
+--error ER_SP_DOES_NOT_EXIST
+UNINSTALL PLUGIN federated;
+

=== modified file 'storage/federated/Makefile.am'
--- a/storage/federated/Makefile.am	2009-03-18 10:04:15 +0000
+++ b/storage/federated/Makefile.am	2010-04-21 09:10:01 +0000
@@ -1,5 +1,5 @@
-# Copyright (C) 2006 MySQL AB
-#
+# Copyright (C) 2005-2006 MySQL AB, 2009 Sun Microsystems, Inc.
+# All rights reserved.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; version 2 of the License.
@@ -23,7 +23,8 @@ pkgplugindir =		$(pkglibdir)/plugin
 INCLUDES =              -I$(top_srcdir)/include -I$(top_builddir)/include \
 			-I$(top_srcdir)/regex \
 			-I$(top_srcdir)/sql \
-                        -I$(srcdir)
+			-I$(srcdir)
+
 WRAPLIBS=
 
 LDADD =
@@ -50,11 +51,22 @@ libfederated_a_SOURCES=	ha_federated.cc
 EXTRA_DIST =		CMakeLists.txt plug.in
 
 if HAVE_DTRACE_DASH_G
+# The object for static and dynamic linking of federated differ
+# For static linkage of federated to mysqld
+
 libfederated_a_LIBADD = probes_mysql.o
 libfederated_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
-CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
-DTRACEFILES = libfederated_a-ha_federated.o
+# For federated as shared library
+ha_federated_la_LIBADD =	probes_sh_mysql.o
+# Hack: We "depend" on ".libs/" but have no rule for it,
+# but it is created as a byproduct of the ".lo"
+DTRACESHAREDDEPS = ha_federated_la-ha_federated.lo
+DTRACESHAREDFILES = ha_federated_la-ha_federated.o
 DTRACEPROVIDER = probes_mysql.d
+ha_federated_la_DEPENDENCIES = probes_sh_mysql.o $(DTRACESHAREDDEPS) dtrace_providers
+
+CLEANFILES = $(DTRACEPROVIDER) dtrace_files dtrace_providers $(DTRACESHAREDFILES)
+DTRACEFILES = libfederated_a-ha_federated.o
 
 dtrace_files:
 	echo $(DTRACEFILES) > $@
@@ -65,8 +77,12 @@ probes_mysql.d:
 	$(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d
 	echo timestamp > dtrace_sources
 
+probes_sh_mysql.o: $(DTRACEPROVIDER) $(DTRACESHAREDDEPS)
+	$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACESHAREDFILES) -o $@
+	$(CP) $(DTRACESHAREDFILES) .libs
 probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
 	$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
+
 endif
 
 # Don't update the files from bitkeeper


Attachment: [text/bzr-bundle] bzr/horst.hunger@sun.com-20100421091001-z1if1ue2kxnwpfox.bundle
Thread
bzr commit into mysql-next-mr-bugfixing branch (horst.hunger:3143) Bug#40942Bug#47759Horst.Hunger21 Apr