Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Suppress errors in GetLockedTableCount, which is not working on all s…
  • Loading branch information
ansgarbecker committed Nov 19, 2019
1 parent 9b23bae commit ac8190f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions source/dbconnection.pas
Expand Up @@ -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;

Expand Down

0 comments on commit ac8190f

Please sign in to comment.