[MDEV-12830] CREATE TABLE t1 (<defs>) SELECT... does not preserve new geometry type Created: 2017-05-17  Updated: 2019-11-18

Status: Open
Project: MariaDB Server
Component/s: Data types, GIS
Affects Version/s: 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: datatype

Issue Links:
Relates
relates to MDEV-12828 CREATE TABLE t1 (<defs>) SELECT... do... Open
relates to MDEV-12829 CREATE TABLE t1 (<defs>) SELECT... do... Open
relates to MDEV-12831 CREATE TABLE t1 (<defs>) SELECT... do... Open
Epic Link: Data type cleanups

 Description   

DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (a POINT);
CREATE TABLE t2 (a GEOMETRY) AS SELECT * FROM t1;
SHOW CREATE TABLE t2;

+-------+-------------------------------------------------------------------------------------+
| Table | Create Table                                                                        |
+-------+-------------------------------------------------------------------------------------+
| t2    | CREATE TABLE `t2` (
  `a` point DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+-------+-------------------------------------------------------------------------------------+

The expected column type for t2.a should be GEOMETRY rather than POINT.


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