MDEV-34953 Add JSON flag for mysqldumpslow.sh
output
#3901
+43
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 tomysqldumpslow.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 thefilepath
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
main
branch.PR quality check