diff options
author | hf@deer.(none) <> | 2004-06-02 19:17:35 +0500 |
---|---|---|
committer | hf@deer.(none) <> | 2004-06-02 19:17:35 +0500 |
commit | b8cf9f6afead8bfedbab59598b96c5b0cb70a8ce (patch) | |
tree | ff05e5599bdcdb7f2d378d8130e42f7d8d5bea93 /sql/spatial.cc | |
parent | 4cb62eb0015da5df581ae8aa19e31eac8d8fe404 (diff) | |
parent | 7cf1d2596b0d01664d820cd22d315bf910d9d4d6 (diff) | |
download | mariadb-git-b8cf9f6afead8bfedbab59598b96c5b0cb70a8ce.tar.gz |
Merging
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r-- | sql/spatial.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc index 9769f6e7ca9..0668dd2faab 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -398,7 +398,7 @@ bool Gis_line_string::init_from_wkt(Gis_read_stream *trs, String *wkb) if (trs->skip_char(',')) // Didn't find ',' break; } - if (n_points < 2) + if (n_points < 1) { trs->set_error_msg("Too few points in LINESTRING"); return 1; @@ -487,6 +487,11 @@ int Gis_line_string::is_closed(int *closed) const if (no_data(data, 4)) return 1; n_points= uint4korr(data); + if (n_points == 1) + { + *closed=1; + return 0; + } data+= 4; if (no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points)) return 1; |