Uploaded image for project: 'MariaDB Server'
  1. MDEV-5481

mysqldump fails to dump geometry types properly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 5.5.33a
    • Fix versions: 5.5.36
    • Components: None
    • Environment:
      Debian Linux (Wheezy)
    • Sprint:

      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;

        Attachments

          Activity

            People

            • Assignee:
              holyfoot Alexey Botchkov
              Reporter:
              ggiraudon ggiraudonc
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h