Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-32619

ST_PointFromWKB ignores SRID parameter and returns 0

Details

    Description

      The ST_PointFromWKB() function ignores the SRID parameter and returns 0 regardless of specified SRID parameter.

      To reproduce this behavior:

      SELECT ST_SRID(ST_PointFromWKB(POINT(1,2), 4326));

      Should return 4326, but returns 0.

      If creating the point from Well Known Text instead, the SRID is preserved (expected behavior)

      SELECT ST_SRID(ST_PointFromText('POINT(1 2)', 4326))

      Returns 4326 as expected.

      Attachments

        Activity

          ryangriggs Ryan Griggs added a comment -

          I can also confirm that this problem exists with ST_LineStringFromWKB() and most likely all the ...FromWKB() functions.

          Example:
          {{SELECT ST_SRID(ST_LineStringFromWKB(LINESTRING(POINT(1.23, 4.56), POINT(4.56,7.89)), 4326));
          – Returns 0 (should return 4326)}}

          ryangriggs Ryan Griggs added a comment - I can also confirm that this problem exists with ST_LineStringFromWKB() and most likely all the ...FromWKB() functions. Example: {{SELECT ST_SRID(ST_LineStringFromWKB(LINESTRING(POINT(1.23, 4.56), POINT(4.56,7.89)), 4326)); – Returns 0 (should return 4326)}}
          ryangriggs Ryan Griggs added a comment -

          I'm following up to see when this issue will be fixed. Thanks.

          ryangriggs Ryan Griggs added a comment - I'm following up to see when this issue will be fixed. Thanks.
          MoonE Maximilian Krög added a comment - Here's a proposed fix: https://github.com/MariaDB/server/pull/3212

          ok to push.

          holyfoot Alexey Botchkov added a comment - ok to push.

          People

            holyfoot Alexey Botchkov
            ryangriggs Ryan Griggs
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.