MDEV-40553: unprintable gis ranges in trace and context - #5493
Open
bsrikanth-mariadb wants to merge 1 commit into
Conversation
bsrikanth-mariadb
force-pushed
the
13.2-MDEV-40553-unprintable_gis-ranges-in-trace-and-context
branch
2 times, most recently
from
August 7, 2026 10:26
75e9279 to
0bb4fe0
Compare
When ranges were specified in a query for GIS types, the recorded trace and context couldn't print the range information. Instead, it only showed unprintable_geometry_value. This PR extends the geometric field type Field_geom to print appropriate key value, along with the comparison operator when printed in the range. Key value is decoded from binary if applicable, and is recorded in WKT format. For spatial indexes, the operators like MDRWITHIN, MDRCONTAINS, etc... are stored appropriately, and for normal indexes, operators like <, <=, >, >=, etc... are recorded appropriately. Implementation Details: - 1. overwrite print_key_value() for Field_geom to print the decoded binary value in WKT format. If binary value can't be decoded appropriately to WKT format, then the binary value itself is recorded. 2. Add an argument imagetype to Field::print_key_part_value(), to determine if an index key part value is to be printed in WKT or binary format. For Geometric type, imagetype is set to itMBR. When printing ranges, the MBR operators are printed as well, as implemented in print_mbr_range_operator().
bsrikanth-mariadb
force-pushed
the
13.2-MDEV-40553-unprintable_gis-ranges-in-trace-and-context
branch
from
August 7, 2026 10:59
0bb4fe0 to
a5a2383
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When ranges were specified in a query for GIS types, the recorded trace
and context couldn't print the range information. Instead, it only
showed unprintable_geometry_value.
This PR extends the geometric field type Field_geom to print appropriate
key value, along with the comparison operator when printed in the range.
Key value is decoded from binary if applicable, and is recorded in WKT
format. For spatial indexes, the operators like MDRWITHIN, MDRCONTAINS, etc...
are stored appropriately, and for normal indexes, operators like
<, <=, >, >=, etc... are recorded appropriately.
Implementation Details: -
binary value in WKT format. If binary value can't be decoded
appropriately to WKT format, then the binary value itself is recorded.
if an index key part value is to be printed in WKT or binary format.
For Geometric type, imagetype is set to itMBR. When printing ranges,
the MBR operators are printed as well, as implemented in
print_mbr_range_operator().