Skip to content

Commit c949772

Browse files
committed
Merge 10.6 into 10.7
2 parents 52505bf + 9ac1ac0 commit c949772

File tree

7 files changed

+44
-17
lines changed

7 files changed

+44
-17
lines changed

cmake/plugin.cmake

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,15 +285,20 @@ MACRO(MYSQL_ADD_PLUGIN)
285285
INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/${subpath}")
286286
ENDIF()
287287

288-
GET_TARGET_PROPERTY(plugin_type ${target} TYPE)
289-
STRING(REGEX REPLACE "_LIBRARY$" "" plugin_type ${plugin_type})
290-
STRING(REGEX REPLACE "^NO$" "" plugin_type ${plugin_type})
288+
IF(TARGET ${target})
289+
GET_TARGET_PROPERTY(plugin_type ${target} TYPE)
290+
STRING(REPLACE "_LIBRARY" "" plugin_type ${plugin_type})
291+
SET(have_target 1)
292+
ELSE()
293+
SET(plugin_type)
294+
SET(have_target 0)
295+
ENDIF()
291296
IF(ARG_STORAGE_ENGINE)
292-
ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Storage Engine ${plugin_type}")
297+
ADD_FEATURE_INFO(${plugin} ${have_target} "Storage Engine ${plugin_type}")
293298
ELSEIF(ARG_CLIENT)
294-
ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Client plugin ${plugin_type}")
299+
ADD_FEATURE_INFO(${plugin} ${have_target} "Client plugin ${plugin_type}")
295300
ELSE()
296-
ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Server plugin ${plugin_type}")
301+
ADD_FEATURE_INFO(${plugin} ${have_target} "Server plugin ${plugin_type}")
297302
ENDIF()
298303
ENDIF(NOT WITHOUT_SERVER OR ARG_CLIENT)
299304
ENDMACRO()

include/my_global.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@
2222

2323
/*
2424
MDEV-25602 Deprecate __WIN__ symbol.
25-
Temporarily, allow inside connect engine,
26-
until fixed in upstream.
2725
*/
28-
#ifndef connect_EXPORTS
29-
#ifdef _MSC_VER
26+
#if defined (_MSC_VER) && !defined(__clang__)
3027
#pragma deprecated("__WIN__")
3128
#elif defined (__GNUC__)
3229
#pragma GCC poison __WIN__
3330
#endif
34-
#endif
3531

3632
/*
3733
InnoDB depends on some MySQL internals which other plugins should not

mysql-test/main/func_group.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#
22
# simple test of all group functions
33
#
4+
if (`SELECT $PS_PROTOCOL != 0`)
5+
{
6+
--skip Test temporarily disabled for ps-protocol
7+
}
48

59
--disable_warnings
610
drop table if exists t1,t2,t3,t4,t5,t6;

plugin/auth_socket/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,21 @@ IF (HAVE_XUCRED)
5757
SET(ok 1)
5858
ELSE()
5959

60+
# NetBSD, is that you?
61+
CHECK_CXX_SOURCE_COMPILES(
62+
"#include <sys/un.h>
63+
#include <sys/socket.h>
64+
int main() {
65+
struct unpcbid unp;
66+
socklen_t unpl = sizeof(unp);
67+
getsockopt(0, 0, LOCAL_PEEREID, &unp, &unpl);
68+
}" HAVE_UNPCBID)
69+
70+
IF (HAVE_UNPCBID)
71+
ADD_DEFINITIONS(-DHAVE_UNPCBID)
72+
SET(ok 1)
73+
ELSE()
74+
6075
# illumos, is that you?
6176
CHECK_CXX_SOURCE_COMPILES(
6277
"#include <ucred.h>
@@ -104,6 +119,7 @@ ENDIF()
104119
ENDIF()
105120
ENDIF()
106121
ENDIF()
122+
ENDIF()
107123

108124
IF(ok)
109125
MYSQL_ADD_PLUGIN(auth_socket auth_socket.c DEFAULT)

plugin/auth_socket/auth_socket.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@
4747
#define uid cr_uid
4848
#define ucred xucred
4949

50+
#elif defined HAVE_UNPCBID
51+
#include <sys/un.h>
52+
#define level 0
53+
#define SO_PEERCRED LOCAL_PEEREID
54+
#define uid unp_euid
55+
#define ucred unpcbid
56+
5057
#elif defined HAVE_GETPEERUCRED
5158
#include <ucred.h>
5259

storage/connect/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ IF(UNIX)
7272
get_property(inc_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
7373
SET(CONNECT_SOURCES ${CONNECT_SOURCES} inihandl.cpp)
7474
SET(IPHLPAPI_LIBRARY "")
75-
ELSE(NOT UNIX)
75+
ELSE()
7676
SET(CONNECT_SOURCES ${CONNECT_SOURCES}
7777
tabwmi.cpp tabwmi.h tabmac.cpp tabmac.h macutil.cpp macutil.h)
7878
# Add exception handling to the CONNECT project)
@@ -82,8 +82,7 @@ ELSE(NOT UNIX)
8282
# Connect does not work with clang-cl
8383
RETURN()
8484
ENDIF()
85-
add_definitions(-D__WIN__)
86-
ENDIF(UNIX)
85+
ENDIF()
8786

8887

8988
#

storage/connect/noconst.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#include <mysqld.h>
66
#include <string.h>
77

8-
#if defined(__WIN__)
8+
#if defined(_WIN32)
99
#define DllExport __declspec( dllexport )
10-
#else // !__WIN__
10+
#else // !_WIN32
1111
#define DllExport
12-
#endif // !__WIN__
12+
#endif // !_WIN32
1313

1414
extern "C" {
1515
DllExport my_bool noconst_init(UDF_INIT*, UDF_ARGS*, char*);

0 commit comments

Comments
 (0)