From d2503a04ee18eeb2c0b5b0056d600955f15958e1 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 13 Jan 2003 16:36:04 +0400 Subject: [PATCH] Fix for spatial objects --- sql/item_strfunc.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 7818a23fcd8..963dd6968f4 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2771,10 +2771,8 @@ String *Item_func_spatial_collection::val_str(String *str) uint32 n_points; double x1, y1, x2, y2; - if (len < WKB_HEADER_SIZE + 4 + 8 + 8) + if (len < 4 + 2 * POINT_DATA_SIZE) goto ret; - data+=WKB_HEADER_SIZE; - len-=WKB_HEADER_SIZE; uint32 llen=len; const char *ldata=data; @@ -2786,10 +2784,6 @@ String *Item_func_spatial_collection::val_str(String *str) float8get(y1,data); data+=8; - len-= 4 + 8 + 8; - - if (len < n_points * POINT_DATA_SIZE) - goto ret; data+=(n_points-2) * POINT_DATA_SIZE; float8get(x2,data);