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.
This commit is contained in:
Alexey Botchkov 2014-02-18 17:15:25 +04:00
commit 820b1a6687
4 changed files with 12 additions and 3 deletions

View file

@ -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();
}