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
8c2a207d58
commit
79a1fdd964
@ -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;
|
135.36742435621204,-208 1,-208 0,-208 -276.9111154485375,-200 0))')) c;
|
||||||
c
|
c
|
||||||
1
|
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
|
SELECT ST_ISVALID(ST_GEOMFROMTEXT('POLYGON((-200 0,-207.99999999999997
|
||||||
135.36742435621204,-208 1,-208 0,-208 -276.9111154485375,-200 0))')) c;
|
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;
|
||||||
|
@ -1058,7 +1058,7 @@ public:
|
|||||||
String *val_str(String *) override;
|
String *val_str(String *) override;
|
||||||
const Type_handler *type_handler() const override
|
const Type_handler *type_handler() const override
|
||||||
{
|
{
|
||||||
return &type_handler_point;
|
return &type_handler_geometry;
|
||||||
}
|
}
|
||||||
Item *do_get_copy(THD *thd) const override
|
Item *do_get_copy(THD *thd) const override
|
||||||
{ return get_item_copy<Item_func_validate>(thd, this); }
|
{ return get_item_copy<Item_func_validate>(thd, this); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user