Skip to content
Permalink
Browse files

Suppress errors in GetLockedTableCount, which is not working on all s…

  • Loading branch information
ansgarbecker committed Nov 19, 2019
1 parent 9b23bae commit ac8190fa1c73329cd97b0ef6a0e1820de4e141b6
Showing with 4 additions and 3 deletions.
  1. +4 −3 source/dbconnection.pas
@@ -4293,12 +4293,13 @@ function TDBConnection.GetLockedTableCount(db: String): Integer;
// Find tables which are currently locked.
// Used to prevent waiting time in GetDBObjects.
sql := GetSQLSpecifity(spLockedTables);
if sql.IsEmpty then begin
Result := 0;
end else begin
Result := 0;
if not sql.IsEmpty then try
LockedTables := GetCol(Format(sql, [QuoteIdent(db,False)]));
Result := LockedTables.Count;
LockedTables.Free;
except // Suppress errors, due to not working on all servers: https://www.heidisql.com/forum.php?t=34984
on E:EDbError do;
end;
end;

0 comments on commit ac8190f

Please sign in to comment.
You can’t perform that action at this time.