List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:September 5 2011 1:09pm
Subject:bzr push into mysql-5.1-mtr branch (bjorn.munch:3013 to 3014) Bug#11750417
View as plain text  
 3014 Bjorn Munch	2011-09-05
      Bug #11750417 40942: UNABLE TO INSTALL FEDERATED PLUGIN
        Link plugin with a copy of string.o
        Copied test from 5.5 but this was dysfunctional, made it work
        Also tested on Windows

    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:
      mysql-test/mysql-test-run.pl
      storage/federated/Makefile.am
 3013 Bjorn Munch	2011-08-30 [merge]
      new merge from 5.1

    modified:
      mysql-test/r/group_by.result
      mysql-test/t/group_by.test
      mysql-test/valgrind.supp
      sql/filesort.cc
=== 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	2011-09-05 12:38:20 +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
+}
+

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-07-07 08:06:59 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-09-05 12:38:20 +0000
@@ -1979,6 +1979,24 @@ sub environment_setup {
     $ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=EXAMPLE=".$plugin_filename;
   }
 
+  # --------------------------------------------------------------------------
+  # Add the path where mysqld will find ha_federated.so
+  # --------------------------------------------------------------------------
+  my $fedplug_filename;
+  if (IS_WINDOWS) {
+    $fedplug_filename = "ha_federated.dll";
+  } else {
+    $fedplug_filename = "ha_federated.so";
+  }
+  my $lib_fed_plugin=
+    mtr_file_exists(vs_config_dirs('storage/federated',$fedplug_filename),
+		    "$basedir/storage/federated/.libs/".$fedplug_filename,
+		    "$basedir/lib/mysql/plugin/".$fedplug_filename);
+
+  $ENV{'FEDERATED_PLUGIN'}= $fedplug_filename;
+  $ENV{'FEDERATED_PLUGIN_DIR'}=
+    ($lib_fed_plugin ? dirname($lib_fed_plugin) : "");
+
   # ----------------------------------------------------
   # Add the path where mysqld will find mypluglib.so
   # ----------------------------------------------------

=== 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	2011-09-05 12:38:20 +0000
@@ -0,0 +1,2 @@
+--plugin_dir=$FEDERATED_PLUGIN_DIR
+--loose-federated=ON

=== added file 'mysql-test/suite/federated/federated_plugin.result'
--- a/mysql-test/suite/federated/federated_plugin.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/federated/federated_plugin.result	2011-09-05 12:38:20 +0000
@@ -0,0 +1,19 @@
+CREATE TABLE t2(a int);
+CREATE TABLE t1(a int) ENGINE=FEDERATED
+CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/t2';
+Warnings:
+Warning	1286	Unknown table engine 'FEDERATED'
+Warning	1266	Using storage engine MyISAM for table 't1'
+DROP TABLE t1;
+INSTALL PLUGIN federated SONAME 'FEDERATED_PLUGIN';
+INSTALL PLUGIN FEDERATED SONAME 'FEDERATED_PLUGIN';
+ERROR HY000: Function 'FEDERATED' already exists
+UNINSTALL PLUGIN federated;
+INSTALL PLUGIN federated SONAME 'FEDERATED_PLUGIN';
+CREATE TABLE t1(a int) ENGINE=FEDERATED
+CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/t2';
+DROP TABLE t1;
+UNINSTALL PLUGIN federated;
+UNINSTALL PLUGIN federated;
+ERROR 42000: PLUGIN federated does not exist
+DROP TABLE t2;

=== 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	2011-09-05 12:38:20 +0000
@@ -0,0 +1,34 @@
+--source include/have_federated_plugin.inc
+
+connect (master,localhost,root,,test,$MASTER_MYPORT,);
+connect (slave,localhost,root,,test,$SLAVE_MYPORT,);
+
+connection master;
+CREATE TABLE t2(a int);
+
+connection slave;
+CREATE TABLE t1(a int) ENGINE=FEDERATED
+  CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/t2';
+DROP TABLE t1;
+
+--replace_result $FEDERATED_PLUGIN FEDERATED_PLUGIN
+eval INSTALL PLUGIN federated SONAME '$FEDERATED_PLUGIN';
+--replace_result $FEDERATED_PLUGIN FEDERATED_PLUGIN
+--error ER_UDF_EXISTS
+eval INSTALL PLUGIN FEDERATED SONAME '$FEDERATED_PLUGIN';
+
+UNINSTALL PLUGIN federated;
+
+--replace_result $FEDERATED_PLUGIN FEDERATED_PLUGIN
+eval INSTALL PLUGIN federated SONAME '$FEDERATED_PLUGIN';
+
+CREATE TABLE t1(a int) ENGINE=FEDERATED
+  CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/t2';
+DROP TABLE t1;
+
+UNINSTALL PLUGIN federated;
+--error ER_SP_DOES_NOT_EXIST
+UNINSTALL PLUGIN federated;
+
+connection master;
+DROP TABLE t2;

=== modified file 'storage/federated/Makefile.am'
--- a/storage/federated/Makefile.am	2011-06-30 15:37:13 +0000
+++ b/storage/federated/Makefile.am	2011-09-05 12:38:20 +0000
@@ -37,14 +37,14 @@ pkgplugin_LTLIBRARIES =	@plugin_federate
 ha_federated_la_LDFLAGS =	-module -rpath $(pkgplugindir)
 ha_federated_la_CXXFLAGS=	$(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
 ha_federated_la_CFLAGS =	$(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
-ha_federated_la_SOURCES =	ha_federated.cc
+ha_federated_la_SOURCES =	ha_federated.cc $(top_srcdir)/mysys/string.c
 
 
 EXTRA_LIBRARIES =	libfederated.a
 noinst_LIBRARIES =	@plugin_federated_static_target@
 libfederated_a_CXXFLAGS =	$(AM_CXXFLAGS)
 libfederated_a_CFLAGS =	$(AM_CFLAGS)
-libfederated_a_SOURCES=	ha_federated.cc
+libfederated_a_SOURCES=	ha_federated.cc $(top_srcdir)/mysys/string.c
 
 
 EXTRA_DIST =		CMakeLists.txt plug.in

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-mtr branch (bjorn.munch:3013 to 3014) Bug#11750417Bjorn Munch5 Sep