Commit 4093d083 authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

New upstream version 10.3.11

parent cdc3e0d9
#! /bin/sh
# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs $disable_64_bit_plugins"
extra_configs="$extra_configs --with-debug --with-ssl=/usr"
. "$path/FINISH.sh"
#! /bin/sh
# Copyright (C) 2000, 2007 MySQL AB
# Use is subject to license terms
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# Need to disable ccache, or we loose the gcov-needed compiler output files.
USING_GCOV=1
CCACHE_GCOV_VERSION_ENABLED=0
if ccache -V > /dev/null 2>&1
then
CCACHE_VER=`ccache -V | head -1 | sed s/"ccache version "//`
if test "$CCACHE_VER" == "2.4-gcov"
then
CCACHE_GCOV_VERSION_ENABLED=1
else
CCACHE_DISABLE=1
export CCACHE_DISABLE
fi
fi
export CCACHE_GCOV_VERSION_ENABLED
path=`dirname $0`
. "$path/SETUP.sh"
export LDFLAGS="$gcov_link_flags"
extra_flags="$pentium_cflags $debug_cflags $max_cflags $gcov_compile_flags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs $disable_64_bit_plugins"
. "$path/FINISH.sh"
#! /bin/sh
# Copyright (C) 2001, 2007 MySQL AB
# Use is subject to license terms
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $gprof_compile_flags"
extra_configs="$pentium_configs $debug_configs $gprof_link_flags $disable_64_bit_plugins $disable_gprof_plugins"
. "$path/FINISH.sh"
#! /bin/sh
# Copyright (c) 2001-2006 MySQL AB
# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $fast_cflags -g"
extra_configs="$pentium_configs $max_configs $disable_64_bit_plugins"
. "$path/FINISH.sh"
#! /bin/sh
# Copyright (c) 2002, 2010, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs $disable_64_bit_plugins"
. "$path/FINISH.sh"
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $fast_cflags $wsrep_cflags"
extra_configs="$pentium_configs $wsrep_configs --with-wsrep $disable_64_bit_plugins"
#strip=yes
. "$path/FINISH.sh"
#! /bin/sh
# Copyright (c) 2018, MariaDB Corporation.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium64_cflags $debug_cflags -lasan -O -g -fsanitize=address"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs $disable_asan_plugins"
export LDFLAGS="-ldl"
. "$path/FINISH.sh"
......@@ -28,6 +28,6 @@ export LDFLAGS="$gcov_link_flags"
extra_flags="$pentium64_cflags $max_cflags $gcov_compile_flags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs --with-zlib-dir=bundled"
extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs --without-oqgraph"
. "$path/FINISH.sh"
......@@ -20,6 +20,6 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium64_cflags $gprof_compile_flags"
extra_configs="$pentium_configs $max_configs $gprof_link_flags --with-zlib-dir=bundled"
extra_configs="$pentium_configs $max_configs $gprof_link_flags $disable_gprof_plugins"
. "$path/FINISH.sh"
File mode changed from 100644 to 100755
#! /bin/sh
# Copyright (c) 2005, 2006 MySQL AB
# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$ppc_cflags $debug_cflags"
extra_configs="$debug_configs $max_configs"
. "$path/FINISH.sh"
#!/bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="-D__sun -m32"
extra_configs="$max_configs --with-libevent"
LDFLAGS="-lmtmalloc -R/usr/sfw/lib"
export LDFLAGS
. "$path/FINISH.sh"
#!/bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="-D__sun -m32 $debug_cflags"
extra_configs="$max_configs --with-libevent $debug_configs"
LDFLAGS="-lmtmalloc -R/usr/sfw/lib"
export LDFLAGS
. "$path/FINISH.sh"
#!/bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
# Take only #define options - the others are gcc specific.
# (real fix is for SETUP.sh not to put gcc specific options in $debug_cflags)
DEFS=""
for F in $debug_cflags ; do
expr "$F" : "^-D" && DEFS="$DEFS $F"
done
debug_cflags="-O0 -g $DEFS"
extra_flags="-m32 -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3 $debug_cflags"
extra_configs="$max_configs --with-libevent $debug_configs"
warnings=""
c_warnings=""
cxx_warnings=""
base_cxxflags="-noex"
CC=cc
CFLAGS="-xstrconst"
CXX=CC
LDFLAGS="-lmtmalloc"
. "$path/FINISH.sh"
#!/bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="-m32 -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3"
extra_configs="$max_configs --with-libevent"
warnings=""
c_warnings=""
cxx_warnings=""
base_cxxflags="-noex"
CC=cc
CFLAGS="-xstrconst"
CXX=CC
LDFLAGS="-lmtmalloc"
. "$path/FINISH.sh"
......@@ -14,38 +14,19 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# Avoid warnings in higher versions
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6)
CMAKE_POLICY(VERSION 2.8)
endif()
# explicitly set the policy to OLD
# (cannot use NEW, not everyone is on cmake-2.8.12 yet)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
IF(POLICY CMP0022)
CMAKE_POLICY(SET CMP0022 OLD)
CMAKE_POLICY(SET CMP0022 NEW)
ENDIF()
# We use the LOCATION target property (CMP0026)
# and get_target_property() for non-existent targets (CMP0045)
# and INSTALL_NAME_DIR (CMP0042)
IF(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR
CMAKE_VERSION VERSION_GREATER "3.0.0")
CMAKE_POLICY(SET CMP0026 OLD)
CMAKE_POLICY(SET CMP0045 OLD)
CMAKE_POLICY(SET CMP0042 OLD)
IF(POLICY CMP0054)
CMAKE_POLICY(SET CMP0054 NEW)
ENDIF()
MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
# Distinguish between community and non-community builds, with the
# default being a community build. This does not impact the feature
# set that will be compiled in; it's merely provided as a hint to
# custom packaging steps.
OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON)
# Use a default manufacturer if no manufacturer was identified.
IF(NOT DEFINED MANUFACTURER)
SET(MANUFACTURER "Built from Source" CACHE STRING
......@@ -122,6 +103,13 @@ FOREACH(_base
ENDIF()
ENDFOREACH()
FOREACH(tool gtar tar)
STRING(TOUPPER ${tool} TOOL)
FIND_PROGRAM(${TOOL}_EXECUTABLE ${tool} DOC "path to the executable")
MARK_AS_ADVANCED(${TOOL}_EXECUTABLE)
ENDFOREACH()
FIND_PACKAGE(Git)
# Following autotools tradition, add preprocessor definitions
# specified in environment variable CPPFLAGS
......@@ -129,6 +117,9 @@ IF(DEFINED ENV{CPPFLAGS})
ADD_DEFINITIONS($ENV{CPPFLAGS})
ENDIF()
# NUMA
SET(WITH_NUMA "AUTO" CACHE STRING "Build with non-uniform memory access, allowing --innodb-numa-interleave. Options are ON|OFF|AUTO. ON = enabled (requires NUMA library), OFF = disabled, AUTO = enabled if NUMA library found.")
SET(MYSQL_MAINTAINER_MODE "AUTO" CACHE STRING "MySQL maintainer-specific development environment. Options are: ON OFF AUTO.")
# Packaging
......@@ -140,6 +131,7 @@ IF (NOT CPACK_GENERATOR)
ENDIF(WIN32)
ENDIF(NOT CPACK_GENERATOR)
INCLUDE(misc)
INCLUDE(mysql_version)
INCLUDE(cpack_source_ignore_files)
INCLUDE(install_layout)
......@@ -155,7 +147,6 @@ INCLUDE(ssl)
INCLUDE(readline)
INCLUDE(libutils)
INCLUDE(dtrace)
INCLUDE(jemalloc)
INCLUDE(pcre)
INCLUDE(ctest)
INCLUDE(plugin)
......@@ -163,6 +154,7 @@ INCLUDE(install_macros)
INCLUDE(systemd)
INCLUDE(mysql_add_executable)
INCLUDE(compile_flags)
INCLUDE(crc32)
# Handle options
OPTION(DISABLE_SHARED
......@@ -171,13 +163,11 @@ IF(DISABLE_SHARED)
SET(WITHOUT_DYNAMIC_PLUGINS 1)
ENDIF()
OPTION(ENABLED_PROFILING "Enable profiling" ON)
OPTION(CYBOZU "" OFF)
OPTION(WITHOUT_SERVER "Build only the client library and clients" OFF)
IF(UNIX)
OPTION(WITH_VALGRIND "Valgrind instrumentation" OFF)
ENDIF()
OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON)
MARK_AS_ADVANCED(CYBOZU)
IF (WITHOUT_SERVER)
SET (SKIP_COMPONENTS "Server|IniFiles|SuportFiles|Readme")
......@@ -190,20 +180,21 @@ OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system librar
INCLUDE(check_compiler_flag)
OPTION(WITH_ASAN "Enable address sanitizer" OFF)
IF (WITH_ASAN)
IF (WITH_ASAN AND NOT MSVC)
# gcc 4.8.1 and new versions of clang
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -O1 -Wno-error -fPIC"
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fPIC"
DEBUG RELWITHDEBINFO)
SET(HAVE_C_FSANITIZE ${HAVE_C__fsanitize_address__O1__Wno_error__fPIC})
SET(HAVE_CXX_FSANITIZE ${HAVE_CXX__fsanitize_address__O1__Wno_error__fPIC})
SET(HAVE_C_FSANITIZE ${have_C__fsanitize_address__fPIC})
SET(HAVE_CXX_FSANITIZE ${have_CXX__fsanitize_address__fPIC})
IF(HAVE_C_FSANITIZE AND HAVE_CXX_FSANITIZE)
SET(WITH_ASAN_OK 1)
ELSE()
# older versions of clang
MY_CHECK_AND_SET_COMPILER_FLAG("-faddress-sanitizer -O1 -fPIC"
MY_CHECK_AND_SET_COMPILER_FLAG("-faddress-sanitizer -fPIC"
DEBUG RELWITHDEBINFO)
SET(HAVE_C_FADDRESS ${HAVE_C__faddress_sanitizer__O1__fPIC})
SET(HAVE_CXX_FADDRESS ${HAVE_CXX__faddress_sanitizer__O1__fPIC})
SET(HAVE_C_FADDRESS ${have_C__faddress_sanitizer__fPIC})
SET(HAVE_CXX_FADDRESS ${have_CXX__faddress_sanitizer__fPIC})
IF(HAVE_C_FADDRESS AND HAVE_CXX_FADDRESS)
SET(WITH_ASAN_OK 1)
ENDIF()
......@@ -214,20 +205,30 @@ IF (WITH_ASAN)
ENDIF()
ENDIF()
# enable security hardening features, like most distributions do
# in our benchmarks that costs about ~1% of performance, depending on the load
IF(CMAKE_C_COMPILER_VERSION VERSION_LESS "4.6")
SET(security_default OFF)
ELSE()
SET(security_default ON)
OPTION(WITH_TSAN "Enable thread sanitizer" OFF)
IF (WITH_TSAN)
IF(SECURITY_HARDENED)
MESSAGE(FATAL_ERROR "WITH_TSAN and SECURITY_HARDENED are mutually exclusive")
ENDIF()
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=thread" DEBUG RELWITHDEBINFO)
ENDIF()
OPTION(SECURITY_HARDENED "Use security-enhancing compiler features (stack protector, relro, etc)" ${security_default})
IF(SECURITY_HARDENED)
# security-enhancing flags
MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wl,-z,relro,-z,now")
MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector --param=ssp-buffer-size=4")
MY_CHECK_AND_SET_COMPILER_FLAG("-D_FORTIFY_SOURCE=2" RELEASE RELWITHDEBINFO)
IF(NOT WITH_TSAN)
# enable security hardening features, like most distributions do
# in our benchmarks that costs about ~1% of performance, depending on the load
IF(CMAKE_C_COMPILER_VERSION VERSION_LESS "4.6")
SET(security_default OFF)
ELSE()
SET(security_default ON)
ENDIF()
OPTION(SECURITY_HARDENED "Use security-enhancing compiler features (stack protector, relro, etc)" ${security_default})
IF(SECURITY_HARDENED)
# security-enhancing flags
MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wl,-z,relro,-z,now")
MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector --param=ssp-buffer-size=4")
MY_CHECK_AND_SET_COMPILER_FLAG("-D_FORTIFY_SOURCE=2" RELEASE RELWITHDEBINFO)
ENDIF()
ENDIF()
# Always enable debug sync for debug builds.
......@@ -244,33 +245,20 @@ MY_CHECK_AND_SET_COMPILER_FLAG(-ggdb3 DEBUG)
OPTION(ENABLED_LOCAL_INFILE
"If we should should enable LOAD DATA LOCAL by default" ${IF_WIN})
OPTION(WITH_FAST_MUTEXES "Compile with fast mutexes" OFF)
MARK_AS_ADVANCED(WITH_FAST_MUTEXES)
OPTION(WITH_INNODB_DISALLOW_WRITES "InnoDB freeze writes patch from Google" ${WITH_WSREP})
IF (WITH_INNODB_DISALLOW_WRITES)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWITH_INNODB_DISALLOW_WRITES")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITH_INNODB_DISALLOW_WRITES")
ENDIF()
# Set DBUG_OFF and other optional release-only flags for non-debug project types
FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)
FOREACH(LANG C CXX)
IF (NOT CMAKE_${LANG}_FLAGS_${BUILD_TYPE} MATCHES "DDBUG_" AND
NOT CMAKE_${LANG}_FLAGS MATCHES "DDBUG_")
IF (NOT CMAKE_${LANG}_FLAGS_${BUILD_TYPE} MATCHES "DDBUG_ON" AND
NOT CMAKE_${LANG}_FLAGS MATCHES "DDBUG_ON")
SET(CMAKE_${LANG}_FLAGS_${BUILD_TYPE}
"${CMAKE_${LANG}_FLAGS_${BUILD_TYPE}} -DDBUG_OFF")
ENDIF()
IF(WITH_FAST_MUTEXES)
SET(CMAKE_${LANG}_FLAGS_${BUILD_TYPE}
"${CMAKE_${LANG}_FLAGS_${BUILD_TYPE}} -DMY_PTHREAD_FASTMUTEX=1")
ENDIF()
ENDFOREACH()
ENDFOREACH()
# Add safemutex for debug configurations, except on Windows
# (safemutex has never worked on Windows)
IF(NOT WIN32 AND NOT WITH_INNODB_MEMCACHED)
IF(NOT WIN32)
FOREACH(LANG C CXX)
SET(CMAKE_${LANG}_FLAGS_DEBUG "${CMAKE_${LANG}_FLAGS_DEBUG} -DSAFE_MUTEX")
ENDFOREACH()
......@@ -303,7 +291,7 @@ ELSE()
ENDIF()
SET(DEFAULT_CHARSET_HOME "${DEFAULT_MYSQL_HOME}")
SET(PLUGINDIR "${DEFAULT_MYSQL_HOME}/${INSTALL_PLUGINDIR}")
IF(INSTALL_SYSCONFDIR AND NOT DEFAULT_SYSCONFDIR)
IF(INSTALL_SYSCONFDIR AND NOT DEFAULT_SYSCONFDIR AND NOT DEB)
SET(DEFAULT_SYSCONFDIR "${INSTALL_SYSCONFDIR}")
ENDIF()
......@@ -327,7 +315,7 @@ IF(NOT HAVE_CXX_NEW)
ENDIF()
# Find header files from the bundled libraries
# (jemalloc, yassl, readline, pcre, etc)
# (yassl, readline, pcre, etc)
# before the ones installed in the system
SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
......@@ -346,7 +334,6 @@ MYSQL_CHECK_SSL()
MYSQL_CHECK_READLINE()
SET(MALLOC_LIBRARY "system")
CHECK_JEMALLOC()
CHECK_PCRE()
......@@ -373,12 +360,17 @@ IF(WITH_UNIT_TESTS)
ADD_SUBDIRECTORY(unittest/examples)
ADD_SUBDIRECTORY(unittest/mysys)
ADD_SUBDIRECTORY(unittest/my_decimal)
ADD_SUBDIRECTORY(unittest/json_lib)
IF(NOT WITHOUT_SERVER)
ADD_SUBDIRECTORY(unittest/sql)
ENDIF()
ENDIF()
SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "")
INCLUDE(submodules)
INCLUDE(mariadb_connector_c) # this does ADD_SUBDIRECTORY(libmariadb)
# Add storage engines and plugins.
CONFIGURE_PLUGINS()
......@@ -388,7 +380,6 @@ 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)
......@@ -401,6 +392,7 @@ IF(NOT WITHOUT_SERVER)
IF(WITH_EMBEDDED_SERVER)
ADD_SUBDIRECTORY(libmysqld)
ADD_SUBDIRECTORY(libmysqld/examples)
ADD_SUBDIRECTORY(unittest/embedded)
ENDIF(WITH_EMBEDDED_SERVER)
IF(WITH_WSREP)
......@@ -446,16 +438,26 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
${CMAKE_BINARY_DIR}/include/mysql_version.h )
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
${CMAKE_BINARY_DIR}/sql/sql_builtin.cc)
IF(GIT_EXECUTABLE AND EXISTS ${PROJECT_SOURCE_DIR}/.git)
EXECUTE_PROCESS(
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE OUT RESULT_VARIABLE RES)
IF(RES EQUAL 0)
STRING(REGEX REPLACE "\n$" "" SOURCE_REVISION "${OUT}")
ENDIF()
ENDIF()
IF(SOURCE_REVISION OR
(NOT EXISTS ${PROJECT_SOURCE_DIR}/include/source_revision.h))
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/include/source_revision.h.in
${PROJECT_BINARY_DIR}/include/source_revision.h )
ENDIF()
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/cmake/info_macros.cmake.in
${CMAKE_BINARY_DIR}/info_macros.cmake @ONLY)
IF(DEB)
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/debian/mariadb-server-10.1.files.in
${CMAKE_SOURCE_DIR}/debian/mariadb-server-10.1.files)
ENDIF(DEB)
# Handle the "INFO_*" files.
INCLUDE(${CMAKE_BINARY_DIR}/info_macros.cmake)
# Source: This can be done during the cmake phase, all information is
......@@ -472,7 +474,7 @@ ADD_CUSTOM_TARGET(INFO_BIN ALL
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
INSTALL_DOCUMENTATION(README CREDITS COPYING COPYING.thirdparty
INSTALL_DOCUMENTATION(README.md CREDITS COPYING COPYING.thirdparty
EXCEPTIONS-CLIENT COMPONENT Readme)
# MDEV-6526 these files are not installed anymore
......@@ -480,7 +482,6 @@ INSTALL_DOCUMENTATION(README CREDITS COPYING COPYING.thirdparty
# ${CMAKE_BINARY_DIR}/Docs/INFO_BIN)
IF(UNIX)
INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY COMPONENT Readme)
INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY Docs/README-wsrep COMPONENT Readme)
ENDIF()
......
commit: 8d834cd0f370b306f63c2364552d187fc388e59e
date: 2018-10-31 23:48:29 +0200
build-date: 2018-10-31 21:54:07 +0000
short: 8d834cd
commit: fe0e65dbe28f93bfc677d12be4166415dc1bec5a
date: 2018-11-16 19:58:52 +0200
build-date: 2018-11-16 18:04:56 +0000
short: fe0e65d
branch: HEAD
MariaDB source 10.1.37
MariaDB source 10.3.11
......@@ -366,7 +366,7 @@ wsrep_forced_binlog_format=none
format, regardless of what the client session has specified in binlog_format.
Valid choices for wsrep_forced_binlog_format are: ROW, STATEMENT, MIXED and
special value NONE, meaning that there is no forced binlog format in effect.
This variable was intruduced to support STATEMENT format replication during
This variable was introduced to support STATEMENT format replication during
rolling schema upgrade processing. However, in most cases ROW replication
is valid for asymmetrict schema replication.
......
......@@ -95,7 +95,7 @@ Zero if the create is successful. Non-zero if an error occurs.
HA_WRONG_CREATE_OPTION
means that some of the arguments was wrong.
appart from the above one can get any unix error that one can get from open(), write() or close().
apart from the above one can get any unix error that one can get from open(), write() or close().
#.#.4 Examples
......@@ -169,7 +169,7 @@ The function parameter can be:
HA_EXTRA_QUICK=1 Optimize for speed
HA_EXTRA_RESET=2 Reset database to after open
HA_EXTRA_CACHE=3 Cash record in HA_rrnd()
HA_EXTRA_NO_CACHE=4 End cacheing of records (def)
HA_EXTRA_NO_CACHE=4 End caching of records (def)
HA_EXTRA_NO_READCHECK=5 No readcheck on update
HA_EXTRA_READCHECK=6 Use readcheck (def)
HA_EXTRA_KEYREAD=7 Read only key to database
......@@ -335,7 +335,7 @@ int mi_rfirst(MI_INFO *mip , byte *buf, int inx)
#.#.1 Description
Reads the first row in the MyISAM file according to the specified index.
If one want's to read rows in physical sequences, then one should instead use mi_scan() or mi_rrnd().
If one wants to read rows in physical sequences, then one should instead use mi_scan() or mi_rrnd().
mip is an MI_INFO pointer to the open handle.
buf is the record buffer that will contain the row.
......@@ -364,7 +364,7 @@ int mi_rkey(MI_INFO *mip, byte *buf, int inx, const byte *key, uint key_len, enu
#.#.1 Description
Reads the next row after the last row read, using the current index.
If one want's to read rows in physical sequences, then one should instead use mi_scan() or mi_rrnd().
If one wants to read rows in physical sequences, then one should instead use mi_scan() or mi_rrnd().
mip is an MI_INFO pointer to the open handle.
buf is the record buffer that will contain the row.
......@@ -397,7 +397,7 @@ int mi_rlast(MI_INFO *mip , byte *buf, int inx)
#.#.1 Description
Reads the last row in the MyISAM file according to the specified index.
If one want's to read rows in physical sequences, then one should instead use mi_scan() or mi_rrnd().
If one wants to read rows in physical sequences, then one should instead use mi_scan() or mi_rrnd().
mip is an MI_INFO pointer to the open handle.
buf is a pointer to the record buffer that will contain the row.
Inx is the index (key) number, which must be the same as currently selected.
......@@ -425,7 +425,7 @@ int mi_rnext(MI_INFO *mip , byte *buf, int inx )
#.#.1 Description
Reads the next row after the last row read, using the current index.
If one want's to read rows in physical sequences, then one should instead use mi_scan() or mi_rrnd().
If one wants to read rows in physical sequences, then one should instead use mi_scan() or mi_rrnd().
mip is an MI_INFO pointer to the open handle.
buf is the record buffer that will contain the row.
......@@ -520,7 +520,7 @@ int mi_rsame(MI_INFO *mip, byte *buf, int inx)
Reads the current row to get its latest contents. This is useful to refresh the record buffer in case someone else has changed it.
If inx is negative it reads by position. If inx is >= 0 it reads by key.
With mi_rsame() one can switch to use any other index for the current row. This is good if you have a user application that lets the user do 'read-next' on a row. In this case, if the user want's to start scanning on another index, one simply has to do a mi_rsame() on the new index to activate this.
With mi_rsame() one can switch to use any other index for the current row. This is good if you have a user application that lets the user do 'read-next' on a row. In this case, if the user wants to start scanning on another index, one simply has to do a mi_rsame() on the new index to activate this.
mip is an MI_INFO pointer to the open handle.
buf is the record buffer that will contain the row.
......@@ -677,7 +677,7 @@ Zero if successful. Non-zero if an error occurred.
HA_ERR_FOUND_DUPP_KEY
A record already existed with a unique key same as this new record.
HA_ERR_RECORD_FILE_FULL
The error is given if you hit a system limit or if you try to create more rows in a table that you reserverd room for with mi_create().
The error is given if you hit a system limit or if you try to create more rows in a table that you reserved room for with mi_create().
ENOSPC
The disk is full.
EACCES
......@@ -770,7 +770,7 @@ uint _mi_make_key( MI_INFO *mip, uint keynr, uchar *key, const char *record, my_
Construct a key string for the given index, from the provided record buffer.
??? When packed records are used ...
This is an internal function, not for use by applications. Monty says: "This can't be used to create an external key for an application from your record."
See mi_make_application_key() for a similar function that is useable by applications.
See mi_make_application_key() for a similar function that is usable by applications.
The parameters are:
A MI_INFO pointer mip.
......@@ -872,7 +872,7 @@ HEAP tables only exists in memory so they are lost if `mysqld' is taken down or
The *MySQL* internal HEAP tables uses 100% dynamic hashing without overflow areas and don't have problems with delete.
You can only access things by equality using a index (usually by the `=' operator) whith a heap table.
You can only access things by equality using a index (usually by the `=' operator) with a heap table.
The downside with HEAPS are:
1. You need enough extra memory for all HEAP tables that you want to use at the same time.
2. You can't search on a part of a index.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment