mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Don't wrap new password in PASSWORD() function, on newer MySQL servers. Closes #325.
This commit is contained in:
@@ -1298,7 +1298,10 @@ begin
|
||||
|
||||
// Set password
|
||||
if editPassword.Modified and (not PasswordSet) then begin
|
||||
FConnection.Query('SET PASSWORD FOR ' + OrgUserHost + ' = PASSWORD('+esc(editPassword.Text)+')');
|
||||
if (not FConnection.Parameters.IsMariaDB) and (FConnection.ServerVersionInt >= 50706) then
|
||||
FConnection.Query('SET PASSWORD FOR ' + OrgUserHost + ' = '+esc(editPassword.Text))
|
||||
else
|
||||
FConnection.Query('SET PASSWORD FOR ' + OrgUserHost + ' = PASSWORD('+esc(editPassword.Text)+')');
|
||||
end;
|
||||
|
||||
// Rename user
|
||||
|
||||
Reference in New Issue
Block a user