From 4c60093a06c3018bc0ee69fbfb14fee7e3256f0e Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sat, 4 Jul 2020 08:44:08 +0200 Subject: [PATCH] Issue #1081: apply quirk for missing IDENTIFIED BY PASSWORD clause to MySQL 5.7.6+ only (MariaDB still includes it). Will still be an issue for newer MySQL versions. --- source/usermanager.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/usermanager.pas b/source/usermanager.pas index 7dcf4738..8c908ccf 100644 --- a/source/usermanager.pas +++ b/source/usermanager.pas @@ -581,7 +581,8 @@ begin // http://dev.mysql.com/doc/refman/5.7/en/show-grants.html // As of MySQL 5.7.6, SHOW GRANTS output does not include IDENTIFIED BY PASSWORD clauses. // Use the SHOW CREATE USER statement instead. See Section 14.7.5.12, "SHOW CREATE USER Syntax". - if FConnection.Parameters.IsAnyMySQL and (FConnection.ServerVersionInt < 50706) then begin + if (FConnection.Parameters.IsMySQL and (FConnection.ServerVersionInt < 50706)) + or (not FConnection.Parameters.IsMySQL) then begin if not FAdded then begin editPassword.TextHint := FConnection.UnescapeString(rxGrant.Match[10]); // Set password for changed user, to silence the error message about invalid length