Skip to content
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

Fix key buffer usage multiple-byte units #572

Merged
merged 1 commit into from
Nov 24, 2021
Merged

Fix key buffer usage multiple-byte units #572

merged 1 commit into from
Nov 24, 2021

Conversation

MichaIng
Copy link
Contributor

@MichaIng MichaIng commented Nov 22, 2021

The "Key buffer used" row showed 131072 bytes as 131K while it should be shown as 128K, so that it matches the multi-byte units key buffer size in the "Key buffer size / total MyISAM indexes" row below.

Furthermore, instead of calculating the used bytes from the previously calculated percentage, doing a round trip which involves rounding errors, calculate the used bytes from the variables directly which does not involve any division and hence no possible rounding errors.

The "Key buffer used" row showed 131072 bytes as 131K while it should be shown as 128K, so that it matches the multi-byte units key buffer size in the "Key buffer size / total MyISAM indexes" row below.

Furthermore, instead of calculating the used bytes from the previously calculated percentage, doing a round trip which involves rounding errors, calculate the used bytes from the variables directly which does not involve any diversion and hence no possible rounding errors.

Signed-off-by: MichaIng <micha@dietpi.com>
@jmrenouard jmrenouard merged commit 12a96cb into major:master Nov 24, 2021
@MichaIng MichaIng deleted the patch-1 branch November 24, 2021 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants