summaryrefslogtreecommitdiff
path: root/sql/spatial.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-05-17 12:12:33 +0200
committerSergei Golubchik <sergii@pisem.net>2012-05-17 12:12:33 +0200
commit0a8c9b98f60bb1a21c7e67a1bb47166f0acfeddb (patch)
tree7e682617fcbdab399d2eafccb6a4800dfdc71e51 /sql/spatial.cc
parent97ae1682f185be05276b172919e47fd86e9fd953 (diff)
parentdf905524b218de07dddf5fa394af96edcc4ca483 (diff)
downloadmariadb-git-0a8c9b98f60bb1a21c7e67a1bb47166f0acfeddb.tar.gz
merge with mysql-5.1.63
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r--sql/spatial.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc
index 6e2e03bf5bb..783d37ada48 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -627,7 +627,8 @@ int Gis_line_string::is_closed(int *closed) const
return 0;
}
data+= 4;
- if (no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
+ if (n_points == 0 ||
+ no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
return 1;
/* Get first point */