Skip to content

Commit f70bcfa

Browse files
authored
MySQL 8.4 (#18571)
1 parent f90915c commit f70bcfa

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

mysql/changelog.d/18571.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed a bug in MySQL 8.4 where `SHOW MASTER STATUS` would fail

mysql/datadog_checks/mysql/mysql.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,11 @@ def _get_replica_stats(self, db, is_mariadb, replication_channel):
10751075

10761076
try:
10771077
with closing(db.cursor(CommenterDictCursor)) as cursor:
1078-
cursor.execute("SHOW MASTER STATUS;")
1078+
if not self.is_mariadb and self.version.version_compatible((8, 4, 0)):
1079+
cursor.execute("SHOW BINARY LOG STATUS;")
1080+
else:
1081+
cursor.execute("SHOW MASTER STATUS;")
1082+
10791083
binlog_results = cursor.fetchone()
10801084
if binlog_results:
10811085
replica_results.update({'Binlog_enabled': True})

mysql/hatch.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ python = ["3.11"]
1818
version = [
1919
"5.7", # EOL October 21, 2023
2020
"8.0.36", # EOL April, 2026
21+
"8.4.0",
2122
]
2223

2324
[[envs.default.matrix]]
@@ -40,11 +41,13 @@ version = [
4041
[envs.default.overrides]
4142
matrix.version.env-vars = [
4243
{ key = "COMPOSE_FILE", value = "mysql8.yaml", if = ["8.0.36"] },
44+
{ key = "COMPOSE_FILE", value = "mysql8.yaml", if = ["8.4.0"] },
4345
]
4446
name."8.0-group".env-vars = [
4547
{ key = "COMPOSE_FILE", value = "mysql8-group.yaml" },
4648
]
4749

50+
4851
[envs.default.env-vars]
4952
COMPOSE_FILE = "{matrix:flavor:mysql}.yaml"
5053
MYSQL_FLAVOR = "{matrix:flavor:mysql}"

0 commit comments

Comments
 (0)