mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
MDEV-35103 CREATE TABLE AS SELECT ST_VALIDATE creates a column with datatype point, not geometry
Changes the type handler for geometry validate from 'point' to 'geometry'
This commit is contained in:
parent
6699c1a56b
commit
9eec22e263
3 changed files with 16 additions and 1 deletions
|
@ -397,3 +397,10 @@ SELECT ST_ISVALID(ST_GEOMFROMTEXT('POLYGON((-200 0,-207.99999999999997
|
|||
135.36742435621204,-208 1,-208 0,-208 -276.9111154485375,-200 0))')) c;
|
||||
c
|
||||
1
|
||||
#
|
||||
# MDEV-35103 CREATE TABLE AS SELECT ST_VALIDATE creates a column with datatype point, not geometry
|
||||
#
|
||||
create or replace table tb1 as SELECT st_validate(POINTFROMTEXT(' POINT( 4 1 ) ')) a;
|
||||
create or replace table tb1 as SELECT st_validate(ST_GeomFromText (' linestring( 4 1,4 4 ) ')) a;
|
||||
create table tb2 as SELECT (st_validate (ST_collect(( POINTFROMTEXT(' POINT( 4 1 ) ') )) )) a;
|
||||
drop table tb1, tb2;
|
||||
|
|
|
@ -379,3 +379,11 @@ SELECT ST_ISVALID(ST_GEOMFROMTEXT('POLYGON((72.8714768817168
|
|||
|
||||
SELECT ST_ISVALID(ST_GEOMFROMTEXT('POLYGON((-200 0,-207.99999999999997
|
||||
135.36742435621204,-208 1,-208 0,-208 -276.9111154485375,-200 0))')) c;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35103 CREATE TABLE AS SELECT ST_VALIDATE creates a column with datatype point, not geometry
|
||||
--echo #
|
||||
create or replace table tb1 as SELECT st_validate(POINTFROMTEXT(' POINT( 4 1 ) ')) a;
|
||||
create or replace table tb1 as SELECT st_validate(ST_GeomFromText (' linestring( 4 1,4 4 ) ')) a;
|
||||
create table tb2 as SELECT (st_validate (ST_collect(( POINTFROMTEXT(' POINT( 4 1 ) ') )) )) a;
|
||||
drop table tb1, tb2;
|
||||
|
|
|
@ -1060,7 +1060,7 @@ public:
|
|||
String *val_str(String *) override;
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
return &type_handler_point;
|
||||
return &type_handler_geometry;
|
||||
}
|
||||
Item *do_get_copy(THD *thd) const override
|
||||
{ return get_item_copy<Item_func_validate>(thd, this); }
|
||||
|
|
Loading…
Reference in a new issue