Commit ae826010 authored by Alexey Botchkov's avatar Alexey Botchkov

MDEV-3856 Import of a large polygon fails/hangs.

        The Gis_point::init_from_wkt called the String::realloc(),
        and this call is quite slow in the DEBUG mode. Which makes
        loading the huge polygon hang forever.
        Fixed by using the String::realloc(size, inc_size) version instead
        as it's done for other spatial features.
parent c8693bea
......@@ -480,7 +480,7 @@ bool Gis_point::init_from_wkt(Gis_read_stream *trs, String *wkb)
{
double x, y;
if (trs->get_next_number(&x) || trs->get_next_number(&y) ||
wkb->reserve(POINT_DATA_SIZE))
wkb->reserve(POINT_DATA_SIZE, 512))
return 1;
wkb->q_append(x);
wkb->q_append(y);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment