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

CREATE TABLE AS SELECT ST_VALIDATE creates a column with datatype point, not geometry

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • None
    • 11.8
    • GIS
    • None

    Description

      MariaDB [test]> create or replace table tb1 as SELECT  st_validate(POINTFROMTEXT(' POINT( 4 1 ) '))   a  ;
      Query OK, 1 row affected (0,070 sec)
      Records: 1  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> show create table tb1;   
      +-------+---------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                        |
      +-------+---------------------------------------------------------------------------------------------------------------------+
      | tb1   | CREATE TABLE `tb1` (
        `a` point DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci |
      +-------+---------------------------------------------------------------------------------------------------------------------+
      1 row in set (0,001 sec)
       
      MariaDB [test]> create or replace table tb1 as SELECT  st_validate(ST_GeomFromText (' linestring( 4 1,4 4 ) '))   a  ;
      ERROR 1366 (22007): Incorrect POINT value: 'LINESTRING(4 1,4 4)' for column `test`.`tb1`.`a` at row 1
       
      MariaDB [test]>  SELECT (st_validate (ST_collect(( POINTFROMTEXT(' POINT( 4 1 ) ') ))  ))  a ;
      +------------------------------------+
      | a                                  |
      +------------------------------------+
      |                    @      �?  |
      +------------------------------------+
      1 row in set (0,001 sec)
       
      MariaDB [test]> create table tb2 as  SELECT (st_validate (ST_collect(( POINTFROMTEXT(' POINT( 4 1 ) ') ))  ))  a ;
      ERROR 1366 (22007): Incorrect POINT value: 'MULTIPOINT(4 1)' for column `test`.`tb2`.`a` at row 1
      
      

      Attachments

        Issue Links

          Activity

            People

              Gosselin Dave Gosselin
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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