Skip to content

Commit 7832d0b

Browse files
authored
Fix metadata table (#17875)
1 parent a35ffb8 commit 7832d0b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

mysql/changelog.d/17875.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix metadata table source for MySQL 5.6

mysql/datadog_checks/mysql/metadata.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ def run_job(self):
108108
@tracked_method(agent_check_getter=attrgetter('_check'))
109109
def report_mysql_metadata(self):
110110
settings = []
111-
table_name = MYSQL_TABLE_NAME if not self._check.is_mariadb else MARIADB_TABLE_NAME
111+
table_name = (
112+
MYSQL_TABLE_NAME
113+
if not self._check.is_mariadb and self._check.version.version_compatible((5, 7, 0))
114+
else MARIADB_TABLE_NAME
115+
)
112116
query = SETTINGS_QUERY.format(table_name=table_name)
113117
with closing(self._get_db_connection().cursor(CommenterDictCursor)) as cursor:
114118
self._cursor_run(

0 commit comments

Comments
 (0)