From 6fb8ffce4bae819e85a8763d21391828600fe963 Mon Sep 17 00:00:00 2001 From: Raymond Wong Date: Tue, 19 Nov 2019 13:29:57 -0500 Subject: [PATCH] datadog/mysql: when getting the size of the view db, it returns none and gets a TypeError. This defaults to 0 if null instead of none --- mysql/datadog_checks/mysql/mysql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/datadog_checks/mysql/mysql.py b/mysql/datadog_checks/mysql/mysql.py index ea94459f985952..f4eda6db69ba82 100644 --- a/mysql/datadog_checks/mysql/mysql.py +++ b/mysql/datadog_checks/mysql/mysql.py @@ -1347,7 +1347,7 @@ def _query_size_per_schema(self, db): sql_query_schema_size = """ SELECT table_schema, - SUM(data_length+index_length)/1024/1024 AS total_mb + IFNULL(SUM(data_length+index_length)/1024/1024,0) AS total_mb FROM information_schema.tables GROUP BY table_schema; """