diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2013-10-09 17:30:50 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2013-10-09 17:30:50 +0500 |
commit | ae826010351ab69a056034769124f3dac67a3de7 (patch) | |
tree | 64f6e223e617484c40af81e7e458daaa204587d6 /sql/spatial.cc | |
parent | c8693bea40c8d0d3f678e263c474ee82b193f62e (diff) | |
download | mariadb-git-ae826010351ab69a056034769124f3dac67a3de7.tar.gz |
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.
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r-- | sql/spatial.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc index 32a2012a49d..1d4051487ae 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -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); |