summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.cc
diff options
context:
space:
mode:
authorSujatha <sujatha.sivakumar@mariadb.com>2020-09-28 17:27:42 +0530
committerSujatha <sujatha.sivakumar@mariadb.com>2020-09-28 17:27:42 +0530
commit6cbbd6bd96a8b5c97ec4d0b687aac29fb0f63a6a (patch)
tree93d54c9fc71e2e76d1695cd5189bb8298c29d2e9 /sql/item_geofunc.cc
parenta6987d9fb921a6638bb1a2397b89ca606fad6f49 (diff)
parent842616532a76cd078ba1d526ae4b85d3ad4be069 (diff)
downloadmariadb-git-6cbbd6bd96a8b5c97ec4d0b687aac29fb0f63a6a.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r--sql/item_geofunc.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index 0744523592c..20ac6f0c88c 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2003, 2016, Oracle and/or its affiliates.
- Copyright (c) 2011, 2016, MariaDB
+ Copyright (c) 2011, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -447,16 +447,18 @@ String *Item_func_boundary::val_str(String *str_value)
DBUG_ASSERT(fixed == 1);
String arg_val;
String *swkb= args[0]->val_str(&arg_val);
+
+ if ((null_value= args[0]->null_value))
+ DBUG_RETURN(0);
+
Geometry_buffer buffer;
- Geometry *g;
uint32 srid= 0;
Transporter trn(&res_receiver);
-
- if ((null_value=
- args[0]->null_value ||
- !(g= Geometry::construct(&buffer, swkb->ptr(), swkb->length()))))
+
+ Geometry *g= Geometry::construct(&buffer, swkb->ptr(), swkb->length());
+ if (!g)
DBUG_RETURN(0);
-
+
if (g->store_shapes(&trn))
goto mem_error;