diff options
author | unknown <hf@deer.(none)> | 2004-06-02 19:17:35 +0500 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2004-06-02 19:17:35 +0500 |
commit | d55cb81cb0b89c14663e814a53b2fc69d0710580 (patch) | |
tree | ff05e5599bdcdb7f2d378d8130e42f7d8d5bea93 /sql/spatial.cc | |
parent | 911073ed99d8622b165c0ecd69bc1175431f829a (diff) | |
parent | 21dea7fc0b4412586765e45a6b900e380cef9a58 (diff) | |
download | mariadb-git-d55cb81cb0b89c14663e814a53b2fc69d0710580.tar.gz |
Merging
myisam/rt_index.c:
Auto merged
myisam/rt_index.h:
Auto merged
myisam/rt_mbr.c:
Auto merged
myisam/rt_mbr.h:
Auto merged
myisam/rt_split.c:
Auto merged
myisam/rt_test.c:
Auto merged
sql/spatial.cc:
Auto merged
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; |