diff --git a/mysql-test/include/default_client.cnf b/mysql-test/include/default_client.cnf index e326b308f5f..1dda4b5b139 100644 --- a/mysql-test/include/default_client.cnf +++ b/mysql-test/include/default_client.cnf @@ -3,9 +3,6 @@ # when running tests - not to depend on the current machine localization. # -[client] -plugin-dir=@mysqld.1.plugin-dir - [mysql] default-character-set=latin1 diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 261de37ab54..db5c1aa1875 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -216,6 +216,7 @@ my @mysqld_rules= my @client_rules= ( { 'character-sets-dir' => \&fix_charset_dir }, + { 'plugin-dir' => sub { $::client_plugindir } }, ); diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index fcb8e5801e2..0bfe08c73de 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -130,6 +130,7 @@ our $path_testlog; our $default_vardir; our $opt_vardir; # Path to use for var/ dir our $plugindir; +our $client_plugindir; my $path_vardir_trace; # unix formatted opt_vardir for trace files my $opt_tmpdir; # Path to use for tmp/ dir my $opt_tmpdir_pid; @@ -2784,12 +2785,15 @@ sub setup_vardir() { # and make them world readable copytree("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data", "0022"); - # create a plugin dir and copy or symlink plugins into it unless($plugindir) { + # create a plugin dir and copy or symlink plugins into it if ($source_dist) { $plugindir="$opt_vardir/plugins"; + # Source builds collect both client plugins and server plugins in the + # same directory. + $client_plugindir= $plugindir; mkpath($plugindir); if (IS_WINDOWS) { @@ -2845,10 +2849,18 @@ sub setup_vardir() { <$bindir/lib/plugin/*.so>, # bintar <$bindir/lib/plugin/*.dll>) { - my $pname=basename($_); + my $pname= basename($_); set_plugin_var($pname); - $plugindir=dirname($_) unless $plugindir; + $plugindir= dirname($_) unless $plugindir; } + + # Note: client plugins can be installed separately from server plugins, + # as is the case for Debian packaging. + for (<$bindir/lib/*/libmariadb3/plugin>) + { + $client_plugindir= $_ if <$_/*.so>; + } + $client_plugindir= $plugindir unless $client_plugindir; } }