Skip to content

Commit 7e29c1b

Browse files
author
Sergei Golubchik
committed
5.5 merge
2 parents 1e3e81a + 33656e0 commit 7e29c1b

File tree

610 files changed

+19754
-57479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

610 files changed

+19754
-57479
lines changed

.bzrignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@ storage/tokudb/ft-index/portability/tests/try-uninit
14361436
storage/tokudb/ft-index/src/merge_archives_tokufractaltree_static.cmake
14371437
storage/tokudb/ft-index/src/tokufractaltree_static_depends.cc
14381438
storage/tokudb/ft-index/src/tests/recovery_fileops_unit_dir
1439-
storage/tokudb/ft-index/portability/toku_config.h
1439+
storage/tokudb/ft-index/toku_include/toku_config.h
14401440
storage/tokudb/ft-index/util/tests/marked-omt-test
14411441
storage/tokudb/ft-index/util/tests/omt-tmpl-test
14421442
storage/tokudb/ft-index/util/tests/sort-tmpl-test
@@ -1450,9 +1450,9 @@ storage/tokudb/ft-index/util/tests/test_partitioned_counter
14501450
storage/tokudb/ft-index/util/tests/test_partitioned_counter_5833
14511451
storage/tokudb/ft-index/util/tests/threadpool-test
14521452
storage/tokudb/ft-index/util/tests/threadpool-testrunf
1453-
storage/tokudb/ft-index/tools/tokudb_dump
1454-
storage/tokudb/ft-index/tools/tokudb_gen
1455-
storage/tokudb/ft-index/tools/tokudb_load
1453+
storage/tokudb/ft-index/utils/tokudb_dump
1454+
storage/tokudb/ft-index/utils/tokudb_gen
1455+
storage/tokudb/ft-index/utils/tokudb_load
14561456
storage/connect/connect.cnf
14571457
storage/cassandra/cassandra.cnf
14581458
libmysql/libmysql_versions.ld

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,10 @@ ADD_CUSTOM_TARGET(INFO_BIN ALL
508508

509509
INSTALL_DOCUMENTATION(README CREDITS COPYING COPYING.LESSER EXCEPTIONS-CLIENT
510510
COMPONENT Readme)
511-
INSTALL_DOCUMENTATION(${CMAKE_BINARY_DIR}/Docs/INFO_SRC
512-
${CMAKE_BINARY_DIR}/Docs/INFO_BIN)
511+
512+
# MDEV-6526 these files are not installed anymore
513+
#INSTALL_DOCUMENTATION(${CMAKE_BINARY_DIR}/Docs/INFO_SRC
514+
# ${CMAKE_BINARY_DIR}/Docs/INFO_BIN)
513515

514516
IF(UNIX)
515517
INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY COMPONENT Readme)

