Skip to content

Commit 1a50fbc

Browse files
authored
Merge pull request #15 from dgorbash/master
Fix fetch_innodb_stats runtime error (#11)
2 parents c42ece4 + 14a0f80 commit 1a50fbc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mysql.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,8 @@ def fetch_innodb_stats(conn):
477477
for key in MYSQL_INNODB_STATUS_MATCHES[match]:
478478
value = MYSQL_INNODB_STATUS_MATCHES[match][key]
479479
if type(value) is int:
480-
stats[key] = int(row[value])
480+
if value < len(row) and row[value].isdigit():
481+
stats[key] = int(row[value])
481482
else:
482483
stats[key] = value(row, stats)
483484
break

0 commit comments

Comments
 (0)