mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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
This commit is contained in:
5
mysql-test/include/have_federated_plugin.inc
Normal file
5
mysql-test/include/have_federated_plugin.inc
Normal file
@ -0,0 +1,5 @@
|
||||
if (`select plugin_library IS NULL from information_schema.plugins where plugin_name LIKE '%federated%'`)
|
||||
{
|
||||
--skip federated plugin not available
|
||||
}
|
||||
|
@ -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
|
||||
# ----------------------------------------------------
|
||||
|
2
mysql-test/suite/federated/federated_plugin-master.opt
Normal file
2
mysql-test/suite/federated/federated_plugin-master.opt
Normal file
@ -0,0 +1,2 @@
|
||||
--plugin_dir=$FEDERATED_PLUGIN_DIR
|
||||
--loose-federated=ON
|
19
mysql-test/suite/federated/federated_plugin.result
Normal file
19
mysql-test/suite/federated/federated_plugin.result
Normal file
@ -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;
|
34
mysql-test/suite/federated/federated_plugin.test
Normal file
34
mysql-test/suite/federated/federated_plugin.test
Normal file
@ -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;
|
@ -37,14 +37,14 @@ pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@
|
||||
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
|
||||
|
Reference in New Issue
Block a user