mysql 几何对象_MYSQL导入:无法从发送到GEOMETRY字段的数据中获取几何对象 (MYSQL import: Cannot get geometry object from data yo...

2015-12-16 11:45:55

3

I have recently upgraded to MySQL 5.7 and was trying to run a replication from 5.6 master. However the replication fails with the following error:

Error 'Cannot get geometry object from data you send to the GEOMETRY field' on query.

Turns out it also happens when I try to import data from the mysqldump. Table structure is as follows:

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;

It appears to me that the import is trying to insert some binary data into the polygon field but in fairness I have no idea how to make it work.

Any ideas?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值