From d4ef92d43a4bd1c055b388e2f4a40d6093f93f0d Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Tue, 21 Jul 2015 21:50:46 +0200 Subject: [PATCH] Adding FIELD_TYPE_GEOMETRY as binary type fixes the issue of the UnicodeDecodeError and makes geometry types usable. --- _mysql.c | 1 + 1 file changed, 1 insertion(+) diff --git a/_mysql.c b/_mysql.c index 1806cc5..5d3f572 100644 --- a/_mysql.c +++ b/_mysql.c @@ -1373,6 +1373,7 @@ _mysql_field_to_python( field_type == FIELD_TYPE_BLOB || field_type == FIELD_TYPE_VAR_STRING || field_type == FIELD_TYPE_STRING || + field_type == FIELD_TYPE_GEOMETRY || field_type == FIELD_TYPE_BIT) { binary = 1; }