client/mysql.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ extern "C" {
9090
#if defined(__WIN__)
9191
#include <conio.h>
9292
#else
93-
#include <readline/readline.h>
93+
#include <readline.h>
9494
#define HAVE_READLINE
9595
#define USE_POPEN
9696
#endif

cmake/build_configurations/mysql_release.cmake

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,9 @@ ENDIF()
122122

123123
IF(UNIX)
124124
SET(WITH_EXTRA_CHARSETS all CACHE STRING "")
125-
IF(EXISTS "${CMAKE_SOURCE_DIR}/COPYING")
126-
OPTION(WITH_READLINE "" ON)
127-
ELSE()
128-
OPTION(WITH_LIBEDIT "" ON)
129-
ENDIF()
130-
131125

132126
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
127+
SET(WITH_JEMALLOC "yes" CACHE STRING "")
133128

134129
IF(NOT IGNORE_AIO_CHECK)
135130
# Ensure aio is available on Linux (required by InnoDB)

cmake/jemalloc.cmake

Lines changed: 11 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,24 @@
1-
# old cmake does not have ExternalProject file
2-
IF(CMAKE_VERSION VERSION_LESS "2.8.6")
3-
MACRO (CHECK_JEMALLOC)
4-
ENDMACRO()
5-
RETURN()
6-
ENDIF()
1+
INCLUDE (CheckLibraryExists)
72

8-
INCLUDE(ExternalProject)
3+
SET(WITH_JEMALLOC auto CACHE STRING
4+
"Build with jemalloc. Possible values are 'yes', 'no', 'auto'")
95

10-
MACRO (USE_BUNDLED_JEMALLOC)
11-
SET(SOURCE_DIR "${CMAKE_SOURCE_DIR}/extra/jemalloc")
12-
SET(BINARY_DIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/extra/jemalloc/build")
13-
SET(LIBJEMALLOC "libjemalloc")
14-
SET(JEMALLOC_CONFIGURE_OPTS "CC=${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}" "--with-private-namespace=jemalloc_internal_" "--enable-cc-silence")
15-
IF (CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT APPLE) # see the comment in CMakeLists.txt
16-
LIST(APPEND JEMALLOC_CONFIGURE_OPTS --enable-debug)
6+
MACRO (CHECK_JEMALLOC)
7+
# compatibility with old WITH_JEMALLOC values
8+
IF(WITH_JEMALLOC STREQUAL "bundled")
9+
MESSAGE(FATAL_ERROR "MariaDB no longer bundles jemalloc")
1710
ENDIF()
18-
19-
IF(CMAKE_GENERATOR MATCHES "Makefiles")
20-
SET(MAKE_COMMAND ${CMAKE_MAKE_PROGRAM})
21-
ELSE() # Xcode/Ninja generators
22-
SET(MAKE_COMMAND make)
11+
IF(WITH_JEMALLOC STREQUAL "system")
12+
SET(WITH_JEMALLOC "yes")
2313
ENDIF()
24-
25-
ExternalProject_Add(jemalloc
26-
PREFIX extra/jemalloc
27-
SOURCE_DIR ${SOURCE_DIR}
28-
BINARY_DIR ${BINARY_DIR}
29-
STAMP_DIR ${BINARY_DIR}
30-
CONFIGURE_COMMAND "${SOURCE_DIR}/configure" ${JEMALLOC_CONFIGURE_OPTS}
31-
BUILD_COMMAND ${MAKE_COMMAND} "build_lib_static"
32-
INSTALL_COMMAND ""
33-
)
34-
ADD_LIBRARY(libjemalloc STATIC IMPORTED)
35-
SET_TARGET_PROPERTIES(libjemalloc PROPERTIES IMPORTED_LOCATION "${BINARY_DIR}/lib/libjemalloc_pic.a")
36-
ADD_DEPENDENCIES(libjemalloc jemalloc)
37-
ENDMACRO()
38-
39-
IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR APPLE)
40-
# Linux and OSX are the only systems where bundled jemalloc can be built without problems,
41-
# as they both have GNU make and jemalloc actually compiles.
42-
# Also, BSDs use jemalloc as malloc already
43-
SET(WITH_JEMALLOC_DEFAULT "yes")
44-
ELSE()
45-
SET(WITH_JEMALLOC_DEFAULT "no")
46-
ENDIF()
4714

48-
SET(WITH_JEMALLOC ${WITH_JEMALLOC_DEFAULT} CACHE STRING
49-
"Which jemalloc to use. Possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)")
50-
51-
MACRO (CHECK_JEMALLOC)
52-
IF(WITH_JEMALLOC STREQUAL "system" OR WITH_JEMALLOC STREQUAL "yes")
15+
IF(WITH_JEMALLOC STREQUAL "yes" OR WITH_JEMALLOC STREQUAL "auto")
5316
CHECK_LIBRARY_EXISTS(jemalloc malloc_stats_print "" HAVE_JEMALLOC)
5417
IF (HAVE_JEMALLOC)
5518
SET(LIBJEMALLOC jemalloc)
5619
SET(MALLOC_LIBRARY "system jemalloc")
57-
ELSEIF (WITH_JEMALLOC STREQUAL "system")
58-
MESSAGE(FATAL_ERROR "system jemalloc is not found")
5920
ELSEIF (WITH_JEMALLOC STREQUAL "yes")
60-
SET(trybundled 1)
21+
MESSAGE(FATAL_ERROR "jemalloc is not found")
6122
ENDIF()
6223
ENDIF()
63-
IF(WITH_JEMALLOC STREQUAL "bundled" OR trybundled)
64-
USE_BUNDLED_JEMALLOC()
65-
SET(MALLOC_LIBRARY "bundled jemalloc")
66-
ENDIF()
6724
ENDMACRO()

cmake/readline.cmake

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -116,44 +116,33 @@ ENDMACRO()
116116
MACRO (MYSQL_USE_BUNDLED_READLINE)
117117
SET(USE_NEW_READLINE_INTERFACE 1)
118118
SET(HAVE_HIST_ENTRY 0 CACHE INTERNAL "" FORCE)
119-
SET(READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils)
120-
SET(READLINE_LIBRARY readline)
119+
SET(MY_READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils/readline)
120+
SET(MY_READLINE_LIBRARY readline)
121121
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmd-line-utils/readline)
122122
ENDMACRO()
123123

