Skip to content

Support for bracket notation inside MULTIPOINT - #5661

Open
DaveGosselin-MariaDB wants to merge 1 commit into
11.4from
11.4-mdev-36166-multipoint-brackets
Open

Support for bracket notation inside MULTIPOINT#5661
DaveGosselin-MariaDB wants to merge 1 commit into
11.4from
11.4-mdev-36166-multipoint-brackets

Conversation

@DaveGosselin-MariaDB

Copy link
Copy Markdown
Member
MDEV-36166:  Accept bracketed points inside MULTIPOINT

ST_GEOMFROMTEXT('MULTIPOINT((0 0),(1 1))') returned NULL while
ST_GEOMFROMTEXT('MULTIPOINT(0 0,1 1)') returned the geometry.  The
bracketed spelling is the one the OGC WKT grammar defines.  In
06-103r4 section 7.2.2 a <multipoint text> is a list of <point text>,
and a <point text> has its own parentheses, the same way a
<multilinestring text> is a list of <linestring text>.  The bare
spelling matches no production in that grammar, so the text MariaDB
rejected was the conformant one.

The first point now determines which of the two bracketing forms the
remaining list elements will use.  A mixed list such as MULTIPOINT((0
0),1 1) is an error.  The bare form stays accepted because existing
data and applications use it.  Geometry::create_from_wkt is the single
entry into the WKT reader, so ST_MPOINTFROMTEXT and a MULTIPOINT
nested in a GEOMETRYCOLLECTION are covered by the same change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

ST_GEOMFROMTEXT('MULTIPOINT((0 0),(1 1))') returned NULL while
ST_GEOMFROMTEXT('MULTIPOINT(0 0,1 1)') returned the geometry.  The
bracketed spelling is the one the OGC WKT grammar defines.  In
06-103r4 section 7.2.2 a <multipoint text> is a list of <point text>,
and a <point text> has its own parentheses, the same way a
<multilinestring text> is a list of <linestring text>.  The bare
spelling matches no production in that grammar, so the text MariaDB
rejected was the conformant one.

The first point now determines which of the two bracketing forms the
remaining list elements will use.  A mixed list such as MULTIPOINT((0
0),1 1) is an error.  The bare form stays accepted because existing
data and applications use it.  Geometry::create_from_wkt is the single
entry into the WKT reader, so ST_MPOINTFROMTEXT and a MULTIPOINT
nested in a GEOMETRYCOLLECTION are covered by the same change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@DaveGosselin-MariaDB
DaveGosselin-MariaDB force-pushed the 11.4-mdev-36166-multipoint-brackets branch from 56f26ec to 03bda00 Compare September 10, 2026 18:59
@DaveGosselin-MariaDB DaveGosselin-MariaDB changed the title 11.4 mdev 36166 multipoint brackets Support for bracket notation inside MULTIPOINT Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant