summaryrefslogtreecommitdiff
path: root/sql/item_geofunc.cc
diff options
context:
space:
mode:
authorSujatha <sujatha.sivakumar@mariadb.com>2020-09-28 17:55:39 +0530
committerSujatha <sujatha.sivakumar@mariadb.com>2020-09-28 17:55:39 +0530
commitce845b7a2fb3b86a1cc1a54a488ab7f16448d7c1 (patch)
tree767a910bb2d89a42a7ba3b05958340ec16d20b94 /sql/item_geofunc.cc
parent7edfb72efff18b7de7f22cd6dfd90b553e27c286 (diff)
parent6cbbd6bd96a8b5c97ec4d0b687aac29fb0f63a6a (diff)
downloadmariadb-git-ce845b7a2fb3b86a1cc1a54a488ab7f16448d7c1.tar.gz
Merge branch '10.3' into 10.4
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 ce52c6d246d..682051f2448 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;