124124
MACRO (MYSQL_FIND_SYSTEM_READLINE)
125125

126-
FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h )
126+
FIND_PATH(READLINE_INCLUDE_DIR readline.h PATH_SUFFIXES readline)
127127
FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
128128
MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY)
129129

130-
SET(CMAKE_REQUIRES_LIBRARIES ${READLINE_LIBRARY} ${CURSES_LIBRARY})
131-
132130
IF(READLINE_LIBRARY AND READLINE_INCLUDE_DIR)
133131
SET(CMAKE_REQUIRED_LIBRARIES ${READLINE_LIBRARY} ${CURSES_LIBRARY})
132+
SET(CMAKE_REQUIRED_INCLUDES ${READLINE_INCLUDE_DIR})
134133
CHECK_CXX_SOURCE_COMPILES("
135134
#include <stdio.h>
136-
#include <readline/readline.h>
135+
#include <readline.h>
137136
int main(int argc, char **argv)
138137
{
139138
rl_completion_func_t *func1= (rl_completion_func_t*)0;
140139
rl_compentry_func_t *func2= (rl_compentry_func_t*)0;
141140
}"
142141
NEW_READLINE_INTERFACE)
143142

144-
CHECK_CXX_SOURCE_COMPILES("
145-
#include <stdio.h>
146-
#include <readline/readline.h>
147-
int main(int argc, char **argv)
148-
{
149-
HIST_ENTRY entry;
150-
return 0;
151-
}"
152-
HAVE_HIST_ENTRY)
153-
154143
CHECK_C_SOURCE_COMPILES("
155144
#include <stdio.h>
156-
#include <readline/readline.h>
145+
#include <readline.h>
157146
#if RL_VERSION_MAJOR > 5
158147
#error
159148
#endif
@@ -176,30 +165,27 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE)
176165
ENDIF(READLINE_V5)
177166
ENDIF(NEW_READLINE_INTERFACE)
178167
ENDIF()
179-
SET(CMAKE_REQUIRES_LIBRARIES )
180168
ENDMACRO()
181169

182170
MACRO (MYSQL_FIND_SYSTEM_LIBEDIT)
183-
184-
FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h )
185-
FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
186-
MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY)
187-
188-
SET(CMAKE_REQUIRES_LIBRARIES ${READLINE_LIBRARY})
171+
FIND_PATH(LIBEDIT_INCLUDE_DIR readline.h PATH_SUFFIXES editline edit/readline)
172+
FIND_LIBRARY(LIBEDIT_LIBRARY edit)
173+
MARK_AS_ADVANCED(LIBEDIT_INCLUDE_DIR LIBEDIT_LIBRARY)
189174

190-
IF(READLINE_LIBRARY AND READLINE_INCLUDE_DIR)
175+
IF(LIBEDIT_LIBRARY AND LIBEDIT_INCLUDE_DIR)
176+
SET(CMAKE_REQUIRED_LIBRARIES ${LIBEDIT_LIBRARY})
177+
SET(CMAKE_REQUIRED_INCLUDES ${LIBEDIT_INCLUDE_DIR})
191178
CHECK_CXX_SOURCE_COMPILES("
192179
#include <stdio.h>
193-
#include <readline/readline.h>
180+
#include <readline.h>
194181
int main(int argc, char **argv)
195182
{
196-
char res= *(*rl_completion_entry_function)(0,0);
183+
int res= (*rl_completion_entry_function)(0,0);
197184
completion_matches(0,0);
198185
}"
199186
LIBEDIT_INTERFACE)
200187
SET(USE_LIBEDIT_INTERFACE ${LIBEDIT_INTERFACE})
201188
ENDIF()
202-
SET(CMAKE_REQUIRES_LIBRARIES)
203189
ENDMACRO()
204190

