summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-07-10 05:14:02 +0400
committerAlexander Barkov <bar@mariadb.com>2019-07-10 05:14:02 +0400
commitaca5532113714836e7d015c135a7f1a7ee8ca9d4 (patch)
tree82d50f4d7055fdaea1ad2c93d59c362aaf9cb404 /sql/item_create.cc
parentfeb2695ed39d24f8688d3decccfb767829e783fa (diff)
downloadmariadb-git-aca5532113714836e7d015c135a7f1a7ee8ca9d4.tar.gz
A cleanup `MDEV-19994 Add class Function_collection` (buildbot warnings)
plugin/versioning adds its own native functions by calling item_create_append(). So GIS functions initialized two times. Moving the initialization of GIS functions from item_create_append() to item_create_init().
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r--sql/item_create.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 5420ec7bf5f..7fabb90b5ef 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -5764,7 +5764,15 @@ int item_create_init()
MYF(0)))
DBUG_RETURN(1);
- DBUG_RETURN(item_create_append(func_array));
+ if (item_create_append(func_array))
+ DBUG_RETURN(1);
+
+#ifdef HAVE_SPATIAL
+ if (function_collection_geometry.init())
+ DBUG_RETURN(1);
+#endif
+
+ DBUG_RETURN(0);
}
int item_create_append(Native_func_registry array[])
@@ -5788,11 +5796,6 @@ int item_create_append(Native_func_registry array[])
}
#endif
-#ifdef HAVE_SPATIAL
- if (function_collection_geometry.init())
- DBUG_RETURN(1);
-#endif
-
DBUG_RETURN(0);
}