List:Commits« Previous MessageNext Message »
From:Horst.Hunger Date:April 21 2010 9:40am
Subject:bzr commit into mysql-6.0-codebase-bugfixing branch (horst.hunger:3828)
View as plain text  
#At file:///home/horst/bzr/6.0-47748/ based on revid:tor.didriksen@stripped

 3828 Horst.Hunger	2010-04-21 [merge]
      Merge patch to 6.0-codebase-bugfixing

    added:
      mysql-test/include/have_blackhole_plugin.inc
      mysql-test/r/blackhole_plugin.result
      mysql-test/t/blackhole_plugin-master.opt
      mysql-test/t/blackhole_plugin.test
    modified:
      storage/blackhole/Makefile.am
=== added file 'mysql-test/include/have_blackhole_plugin.inc'
--- a/mysql-test/include/have_blackhole_plugin.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/have_blackhole_plugin.inc	2010-04-21 07:21:42 +0000
@@ -0,0 +1,5 @@
+if (`select plugin_library IS NULL from information_schema.plugins where plugin_name LIKE '%blackhole%'`)
+{
+  --skip blackhole plugin not available;
+}
+

=== added file 'mysql-test/r/blackhole_plugin.result'
--- a/mysql-test/r/blackhole_plugin.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/blackhole_plugin.result	2010-04-21 07:21:42 +0000
@@ -0,0 +1,15 @@
+CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
+Warnings:
+Warning	1286	Unknown storage engine 'BLACKHOLE'
+Warning	1266	Using storage engine MyISAM for table 't1'
+DROP TABLE t1;
+INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
+INSTALL PLUGIN BLACKHOLE SONAME 'ha_blackhole.so';
+ERROR HY000: Function 'BLACKHOLE' already exists
+UNINSTALL PLUGIN blackhole;
+INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
+CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
+DROP TABLE t1;
+UNINSTALL PLUGIN blackhole;
+UNINSTALL PLUGIN blackhole;
+ERROR 42000: PLUGIN blackhole does not exist

=== added file 'mysql-test/t/blackhole_plugin-master.opt'
--- a/mysql-test/t/blackhole_plugin-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/blackhole_plugin-master.opt	2010-04-21 07:21:42 +0000
@@ -0,0 +1 @@
+--plugin_dir=../storage/blackhole/.libs

=== added file 'mysql-test/t/blackhole_plugin.test'
--- a/mysql-test/t/blackhole_plugin.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/blackhole_plugin.test	2010-04-21 07:21:42 +0000
@@ -0,0 +1,22 @@
+--source include/not_windows.inc
+--source include/have_blackhole_plugin.inc
+
+CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
+DROP TABLE t1;
+
+eval INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
+--error 1125
+eval INSTALL PLUGIN BLACKHOLE SONAME 'ha_blackhole.so';
+
+UNINSTALL PLUGIN blackhole;
+
+eval INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
+
+CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
+
+DROP TABLE t1;
+
+UNINSTALL PLUGIN blackhole;
+--error ER_SP_DOES_NOT_EXIST
+UNINSTALL PLUGIN blackhole;
+

=== modified file 'storage/blackhole/Makefile.am'
--- a/storage/blackhole/Makefile.am	2009-07-06 20:59:07 +0000
+++ b/storage/blackhole/Makefile.am	2010-04-21 09:39:36 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 MySQL AB
+# Copyright (C) 2005-2006 MySQL AB, 2009 Sun Microsystems, Inc.
 #
 # 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
@@ -46,11 +46,22 @@ libblackhole_a_SOURCES=	ha_blackhole.cc
 EXTRA_DIST =		CMakeLists.txt plug.in
 
 if HAVE_DTRACE_DASH_G
+# The object for static and dynamic linking of blackhole differ
+# For static linkage of blackhole to mysqld
+
 libblackhole_a_LIBADD = probes_mysql.o
 libblackhole_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
-CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
-DTRACEFILES = ha_blackhole.o
+# For blackhole as shared library
+ha_blackhole_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_blackhole_la-ha_blackhole.lo
+DTRACESHAREDFILES = ha_blackhole_la-ha_blackhole.o
 DTRACEPROVIDER = probes_mysql.d
+ha_blackhole_la_DEPENDENCIES = probes_sh_mysql.o $(DTRACESHAREDDEPS) dtrace_providers
+
+CLEANFILES = $(DTRACEPROVIDERS) dtrace_files dtrace_providers $(DTRACESHAREDDEPS)
+DTRACEFILES = libblackhole_a-ha_blackhole.o
 
 dtrace_files:
 	echo $(DTRACEFILES) > $@
@@ -61,6 +72,11 @@ 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
+


Attachment: [text/bzr-bundle] bzr/horst.hunger@sun.com-20100421093936-4yihqbq4isiefq4p.bundle
Thread
bzr commit into mysql-6.0-codebase-bugfixing branch (horst.hunger:3828) Horst.Hunger21 Apr