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

POLYGON not accepted in MULTIPOLYGON column (works on MySQL 5.6.36-82.0)

    XMLWordPrintable

Details

    • 10.1.29

    Description

      Mariadb does not accept a "POLYGON" in a "MULTIPOLYGON" table.
      MySql does and the spatial search tree is also functionnal.

      The MySql documentation says:
      "The other collection types (MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, and GEOMETRYCOLLECTION) restrict collection members to those having a particular geometry type." I guess that "particular geometry type" is interpreted as "one or more points, one or more linestrings, one or more polygons, ...).

      The following works with MySQL 5.6, not MariaDB. Compatibility is broken. This incompatibility is not listed (Incompatibilities 5.6).

      CREATE TABLE `geo_area` (
        `geo_area_id` int(11) NOT NULL AUTO_INCREMENT,
        `area_type_id` int(11) DEFAULT NULL,
        `bb_lat_min` decimal(9,6) DEFAULT NULL,
        `bb_lat_max` decimal(9,6) DEFAULT NULL,
        `bb_lon_min` decimal(9,6) DEFAULT NULL,
        `bb_lon_max` decimal(9,6) DEFAULT NULL,
        `geo_area_nominal` multipolygon NOT NULL,
        `geo_area_inner` multipolygon NOT NULL,
        `geo_area_outer` multipolygon NOT NULL,
        `distance` decimal(4,1) NOT NULL,
        `displayname` varchar(45) DEFAULT NULL,
        `description` varchar(255) DEFAULT NULL,
        `date_upd` datetime DEFAULT NULL ,
        `address` varchar(255) DEFAULT NULL ,
        `visibility` int(4) DEFAULT NULL,
        PRIMARY KEY (`geo_area_id`),
        SPATIAL KEY `inner_geom` (`geo_area_inner`),
        SPATIAL KEY `outer_geom` (`geo_area_outer`),
        SPATIAL KEY `nominal_geom` (`geo_area_nominal`)
      ) ENGINE=MyISAM AUTO_INCREMENT=5911 DEFAULT CHARSET=utf8;
       
      INSERT INTO `geo_area` VALUES (1,2,NULL,NULL,NULL,NULL,0x8C10000001030000000100000005000000A6E22F62179B004026DD8B3125824840BEE22F92309D00408798FED62D824840F9E22F42069F00406DE435F20B824840C3E22F52449C0040CAF60ACD01824840A6E22F62179B004026DD8B3125824840,0x8C10000001030000000100000005000000A6E22F62179B004026DD8B3125824840BEE22F92309D00408798FED62D824840F9E22F42069F00406DE435F20B824840C3E22F52449C0040CAF60ACD01824840A6E22F62179B004026DD8B3125824840,0x8C10000001030000000100000005000000A6E22F62179B004026DD8B3125824840BEE22F92309D00408798FED62D824840F9E22F42069F00406DE435F20B824840C3E22F52449C0040CAF60ACD01824840A6E22F62179B004026DD8B3125824840,10.0,'Dummy','',NULL,'Dummy',2) ;
       
      INSERT INTO `geo_area` VALUES (2,2,NULL,NULL,NULL,NULL,
      GeomFromText("POLYGON((2.0757281943191 49.016760056775,2.0767527981628 49.017023920359,2.0776486559738 49.015989567103,2.0763021870483 49.015679960588,2.0757281943191 49.016760056775))",4236),
      GeomFromText("POLYGON((2.0757281943191 49.016760056775,2.0767527981628 49.017023920359,2.0776486559738 49.015989567103,2.0763021870483 49.015679960588,2.0757281943191 49.016760056775))",4236),
      GeomFromText("POLYGON((2.0757281943191 49.016760056775,2.0767527981628 49.017023920359,2.0776486559738 49.015989567103,2.0763021870483 49.015679960588,2.0757281943191 49.016760056775))",4236),
      10.0,'Dummy','',NULL,'Dummy',2);
      

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            le_top Mario DE WEERD
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.