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

ST_Collect returns a MULTIPOINT in some cases

    XMLWordPrintable

Details

    • Unexpected results

    Description

      Consider the following scenarios which should both result in GEOMETRYCOLLECTIONs on MariaDB, but don't:

      CREATE TABLE t1 (g GEOMETRY);
      INSERT INTO t1 VALUES (POINT(1,1)), (ST_GeomFromText('LINESTRING(0 0,1 1)')), (POINT(5,5));
      SELECT ST_AsText(ST_Collect(g)) FROM t1;
      -- MULTIPOINT(1 1,1e-323 0,1.7765824089018436e-307 1.1643010474979122e-302)
      

      The same rows inserted in a different order give the expected result:

      CREATE TABLE t1 (g GEOMETRY);
      INSERT INTO t1 VALUES (POINT(1,1)), (POINT(5,5)), (ST_GeomFromText('LINESTRING(0 0,1 1)'));
      SELECT ST_AsText(ST_Collect(g)) FROM t1;
      -- GEOMETRYCOLLECTION(POINT(1 1),POINT(5 5),LINESTRING(0 0,1 1))
      

      MySQL correctly returns a GEOMETRYCOLLECTION for both queries.

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            Gosselin Dave Gosselin
            Rucha Deodhar Rucha Deodhar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 0d
                0d
                Remaining:
                Time Spent - 1h Remaining Estimate - 0.5d
                0.5d
                Logged:
                Time Spent - 1h Remaining Estimate - 0.5d
                1h

                Git Integration

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