Skip to content
/ server Public
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-34953 Add JSON flag for mysqldumpslow.sh output #3901

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HNOONa-0
Copy link

  • The Jira issue number for this PR is: MDEV-34953

Description

The mysqldumpslow.sh script outputs data as a string. This change introduces a --json flag to format the output as JSON for better structure.

Release Notes

Added a --json flag to mysqldumpslow.sh, enabling JSON-formatted output for improved integration with tools that process structured JSON data.

How can this PR be tested?

It can be manually tested on any *-slow.log file. You can provide the filepath as an argument. Here is a video showing how it works:

json-slow-dump.mp4

The problem is that I had to download the JSON module on my machine to encode the data as JSON, how do i make it preinstalled on other machines so that it works out right away for other users?

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

Sorry, something went wrong.

This change introduces a `--json` flag to `mysqldumpslow.sh`, allowing
the output to be formatted as valid JSON. This enhances compatibility
with tools that process structured JSON  data.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@svoj svoj added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.
Development

Successfully merging this pull request may close these issues.

None yet

3 participants