From 14d9801cd3fb889ec7ee7f882df359d91c7ea4f5 Mon Sep 17 00:00:00 2001 From: Nikita Malyavin Date: Fri, 21 Jun 2024 15:55:38 +0200 Subject: [PATCH] fix MDEV-34424 for ed255129 realloc can't be done for mysql->passwd. There's also no pretty way to pass the ext-salt into hash_password, so let's use thread_local instead. For GCC < 4.9 (SLES 12, CentOS 7), which don't support _Thread_local, pk will be recalculated instead --- libmariadb | 2 +- mysql-test/suite/plugins/r/rpl_auth.result | 23 ++++++++++++++++ mysql-test/suite/plugins/t/rpl_auth.test | 31 ++++++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 mysql-test/suite/plugins/r/rpl_auth.result create mode 100644 mysql-test/suite/plugins/t/rpl_auth.test diff --git a/libmariadb b/libmariadb index cc985fab303..dddcf400af9 160000 --- a/libmariadb +++ b/libmariadb @@ -1 +1 @@ -Subproject commit cc985fab30321d098372f95141bf2b3bbbbedf9b +Subproject commit dddcf400af9a693fdbed4e692d71bf98b79b7aa1 diff --git a/mysql-test/suite/plugins/r/rpl_auth.result b/mysql-test/suite/plugins/r/rpl_auth.result new file mode 100644 index 00000000000..967cab167f7 --- /dev/null +++ b/mysql-test/suite/plugins/r/rpl_auth.result @@ -0,0 +1,23 @@ +include/master-slave.inc +[connection master] +connection slave; +install soname 'auth_ed25519'; +connection master; +install soname 'auth_ed25519'; +create user rpluser@'%' identified via ed25519 using PASSWORD('rpl_pass'); +grant replication slave on *.* to rpluser@'%'; +connection master; +connection slave; +include/stop_slave.inc +change master to master_user='rpluser', master_password='rpl_pass'; +include/start_slave.inc +# Cleanup +include/stop_slave.inc +change master to master_user='root', master_password=''; +include/start_slave.inc +include/stop_slave.inc +drop user rpluser@'%'; +uninstall soname 'auth_ed25519'; +connection master; +drop user rpluser@'%'; +uninstall soname 'auth_ed25519'; diff --git a/mysql-test/suite/plugins/t/rpl_auth.test b/mysql-test/suite/plugins/t/rpl_auth.test new file mode 100644 index 00000000000..ccf08057eb2 --- /dev/null +++ b/mysql-test/suite/plugins/t/rpl_auth.test @@ -0,0 +1,31 @@ +if (!$AUTH_ED25519_SO) { + skip No auth_ed25519 plugin; +} + +source include/master-slave.inc; + +sync_slave_with_master; +install soname 'auth_ed25519'; +# create a user for replication with ed25519 auth plugin +connection master; +install soname 'auth_ed25519'; +create user rpluser@'%' identified via ed25519 using PASSWORD('rpl_pass'); +grant replication slave on *.* to rpluser@'%'; +connection master; +sync_slave_with_master; +# Set the slave to connect using the user created with the ed25519 plugin for replication +source include/stop_slave.inc; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +change master to master_user='rpluser', master_password='rpl_pass'; +source include/start_slave.inc; + +--echo # Cleanup +source include/stop_slave.inc; +change master to master_user='root', master_password=''; +source include/start_slave.inc; +source include/stop_slave.inc; +drop user rpluser@'%'; +uninstall soname 'auth_ed25519'; +connection master; +drop user rpluser@'%'; +uninstall soname 'auth_ed25519';