MDEV-28649 json_array(false) in the definition of view return 0 inste… #3700
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.
…ad of "true"
Description
Using any boolean argument to a function in a view resulted in a view definition like:
select json_array(0) AS
json_array(false)
This was imply the Item::print function used was from Item_int::print rather than a specific Item_bool::print function.
Simplification to STRING_WITH_LEN noted from Alexey Botchkov's patch after almost equivalent implementation.
6835d2ce268b001a9a4f85d92c132c58e33d490e
Explain FORMAT=JSON output to take boolean output rather than printing "true"/"false" in quotes.
Release Notes
View statements created with functions that take booleans now are accurately represented as booleans.
Also json output containing booleans are displayed as booleans.
How can this PR be tested?
test included
Basing the PR against the correct MariaDB version
main
branch.PR quality check