Details
Description
When backing up a database with MYSQL_TYPE_GEOMETRY fields, mysqldump will output those fields in binary format by default. This causes issues upon restore.
The typical error returned by mysql when restoring such a dump is :
"Cannot get GEOMETRY object from the data you send to the Geometry field".
Using the --hex-blob option fails to treat GEOMETRY types as blobs.
A simple solution is to change the following line in mysqldump.c
field->type == MYSQL_TYPE_TINY_BLOB)) ? 1 : 0;
for
field->type == MYSQL_TYPE_TINY_BLOB ||
field->type == MYSQL_TYPE_GEOMETRY)) ? 1 : 0;
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Hi,
Could you please provide an example of the data which triggers the error? It would be useful for testing.
I tried some primitive values and didn't get into any trouble, so apparently it does not happen always.