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
As described in MDEV-31963, MariaDB fails to build with libfmt 10.1.0 because
fmt::detail::make_arg
no longer accepts temporaries. (See also: fmtlib/fmt#3596 (comment).) This PR fixes the code snippet that checks the system libfmt, and also theSFORMAT
code that makes use of libfmt.How can this PR be tested?
I do not think addition or modification to test cases is necessary;
func_sformat.test
should continue to pass.To verify the fix, one could install libfmt 10.1.0 locally and build MariaDB 10.7 or later against that. I applied the changes to MariaDB 11.0.3 and 10.9.8 and can confirm that it fixes the build. For the examples in the
SFORMAT
documentation, the patched builds continue to provide the same results.Basing the PR against the correct MariaDB version
NB. This fix only applies to 10.7 and later since
SFORMAT
was added in 10.7.0. I based my branch on 10.10 as the final release (10.9.8) in the 10.9 series has been made.PR quality check