Skip to content

Commit fe7a5ef

Browse files
committed
enhance: remove FLUSH PRIVILEGES from the user managers FormShow handler. If a click on a non-flushed user in the tree produces an exception, that is caught and shown as a normal error message.
Refs #2479
1 parent f20d634 commit fe7a5ef

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

source/usermanager.pas

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -413,14 +413,6 @@ procedure TUserManagerForm.FormShow(Sender: TObject);
413413
tmp := FConnection.GetSessionVariable('skip_name_resolve');
414414
SkipNameResolve := LowerCase(tmp) = 'on';
415415

416-
try
417-
FConnection.Query(qReloadPrivileges);
418-
except
419-
// FLUSH PRIVILEGE may fail due to missing RELOAD privilege.
420-
// Proceed anyway, it's still ok to read/see the users
421-
on E:EDbError do;
422-
end;
423-
424416
// Peek into user table structure, and find out where the password hash is stored
425417
UserTableColumns := FConnection.GetCol('SHOW COLUMNS FROM '+FConnection.QuoteIdent('mysql')+'.'+FConnection.QuoteIdent('user'));
426418
HasPassword := UserTableColumns.IndexOf('password') > -1;

0 commit comments

Comments
 (0)