Adapt tests to mariadb 10.11
As of mariadb 10.11 (Fedora 40), the documented method of reverting the user account to mysql_native_password post-creation fails with: ERROR 1698 (28000): Access denied for user 'mockbuild'@'localhost' Using the documented method for setting this at creation time works with both 10.5 and 10.11.
This commit is contained in:
parent
05b8a5a8fb
commit
5c7ffda69a
@ -6,7 +6,7 @@
|
||||
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 0.5.5
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: A simple, fast Mysql library for Ruby, binding to libmysql
|
||||
License: MIT
|
||||
URL: https://github.com/brianmario/mysql2
|
||||
@ -113,7 +113,9 @@ MYSQL_TEST_LOG="${TOP_DIR}/mysql.log"
|
||||
MYSQL_TEST_PID_FILE="${TOP_DIR}/mysql.pid"
|
||||
|
||||
mkdir "${MYSQL_TEST_DATA_DIR}"
|
||||
# See https://mariadb.com/kb/en/authentication-from-mariadb-10-4/#configuring-mariadb-install-db-to-revert-to-the-previous-authentication-method
|
||||
mysql_install_db \
|
||||
--auth-root-authentication-method=normal \
|
||||
--datadir="${MYSQL_TEST_DATA_DIR}" \
|
||||
--log-error="${MYSQL_TEST_LOG}"
|
||||
|
||||
@ -140,13 +142,6 @@ if ! "${conn_found}"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Reset password for the root user due to MariaDB 10.4 authentication change.
|
||||
# See https://mariadb.com/kb/en/authentication-from-mariadb-104/#altering-the-user-account-to-revert-to-the-previous-authentication-method
|
||||
mysql -u ${MYSQL_TEST_USER} \
|
||||
-e "ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('')" \
|
||||
-S "${MYSQL_TEST_SOCKET}" \
|
||||
-P "${MYSQL_TEST_PORT}"
|
||||
|
||||
# See https://github.com/brianmario/mysql2/blob/master/ci/setup.sh
|
||||
mysql -u root \
|
||||
-e 'CREATE DATABASE /*M!50701 IF NOT EXISTS */ test' \
|
||||
@ -196,6 +191,9 @@ kill "$(cat "${MYSQL_TEST_PID_FILE}")"
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Feb 09 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 0.5.5-4
|
||||
- Adapt tests to mariadb 10.11
|
||||
|
||||
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.5-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user