MDEV-38853 Guard VALIDITY_ASSERT in Json_writer for NDEBUG builds#4688
MDEV-38853 Guard VALIDITY_ASSERT in Json_writer for NDEBUG builds#4688alexDiaconuAlex wants to merge 1 commit intoMariaDB:10.6from
Conversation
|
Alexey Botchkov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
@alexDiaconuAlex , you appear to have taken @BjarneDMat's patches from JIRA and submitted them as your own without even an attribution to the author. Can you please credit the author 10.6 is the earliest maintained version. Can you:
I note there's a collation of patches. If there are greater version numbers with an addition change compared to the 10.6 branch, create a PR for just that change against the right main MariaDB version. |
gkodinov
left a comment
There was a problem hiding this comment.
Thank you for your contribution. This is a preliminary review.
The diff looks correct to me. As unfortunate that such #ifdefs are needed as it is.
Please (as Daniel suggests) re-base to 10.6 and also update the commit message to conform to CODING_GUIDELINES.md.
Then continue working with Daniel on the review.
Please also mention how exactly are you building the server in jira so it's documented.
Guard VALIDITY_ASSERT in Json_writer::add_unquoted_str() and Json_writer::add_str() with !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST) to avoid references to debug-only symbols in release builds. Patch by Bjarne D Mathiesen (from JIRA / MacPorts PR28680).
92eb020 to
455b1ff
Compare
|
Thanks for the review! I've amended the commit message with proper attribution, I've also added the build steps to MDEV-38853 and documented the build method in jira. |
This fixes a release/NDEBUG build failure caused by unguarded VALIDITY_ASSERT usage
in Json_writer::add_unquoted_str() and Json_writer::add_str().
The VALIDITY_ASSERT blocks are now compiled only for debug builds or when
JSON_WRITER_UNIT_TEST is enabled, matching the availability of the referenced symbols.
JIRA: MDEV-38853