Skip to content

Conversation

eric-weaver
Copy link
Contributor

What does this PR do?

Originally we checked for disable_innodb_metrics before our innodb query to SHOW INNODB STATUS but we've since extended support for querying for deadlocks from information_schema.INNODB_METRICS. This second query isn't currently excluded when disabling innodb metrics which leads to a consistent query exception when using a different mysql engine or very old Mysql versions that don't have information_schema.INNODB_METRICS table.

We already check if InnoDB engine is in use before issuing these queries, but if INNODB_METRICS table doesn't exist it will crash. This change moves evaluation of the disable_innodb_metrics config value into our _check_innodb_engine_enabled function so that it's respected everywhere we query innodb allowing customers to disable them if desired.

Motivation

This issue was raised in https://datadoghq.atlassian.net/browse/SDBM-2053

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Copy link

codecov bot commented Sep 23, 2025

Codecov Report

❌ Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.10%. Comparing base (6ba0f52) to head (79a2295).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant