Skip to content

Commit

Permalink
MySQL stats fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Oct 26, 2019
1 parent 50ec28c commit b0169a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .pylintrc
Expand Up @@ -90,7 +90,7 @@ generated-members=exc_clear
# (useful for classes with attributes dynamically set). This supports can work
# with qualified names.

ignored-classes=SectionValue,Lazy,_v_c
ignored-classes=SectionValue,Lazy,_v_c,c

# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
Expand Down
4 changes: 3 additions & 1 deletion src/relstorage/adapters/mysql/stats.py
Expand Up @@ -36,4 +36,6 @@ def get_db_size(self):
self.connmanager.close(conn, cursor)
data_column = description.index('Data_length')
index_column = description.index('Index_length')
return sum([row[data_column] + row[index_column] for row in rows], 0)
# We also got back views, which have no size.
return sum([row[data_column] + row[index_column] for row in rows
if row[data_column] and row[index_column]], 0)

0 comments on commit b0169a0

Please sign in to comment.