205191

@@ -216,15 +202,33 @@ MACRO (MYSQL_CHECK_READLINE)
216202
IF (NOT APPLE)
217203
MYSQL_FIND_SYSTEM_READLINE()
218204
ENDIF()
219-
IF(NOT USE_NEW_READLINE_INTERFACE)
205+
IF(USE_NEW_READLINE_INTERFACE)
206+
SET(MY_READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR})
207+
SET(MY_READLINE_LIBRARY ${READLINE_LIBRARY} ${CURSES_LIBRARY})
208+
ELSE()
220209
MYSQL_FIND_SYSTEM_LIBEDIT()
221-
IF(NOT USE_LIBEDIT_INTERFACE)
210+
IF(USE_LIBEDIT_INTERFACE)
211+
SET(MY_READLINE_INCLUDE_DIR ${LIBEDIT_INCLUDE_DIR})
212+
SET(MY_READLINE_LIBRARY ${LIBEDIT_LIBRARY} ${CURSES_LIBRARY})
213+
ELSE()
222214
MYSQL_USE_BUNDLED_READLINE()
223215
ENDIF()
224216
ENDIF()
225217
ENDIF()
226-
SET(MY_READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR})
227-
SET(MY_READLINE_LIBRARY ${READLINE_LIBRARY} ${CURSES_LIBRARY})
218+
219+
SET(CMAKE_REQUIRED_LIBRARIES ${MY_READLINE_LIBRARY})
220+
SET(CMAKE_REQUIRED_INCLUDES ${MY_READLINE_INCLUDE_DIR})
221+
CHECK_CXX_SOURCE_COMPILES("
222+
#include <stdio.h>
223+
#include <readline.h>
224+
int main(int argc, char **argv)
225+
{
226+
HIST_ENTRY entry;
227+
return 0;
228+
}"
229+
HAVE_HIST_ENTRY)
230+
SET(CMAKE_REQUIRED_LIBRARIES)
231+
SET(CMAKE_REQUIRED_INCLUDES)
228232
ENDIF(NOT WIN32)
229233
ENDMACRO()
230234

cmd-line-utils/readline/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
# along with this program; if not, write to the Free Software
1414
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1515

16-
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
17-
${CMAKE_SOURCE_DIR}/cmd-line-utils)
16+
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR})
1817

1918
ADD_DEFINITIONS(-DHAVE_CONFIG_H -DNO_KILL_INTR)
2019

cmd-line-utils/readline/history.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ extern "C" {
3232
# include "rlstdc.h"
3333
# include "rltypedefs.h"
3434
#else
35-
# include <readline/rlstdc.h>
36-
# include <readline/rltypedefs.h>
35+
# include <rlstdc.h>
36+
# include <rltypedefs.h>
3737
#endif
3838

3939
#ifdef __STDC__

cmd-line-utils/readline/keymaps.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ extern "C" {
3232
# include "chardefs.h"
3333
# include "rltypedefs.h"
3434
#else
35-
# include <readline/rlstdc.h>
36-
# include <readline/chardefs.h>
37-
# include <readline/rltypedefs.h>
35+
# include <rlstdc.h>
36+
# include <chardefs.h>
37+
# include <rltypedefs.h>
3838
#endif
3939

4040
/* A keymap contains one entry for each key in the ASCII set.

cmd-line-utils/readline/readline.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ extern "C" {
3333
# include "keymaps.h"
3434
# include "tilde.h"
3535
#else
36-
# include <readline/rlstdc.h>
37-
# include <readline/rltypedefs.h>
38-
# include <readline/keymaps.h>
39-
# include <readline/tilde.h>
36+
# include <rlstdc.h>
37+
# include <rltypedefs.h>
38+
# include <keymaps.h>
39+
# include <tilde.h>
4040
#endif
4141

4242
/* Hex-encoded Readline version number. */

0 commit comments

Comments
 (0)