diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2014-02-18 17:15:25 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2014-02-18 17:15:25 +0400 |
commit | 820b1a66870639951cdf7f1cbfef14c3ba889615 (patch) | |
tree | 6805bf0739b460beab3dd0da1d06565b92138e40 /sql/spatial.cc | |
parent | ccb54beb6dca11bc4cc438c00366acf35b35f815 (diff) | |
download | mariadb-git-820b1a66870639951cdf7f1cbfef14c3ba889615.tar.gz |
MDEV-5615 crash in Gcalc_function::add_operation.
The result is EMPTY for a buffer(line, -1), but we still
need one FALSE operation to be stored in the condition.
And we actually add it but forgot to alloc memory to store it.
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r-- | sql/spatial.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc index 8f74d4fa4a7..551c79d4d90 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -298,7 +298,8 @@ int Geometry::create_from_opresult(Geometry_buffer *g_buf, res->q_append((char) wkb_ndr); res->q_append(geom_type); - return obj->init_from_opresult(res, rr.result(), rr.length()); + return obj->init_from_opresult(res, rr.result(), rr.length()) == 0 && + rr.length(); } |