我最近升级到 MySQL 5.7,并尝试从 5.6 master 运行复制。但是复制失败并出现以下错误:
Error 'Cannot get geometry object from data you send to the GEOMETRY field' on query.
事实证明,当我尝试从 mysqldump 导入数据时也会发生这种情况。表结构如下:
CREATE TABLE `locations` (
`location_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`country_id` int(10) unsigned NOT NULL,
`name` varchar(100) CHARACTER SET utf8 NOT NULL,
`locations_type_id` int(11) unsigned NOT NULL,
`parent_id` int(11) unsigned DEFAULT NULL,
`importance` decimal(3,2) NOT NULL DEFAULT '1.00',
`lat` decimal(10,7) DEFAULT NULL,
`lng` decimal(10,7) DEFAULT NULL,
`radius` decimal(6,3) DEFAULT NULL,
`polygon` polygon DEFAULT NULL,
PRIMARY KEY (`location_id`),
KEY `name` (`name`,`locations_type_id`,`parent_id`,`lat`,`lng`),
KEY `locations_type_id` (`locations_type_id`),
KEY `name_2` (`name`(8)),
KEY `country_id` (`country_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
在我看来,导入正在尝试将一些二进制数据插入多边形字段,但公平地说,我不知道如何使其工作。
有任何想法吗?