Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5
-
None
Description
Applying recent MariaDB Connector C changes and applying https://github.com/MariaDB/server/pull/1478 leads to the mtr error:
main.plugin_auth 'innodb' w3 [ fail ]
|
Test ended at 2020-04-04 16:12:11
|
|
CURRENT_TEST: main.plugin_auth
|
mysqltest: At line 417: query 'connect cleartext_con,localhost,uplain,cleartext_test' failed: 1045: Plugin mysql_clear_password could not be loaded: /usr/lib/mysql/plugin/mysql_clear_password.so: cannot open shared object file: No such file or directory
|
This is because the new location for the plugin is usr/lib/*/libmariadb3/plugin/mysql_clear_password.so instead of usr/lib/mysql/plugin/mysql_clear_password.so
Line 417 in plugin_auth.test looks like this:
connect(cleartext_con,localhost,uplain,cleartext_test);
|
In the beginning of the file the plugin is loaded with:
--source include/have_plugin_auth.inc
|
The file have_plugin.opt includes:
--plugin-load-add=$AUTH_TEST_PLUGIN_SO
|
I can't find where $AUTH_TEST_PLUGIN_SO is set or how to update the path now to the test.
server$ grep -rF AUTH_TEST_PLUGIN *
|
mysql-test/include/have_plugin_auth.opt:--plugin-load-add=$AUTH_TEST_PLUGIN_SO
|
mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test:--replace_result $AUTH_TEST_PLUGIN_SO PLUGIN_AUTH
|
mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test:eval install plugin test_plugin_server soname '$AUTH_TEST_PLUGIN_SO';
|
mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test:--replace_result $AUTH_TEST_PLUGIN_SO PLUGIN_AUTH
|
mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test:eval install plugin test_plugin_server soname '$AUTH_TEST_PLUGIN_SO';
|
Please help how to track down the client library plugin path in mtr and update it to match new location.
Also applies for a couple more tests:
plugins.multiauth w3 [ fail ]
Test ended at 2020-04-04 17:29:43
CURRENT_TEST: plugins.multiauth
mysqltest: At line 75: exec of '/usr/bin/mysqltest --defaults-file=/dev/shm/var/3/my.cnf --silent --tmpdir=/dev/shm/var/tmp/3 --character-sets-dir=/usr/share/mysql/charsets --logdir=/dev/shm/var/3/log --database=test --timer-file=/dev/shm/var/3/log/timer < /dev/shm/var/3/tmp/peercred_test.txt 2>&1 -u mysqltest1 -pgood' failed, error: 256, status: 1, errno: 11
Output from before failure:
mysqltest: Could not open connection 'default': 1045 Plugin client_ed25519 could not be loaded: /usr/lib/mysql/plugin/client_ed25519.so: cannot open shared object file: No such file or directory
The result from queries just before the failure was:
< snip >
select user(), current_user(), database();
user() current_user() database()
USER@localhost USER@% test
# name does not match, password good = ok
select user(), current_user(), database();
user() current_user() database()
mysqltest1@localhost mysqltest1@% test
# name does not match, password bad = failure
mysqltest: Could not open connection 'default': 1698 Access denied for user 'mysqltest1'@'localhost'
drop user USER, mysqltest1;
create user USER identified via unix_socket OR ed25519 as password("GOOD");
create user mysqltest1 identified via unix_socket OR ed25519 as password("good");
show create user mysqltest1;
CREATE USER for mysqltest1@%
CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc'
# name match = ok
select user(), current_user(), database();
user() current_user() database()
USER@localhost USER@% test
# name does not match, password good = ok
plugins.auth_ed25519 w4 [ fail ]
Test ended at 2020-04-04 17:38:48
CURRENT_TEST: plugins.auth_ed25519
mysqltest: At line 48: query 'connect con1, localhost, test1, secret' failed: 1045: Plugin client_ed25519 could not be loaded: /usr/lib/mysql/plugin/client_ed25519.so: cannot open shared object file: No such file or directory
The result from queries just before the failure was:
< snip >
show grants for test1@localhost;
Grants for test1@localhost
GRANT USAGE ON *.* TO `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI'
select ed25519_password('foo');
ed25519_password('foo')
vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI
set password for test1@localhost = password('bar');
show create user test1@localhost;
CREATE USER for test1@localhost
CREATE USER `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10'
select ed25519_password('bar');
ed25519_password('bar')
pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10
set password for test1@localhost = 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY';
show create user test1@localhost;
CREATE USER for test1@localhost
CREATE USER `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'
connect(localhost,test1,public,test,PORT,SOCKET);
connect con1, localhost, test1, public;
ERROR 28000: Plugin client_ed25519 could not be loaded: /usr/lib/mysql/plugin/client_ed25519.so: cannot open shared object file: No such file or directory
mtr itself has option --plugin-dir and a sections that seems to expand it:
mtr_add_arg($args, "--plugin-dir=%s", $plugindir);
...
for (<$bindir/storage/*/*.so>,
<$bindir/plugin/*/*.so>,
<$bindir/plugin/*/auth_pam_tool_dir>,
<$bindir/libmariadb/plugins/*/*.so>,
<$bindir/libmariadb/*.so>,
<$bindir/sql/*.so>)
{
...
# hm, what paths work for debs and for rpms ?
for (<$bindir/lib64/mysql/plugin/*.so>,
<$bindir/lib/mysql/plugin/*.so>,
<$bindir/lib64/mariadb/plugin/*.so>,
<$bindir/lib/mariadb/plugin/*.so>,
<$bindir/lib/plugin/*.so>, # bintar
<$bindir/lib/plugin/*.dll>)
{
my $pname=basename($_);
set_plugin_var($pname);
$plugindir=dirname($_) unless $plugindir;
}