Fix for --count skipping empty tables

This commit is contained in:
Miroslav Štampar 2026-11-12 17:31:14 +01:00
parent c0e75fa98d
commit 26cb5cdc31
2 changed files with 2 additions and 2 deletions

View file

@ -1058,7 +1058,7 @@ class Databases(object):
query = agent.whereQuery(query)
count = inject.getValue(query, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS)
if isNumPosStrValue(count):
if isNumPosStrValue(count) or count in (0, "0"): # Note: including empty tables (i.e. 0 entries)
if safeSQLIdentificatorNaming(db) not in kb.data.cachedCounts:
kb.data.cachedCounts[safeSQLIdentificatorNaming(db)] = {}