Skip to content

Commit 6f47a5a

Browse files
author
Steinar H. Gunderson
committed
Bug #25764817: CLEAN UP THE UDF EXAMPLE
Clean up the UDF example to remove some unneeded code and use of headers internal to MySQL. Change-Id: Ic7432fb139bd0f04660204eef50e5adc347f317d
1 parent f3bfd5f commit 6f47a5a

File tree

6 files changed

+124
-195
lines changed

6 files changed

+124
-195
lines changed

cmake/os/SunOS.cmake

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -140,28 +140,6 @@ CHECK_C_SOURCE_RUNS(
140140
}
141141
" HAVE_SOLARIS_ATOMIC)
142142

143-
CHECK_CXX_SOURCE_COMPILES("
144-
#undef inline
145-
#if !defined(_REENTRANT)
146-
#define _REENTRANT
147-
#endif
148-
#include <pthread.h>
149-
#include <sys/types.h>
150-
#include <sys/socket.h>
151-
#include <netinet/in.h>
152-
#include <arpa/inet.h>
153-
#include <netdb.h>
154-
int main()
155-
{
156-
157-
struct hostent *foo =
158-
gethostbyaddr_r((const char *) 0,
159-
0, 0, (struct hostent *) 0, (char *) NULL, 0, (int *)0);
160-
return 0;
161-
}
162-
"
163-
HAVE_SOLARIS_STYLE_GETHOST)
164-
165143
# Check is special processor flag needs to be set on older GCC
166144
#that defaults to v8 sparc . Code here is taken from my_rdtsc.c
167145
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SIZEOF_VOID_P EQUAL 4

cmake/os/WindowsCache.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -87,7 +87,6 @@ SET(HAVE_DECL_FDATASYNC CACHE INTERNAL "")
8787
SET(HAVE_FEDISABLEEXCEPT CACHE INTERNAL "")
8888
SET(HAVE_FSEEKO CACHE INTERNAL "")
8989
SET(HAVE_FSYNC CACHE INTERNAL "")
90-
SET(HAVE_GETHOSTBYADDR_R CACHE INTERNAL "")
9190
SET(HAVE_GETHRTIME CACHE INTERNAL "")
9291
# Check needed HAVE_GETNAMEINFO
9392
SET(HAVE_GETPASS CACHE INTERNAL "")

config.h.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
#cmakedefine HAVE_FEDISABLEEXCEPT 1
8686
#cmakedefine HAVE_FSEEKO 1
8787
#cmakedefine HAVE_FSYNC 1
88-
#cmakedefine HAVE_GETHOSTBYADDR_R 1
8988
#cmakedefine HAVE_GETHRTIME 1
9089
#cmakedefine HAVE_GETNAMEINFO 1
9190
#cmakedefine HAVE_GETPASS 1
@@ -216,7 +215,6 @@
216215
#cmakedefine HAVE_LINUX_LARGE_PAGES 1
217216
#cmakedefine HAVE_SOLARIS_LARGE_PAGES 1
218217
#cmakedefine HAVE_SOLARIS_ATOMIC 1
219-
#cmakedefine HAVE_SOLARIS_STYLE_GETHOST 1
220218
#define SYSTEM_TYPE "@SYSTEM_TYPE@"
221219
/* This should mean case insensitive file system */
222220
#cmakedefine FN_NO_CASE_SENSE 1

configure.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ CHECK_SYMBOL_EXISTS(fdatasync "unistd.h" HAVE_DECL_FDATASYNC)
361361
CHECK_FUNCTION_EXISTS (fedisableexcept HAVE_FEDISABLEEXCEPT)
362362
CHECK_FUNCTION_EXISTS (fseeko HAVE_FSEEKO)
363363
CHECK_FUNCTION_EXISTS (fsync HAVE_FSYNC)
364-
CHECK_FUNCTION_EXISTS (gethostbyaddr_r HAVE_GETHOSTBYADDR_R)
365364
CHECK_FUNCTION_EXISTS (gethrtime HAVE_GETHRTIME)
366365
CHECK_FUNCTION_EXISTS (getnameinfo HAVE_GETNAMEINFO)
367366
CHECK_FUNCTION_EXISTS (getpass HAVE_GETPASS)

mysql-test/t/udf.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
--source include/have_udf.inc
22
#
3-
# To run this tests the "sql/udf_example.c" need to be compiled into
3+
# To run this test, "sql/udf_example.cc" need to be compiled into
44
# udf_example.so and LD_LIBRARY_PATH should be setup to point out where
5-
# the library are.
5+
# the library are. The regular CMake build system takes care of this
6+
# automatically.
67
#
78

89

0 commit comments

Comments
 (0)