cookieY / Yearning

🐳 A most popular sql audit platform for mysql
http://next.yearning.io/
GNU Affero General Public License v3.0
8.43k stars 1.98k forks source link

[Question] 不支持mysql8的新类型POINT #1021

Open nicai12222 opened 5 months ago

nicai12222 commented 5 months ago

描述问题 不支持mysql8的新类型POINT

复现 重现该行为的步骤: CREATE TABLE aomi_article_position ( id bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键', position POINT NOT NULL SRID 4326 comment '位置坐标', PRIMARY KEY (id), spatial index spi_position (position) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC COMMENT = 'test表';

期望的结果 支持mysql8的新类型POINT

额外的日志信息

审核失败 | 2 | line 4 column 27 near "POINT NOT NULL SRID 4326 comment '位置坐标', PRIMARY KEY (`id`), spatial index `spi_position` (`position`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='test表';" | CREATE TABLE `aomi_article_position` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键', `position` POINT NOT NULL SRID 4326 comment '位置坐标', PRIMARY KEY (`id`), spatial index `spi_position` (`position`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='test表'; -- | -- | -- | --
Issues-translate-bot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: [Question] The new type POINT of mysql8 is not supported

Describe the problem The new type POINT of mysql8 is not supported

recurrent Steps to reproduce the behavior: CREATE TABLE aomi_article_position ( id bigint NOT NULL AUTO_INCREMENT COMMENT 'Auto-increment primary key', position POINT NOT NULL SRID 4326 comment 'position coordinates', PRIMARY KEY (id), spatial index spi_position (position) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC COMMENT = 'test table';

Desired results Support new type POINT of mysql8

Additional log information

Audit failed | 2 | line 4 column 27 near "POINT NOT NULL SRID 4326 comment 'position coordinate', PRIMARY KEY (`id`), spatial index `spi_position` (`position`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE= utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='test table';" | CREATE TABLE `aomi_article_position` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'Auto-increment primary key', `position` POINT NOT NULL SRID 4326 comment 'Position coordinates', PRIMARY KEY ( `id`), spatial index `spi_position` (`position`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='test table'; -- | -- | -- | --