[MDEV-11303] MIN and MAX do not preserve GEOMETRY data type Created: 2016-11-17  Updated: 2018-06-21

Status: Open
Project: MariaDB Server
Component/s: GIS
Affects Version/s: 5.5, 10.0, 10.1, 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: None

Issue Links:
Relates
relates to MDEV-9425 Hybrid functions and UNION do not pre... Open
relates to MDEV-9405 SP do not preserve geometry type Open
relates to MDEV-11304 SP do not preserve SRID Open

 Description   

MIN and MAX do not preserve the GEOMETRY and create a LONGBLOB instead:

CREATE OR REPLACE TABLE t1 AS SELECT MAX(POINT(1,1)) AS p;
SHOW CREATE TABLE t1;

CREATE OR REPLACE TABLE t1 AS SELECT MAX((SELECT POINT(1,1))) AS p;
SHOW CREATE TABLE t1;

Both return:

+-------+---------------------------------------------------------------------------+
| Table | Create Table                                                              |
+-------+---------------------------------------------------------------------------+
| t1    | CREATE TABLE `t1` (
  `p` longblob
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+-------+---------------------------------------------------------------------------+


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