[MDEV-11304] SP do not preserve SRID Created: 2016-11-17  Updated: 2019-11-18

Status: Open
Project: MariaDB Server
Component/s: Data types, GIS
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: datatype

Issue Links:
Relates
relates to MDEV-9405 SP do not preserve geometry type Open
relates to MDEV-9425 Hybrid functions and UNION do not pre... Open
relates to MDEV-11303 MIN and MAX do not preserve GEOMETRY ... Open
Epic Link: Data type cleanups

 Description   

DROP FUNCTION IF EXISTS f1;
DROP TABLE IF EXISTS t1;
 
CREATE FUNCTION f1() RETURNS POINT REF_SYSTEM_ID=10 RETURN POINT(1,1);
CREATE OR REPLACE TABLE t1 SELECT f1() AS a;
SHOW CREATE TABLE t1;
SELECT G_TABLE_NAME,G_GEOMETRY_COLUMN,SRID FROM INFORMATION_SCHEMA.GEOMETRY_COLUMNS WHERE G_TABLE_NAME='t1';

+--------------+-------------------+------+
| G_TABLE_NAME | G_GEOMETRY_COLUMN | SRID |
+--------------+-------------------+------+
| t1           | a                 |    0 |
+--------------+-------------------+------+

The above looks wrong. The expected SRID value would be 10, as defined in the function return data type.


Generated at Thu Feb 08 07:48:55 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.