1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
diff -aurN a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2015-06-17 10:54:11.000000000 -0400
+++ b/CMakeLists.txt 2015-06-24 10:34:17.314169100 -0400
@@ -354,8 +354,6 @@
MYSQL_CHECK_ZLIB_WITH_COMPRESS()
# Add bundled yassl/taocrypt or system openssl.
MYSQL_CHECK_SSL()
-# Add readline or libedit.
-MYSQL_CHECK_READLINE()
SET(MALLOC_LIBRARY "system")
CHECK_JEMALLOC()
@@ -394,22 +392,33 @@
CONFIGURE_PLUGINS()
ENDIF()
-ADD_SUBDIRECTORY(include)
+IF(NOT WITHOUT_CLIENTLIBS)
+ ADD_SUBDIRECTORY(include)
+ENDIF(NOT WITHOUT_CLIENTLIBS)
+
ADD_SUBDIRECTORY(dbug)
ADD_SUBDIRECTORY(strings)
ADD_SUBDIRECTORY(vio)
ADD_SUBDIRECTORY(mysys)
ADD_SUBDIRECTORY(mysys_ssl)
ADD_SUBDIRECTORY(libmysql)
-ADD_SUBDIRECTORY(client)
ADD_SUBDIRECTORY(extra)
ADD_SUBDIRECTORY(libservices)
ADD_SUBDIRECTORY(sql/share)
+IF(NOT WITHOUT_TOOLS)
+ # Add readline or libedit.
+ MYSQL_CHECK_READLINE()
+ ADD_SUBDIRECTORY(client)
+ENDIF(NOT WITHOUT_TOOLS)
+
IF(NOT WITHOUT_SERVER)
ADD_SUBDIRECTORY(tests)
ADD_SUBDIRECTORY(sql)
OPTION (WITH_EMBEDDED_SERVER "Compile MySQL with embedded server" OFF)
- IF(WITH_EMBEDDED_SERVER)
+ IF(WITH_EMBEDDED_SERVER)
+ IF(WITHOUT_TOOLS)
+ MYSQL_CHECK_READLINE()
+ ENDIF(WITHOUT_TOOLS)
ADD_SUBDIRECTORY(libmysqld)
ADD_SUBDIRECTORY(libmysqld/examples)
ENDIF(WITH_EMBEDDED_SERVER)
diff -aurN a/extra/CMakeLists.txt b/extra/CMakeLists.txt
--- a/extra/CMakeLists.txt 2015-06-17 10:54:11.000000000 -0400
+++ b/extra/CMakeLists.txt 2015-06-24 10:37:31.879169100 -0400
@@ -54,10 +54,15 @@
DEPENDS
${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp)
+IF(NOT WITHOUT_CLIENTLIBS)
MYSQL_ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
+MYSQL_ADD_EXECUTABLE(perror perror.c)
+ELSE(NOT WITHOUT_CLIENTLIBS)
+ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
+ADD_EXECUTABLE(perror perror.c)
+ENDIF(NOT WITHOUT_CLIENTLIBS)
TARGET_LINK_LIBRARIES(my_print_defaults mysys)
-MYSQL_ADD_EXECUTABLE(perror perror.c)
ADD_DEPENDENCIES(perror GenError)
TARGET_LINK_LIBRARIES(perror mysys)
diff -aurN a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
--- a/scripts/CMakeLists.txt 2015-06-24 10:28:12.800169100 -0400
+++ b/scripts/CMakeLists.txt 2015-06-24 10:42:49.682169100 -0400
@@ -327,6 +327,5 @@
# On Unix, most of the files end up in the bin directory
SET(BIN_SCRIPTS
msql2mysql
- mysql_config
mysql_setpermission
mysql_secure_installation
@@ -341,6 +340,12 @@
${WSREP_BINARIES}
${SYSTEMD_SCRIPTS}
)
+ IF(NOT WITHOUT_CLIENTLIBS)
+ SET(BIN_SCRIPTS
+ ${BIN_SCRIPTS}
+ mysql_config
+ )
+ ENDIF(NOT WITHOUT_CLIENTLIBS)
FOREACH(file ${BIN_SCRIPTS})
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
diff -aurN a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
--- a/libmysql/CMakeLists.txt 2015-06-24 12:32:11.606169100 -0400
+++ b/libmysql/CMakeLists.txt 2015-06-24 13:44:53.857169100 -0400
@@ -440,12 +440,12 @@
SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
ENDIF()
ENDMACRO()
- IF(ENABLE_STATIC_LIBS)
+ IF(ENABLE_STATIC_LIBS AND NOT WITHOUT_CLIENTLIBS)
INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development)
ENDIF()
ENDIF()
-IF(NOT DISABLE_SHARED)
+IF(NOT DISABLE_SHARED AND NOT WITHOUT_CLIENTLIBS)
MERGE_LIBRARIES(libmysql SHARED ${LIBS}
EXPORTS ${CLIENT_API_FUNCTIONS} ${CLIENT_API_5_1_EXTRA} ${CLIENT_API_5_5_EXTRA}
COMPONENT SharedLibraries)
diff -aurN a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
--- a/scripts/mysql_install_db.sh 2018-08-04 18:20:58.000000000 -0400
+++ b/scripts/mysql_install_db.sh 2018-08-09 12:23:28.707894151 -0400
@@ -280,10 +280,10 @@
print_defaults="$builddir/extra/my_print_defaults"
elif test -n "$basedir"
then
- print_defaults=`find_in_dirs my_print_defaults $basedir/bin $basedir/extra`
+ print_defaults=`find_in_dirs my_print_defaults $basedir/libexec/mariadb $basedir/bin $basedir/extra`
if test -z "$print_defaults"
then
- cannot_find_file my_print_defaults $basedir/bin $basedir/extra
+ cannot_find_file my_print_defaults $basedir/libexec/mariadb $basedir/bin $basedir/extra
exit 1
fi
else
diff -aurN a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh
--- a/scripts/wsrep_sst_common.sh 2018-08-04 18:20:58.000000000 -0400
+++ b/scripts/wsrep_sst_common.sh 2018-08-09 12:30:24.976706933 -0400
@@ -148,6 +148,7 @@
SCRIPTS_DIR="$(cd $(dirname "$0"); pwd -P)"
EXTRA_DIR="$SCRIPTS_DIR/../extra"
CLIENT_DIR="$SCRIPTS_DIR/../client"
+LIBEXEC_DIR="$SCRIPTS_DIR/../libexec/mariadb"
if [ -x "$CLIENT_DIR/mysql" ]; then
MYSQL_CLIENT="$CLIENT_DIR/mysql"
@@ -165,10 +166,12 @@
MYSQLDUMP=$(which mysqldump)
fi
+if [ -x "$LIBEXEC_DIR/my_print_defaults" ]; then
+ MY_PRINT_DEFAULTS="$LIBEXEC_DIR/my_print_defaults"
-if [ -x "$SCRIPTS_DIR/my_print_defaults" ]; then
+elif [ -x "$SCRIPTS_DIR/my_print_defaults" ]; then
MY_PRINT_DEFAULTS="$SCRIPTS_DIR/my_print_defaults"
elif [ -x "$EXTRA_DIR/my_print_defaults" ]; then
MY_PRINT_DEFAULTS="$EXTRA_DIR/my_print_defaults"
else
MY_PRINT_DEFAULTS=$(which my_print_defaults)
fi
diff -aurN a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
--- a/scripts/mysqld_safe.sh 2019-02-09 18:24:09.000000000 -0500
+++ b/scripts/mysqld_safe.sh 2019-03-05 15:30:25.455288087 -0500
@@ -133,7 +133,13 @@
}
find_in_bin() {
- if test -x "$MY_BASEDIR_VERSION/bin/$1"
+ if test -x "$MY_BASEDIR_VERSION/libexec/mariadb/$1"
+ then
+ echo "$MY_BASEDIR_VERSION/libexec/mariadb/$1"
+ elif test -x "@bindir@/../libexec/mariadb/$1"
+ then
+ echo "@bindir@/../libexec/mariadb/$1"
+ elif test -x "$MY_BASEDIR_VERSION/$1"
then
echo "$MY_BASEDIR_VERSION/bin/$1"
elif test -x "@bindir@/$1"
|