Bug #111745 POINT SRID 4326 not supported
Submitted: 13 Jul 2023 10:53 Modified: 21 Sep 2023 13:12
Reporter: Marcin Gil Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:8.0.33 OS:Windows (Microsoft Windows 10 Pro)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[13 Jul 2023 10:53] Marcin Gil
Description:
There is no way to specify a column type as "POINT SRID 4326".

How to repeat:
Try modelling a table with column type POINT SRID 4326 and a SPATIAL index.

Suggested fix:
Add an input field for column attributes other than DEFAULT.
[13 Jul 2023 11:38] Marcin Gil
Test case in SQL:

CREATE TABLE IF NOT EXISTS `locations` (
  `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(256) NOT NULL,
  `latitude` DECIMAL(10,8) NOT NULL,
  `longitude` DECIMAL(11,8) NOT NULL,
  `location` POINT SRID 4326 NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
  FULLTEXT INDEX `name` (`name`) VISIBLE,
  INDEX `latitude_longitude` (`latitude` ASC, `longitude` ASC) INVISIBLE,
  SPATIAL INDEX `location` (`location`) INVISIBLE)
ENGINE = InnoDB;

INSERT INTO `locations` (`id`, `name`, `latitude`, `longitude`, `location`) VALUES
(1, 'Eisenstadt (7000)', 47.84440844, 16.52665203, ST_GeomFromText(CONCAT('POINT(', latitude, ' ', longitude, ')'), 4326));
[13 Jul 2023 11:41] Marcin Gil
Test case in SQL (Fixed INVISIBLE -> VISIBLE).

CREATE TABLE IF NOT EXISTS `locations` (
  `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(256) NOT NULL,
  `latitude` DECIMAL(10,8) NOT NULL,
  `longitude` DECIMAL(11,8) NOT NULL,
  `location` POINT SRID 4326 NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
  FULLTEXT INDEX `name` (`name`) VISIBLE,
  INDEX `latitude_longitude` (`latitude` ASC, `longitude` ASC) VISIBLE,
  SPATIAL INDEX `location` (`location`) VISIBLE)
ENGINE = InnoDB;

INSERT INTO `locations` (`id`, `name`, `latitude`, `longitude`, `location`) VALUES
(1, 'Eisenstadt (7000)', 47.84440844, 16.52665203, ST_GeomFromText(CONCAT('POINT(', latitude, ' ', longitude, ')'), 4326));
[14 Sep 2023 13:19] MySQL Verification Team
Hello Marcin,

Thank you for the bug report.
Imho, this is not a bug. Please see the attached screenshot showing POINT is supported in MySQL Workbench Modeling.

Regards,
Ashwini Patil
[14 Sep 2023 13:19] MySQL Verification Team
8.0.33 test results

Attachment: 111745_test_results.png (image/png, text), 111.36 KiB.

[14 Sep 2023 13:55] Marcin Gil
Dear Team,

I am aware that POINT is supported, but the feature request is about adding support for attributes such as "SRID 4326".
The POINT type is mostly used together with SRID attribute, but at the moment it is not possible to model it in Workbench.

Thank you,
Marcin Gil
[21 Sep 2023 13:12] MySQL Verification Team
Hello Marcin,

Thank you for the reasonable feature request!

Regards,
Ashwini Patil