Skip to content

Commit

Permalink
Merge branch '10.0' into 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Mar 7, 2015
2 parents 143f5d9 + d61573d commit 2db62f6
Show file tree
Hide file tree
Showing 728 changed files with 55,048 additions and 9,876 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,11 @@ CHECK_JEMALLOC()

CHECK_PCRE()

IF(CMAKE_CROSSCOMPILING)
SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build")
INCLUDE(${IMPORT_EXECUTABLES})
ENDIF()

#
# Setup maintainer mode options. Platform checks are
# not run with the warning options as to not perturb fragile checks
Expand Down Expand Up @@ -427,7 +432,8 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
${CMAKE_BINARY_DIR}/sql/sql_builtin.cc)
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/cmake/info_macros.cmake.in ${CMAKE_BINARY_DIR}/info_macros.cmake @ONLY)
${CMAKE_SOURCE_DIR}/cmake/info_macros.cmake.in
${CMAKE_BINARY_DIR}/info_macros.cmake @ONLY)

IF(DEB)
CONFIGURE_FILE(
Expand All @@ -439,7 +445,7 @@ ENDIF(DEB)
INCLUDE(${CMAKE_BINARY_DIR}/info_macros.cmake)
# Source: This can be done during the cmake phase, all information is
# available, but should be repeated on each "make" just in case someone
# does "cmake ; make ; bzr pull ; make".
# does "cmake ; make ; git pull ; make".
CREATE_INFO_SRC(${CMAKE_BINARY_DIR}/Docs)
ADD_CUSTOM_TARGET(INFO_SRC ALL
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/info_src.cmake
Expand Down
9 changes: 9 additions & 0 deletions client/mysqlbinlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@

#include "mysqld.h"

#include <algorithm>

Rpl_filter *binlog_filter= 0;

#define BIN_LOG_HEADER_SIZE 4
Expand All @@ -67,6 +69,7 @@ ulong server_id = 0;
ulong bytes_sent = 0L, bytes_received = 0L;
ulong mysqld_net_retry_count = 10L;
ulong open_files_limit;
ulong opt_binlog_rows_event_max_size;
uint test_flags = 0;
static uint opt_protocol= 0;
static FILE *result_file;
Expand Down Expand Up @@ -1436,6 +1439,12 @@ that may lead to an endless loop.",
"Used to reserve file descriptors for use by this program.",
&open_files_limit, &open_files_limit, 0, GET_ULONG,
REQUIRED_ARG, MY_NFILE, 8, OS_FILE_LIMIT, 0, 1, 0},
{"binlog-row-event-max-size", 0,
"The maximum size of a row-based binary log event in bytes. Rows will be "
"grouped into events smaller than this size if possible. "
"This value must be a multiple of 256.",
&opt_binlog_rows_event_max_size, &opt_binlog_rows_event_max_size, 0,
GET_ULONG, REQUIRED_ARG, UINT_MAX, 256, ULONG_MAX, 0, 256, 0},
{"verify-binlog-checksum", 'c', "Verify checksum binlog events.",
(uchar**) &opt_verify_binlog_checksum, (uchar**) &opt_verify_binlog_checksum,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
Expand Down
5 changes: 1 addition & 4 deletions cmake/cpack_source_ignore_files.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2009, 2014, 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
Expand All @@ -14,9 +14,6 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

SET(CPACK_SOURCE_IGNORE_FILES
\\\\.bzr/
\\\\.bzr-mysql
\\\\.bzrignore
\\\\.git/
\\\\.gitignore
CMakeCache\\\\.txt
Expand Down
52 changes: 33 additions & 19 deletions cmake/info_macros.cmake.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, 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
Expand All @@ -23,11 +23,13 @@
# If further variables are used in this file, add them to this list.

SET(VERSION "@VERSION@")
SET(MAJOR_VERSION "@MAJOR_VERSION@")
SET(MINOR_VERSION "@MINOR_VERSION@")
SET(PATCH_VERSION "@PATCH_VERSION@")
SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@")
SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CMAKE_GENERATOR "@CMAKE_GENERATOR@")
SET(CMAKE_SIZEOF_VOID_P "@CMAKE_SIZEOF_VOID_P@")
SET(BZR_EXECUTABLE "@BZR_EXECUTABLE@")
SET(GIT_EXECUTABLE "@GIT_EXECUTABLE@")
SET(CMAKE_CROSSCOMPILING "@CMAKE_CROSSCOMPILING@")
SET(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
Expand All @@ -37,39 +39,51 @@ SET(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@")


# Create an "INFO_SRC" file with information about the source (only).
# We use "bzr version-info", if possible, and the "VERSION" contents.
# We use "git log", if possible, and the "VERSION" contents.
#
# Outside development (BZR tree), the "INFO_SRC" file will not be modified
# Outside development (git tree), the "INFO_SRC" file will not be modified
# provided it exists (from "make dist" or a source tarball creation).

MACRO(CREATE_INFO_SRC target_dir)
SET(INFO_SRC "${target_dir}/INFO_SRC")

IF(EXISTS ${CMAKE_SOURCE_DIR}/.bzr)
# Sources are in a BZR repository: Always update.
SET(PERLSCRIPT
"use warnings; use POSIX qw(strftime); "
"print strftime \"%F %T %z\", localtime;")
EXECUTE_PROCESS(
COMMAND perl -e "${PERLSCRIPT}"
RESULT_VARIABLE result
OUTPUT_VARIABLE bdate
ERROR_VARIABLE error
)
IF(error)
MESSAGE(STATUS "Could not determine build-date: <${error}>")
ENDIF()

IF(GIT_EXECUTABLE AND EXISTS ${CMAKE_SOURCE_DIR}/.git)
# Sources are in a GIT repository: Always update.
EXECUTE_PROCESS(
COMMAND ${BZR_EXECUTABLE} version-info ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE VERSION_INFO
RESULT_VARIABLE RESULT
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE bname
)
FILE(WRITE ${INFO_SRC} "${VERSION_INFO}\n")
# to debug, add: FILE(APPEND ${INFO_SRC} "\nResult ${RESULT}\n")
# For better readability ...
FILE(APPEND ${INFO_SRC} "\nMariaDB source ${VERSION}\n")
ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/.git)
# Sources are in a GIT repository: Always update.

EXECUTE_PROCESS(
COMMAND ${GIT_EXECUTABLE} log -1 "--format=commit: %H%nauthor: %an <%ae>%ndate: %aD%nbranch: %d"
COMMAND ${GIT_EXECUTABLE} log -1
--pretty="commit: %H%ndate: %ci%nbuild-date: ${bdate} %nshort: %h%nbranch: ${bname}"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE VERSION_INFO
RESULT_VARIABLE RESULT
)

## Output from git is quoted with "", remove them.
STRING(REPLACE "\"" "" VERSION_INFO "${VERSION_INFO}")
FILE(WRITE ${INFO_SRC} "${VERSION_INFO}\n")
# to debug, add: FILE(APPEND ${INFO_SRC} "\nResult ${RESULT}\n")
# For better readability ...
FILE(APPEND ${INFO_SRC} "\nMariaDB source ${VERSION}\n")
FILE(APPEND ${INFO_SRC}
"MariaDB source ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}\n")
ELSEIF(EXISTS ${INFO_SRC})
# Outside a BZR tree, there is no need to change an existing "INFO_SRC",
# Outside a git tree, there is no need to change an existing "INFO_SRC",
# it cannot be improved.
ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/Docs/INFO_SRC)
# If we are building from a source distribution, it also contains "INFO_SRC".
Expand Down
8 changes: 4 additions & 4 deletions cmake/info_src.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, 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
Expand All @@ -16,11 +16,11 @@

# The sole purpose of this cmake control file is to create the "INFO_SRC" file.

# As long as and "bzr pull" (or "bzr commit") is followed by a "cmake",
# As long as and "git pull" (or "git commit") is followed by a "cmake",
# the call in top level "CMakeLists.txt" is sufficient.
# This file is to provide a separate target for the "make" phase,
# to ensure the BZR revision-id is correct even after a sequence
# cmake ; make ; bzr pull ; make
# to ensure the git commit hash is correct even after a sequence
# cmake ; make ; git pull ; make


# Get the macros which handle the "INFO_*" files.
Expand Down
2 changes: 1 addition & 1 deletion cmake/maintainer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
ENDIF()

# Turn on Werror (warning => error) when using maintainer mode.
IF(FALSE AND MYSQL_MAINTAINER_MODE MATCHES "ON")
IF(MYSQL_MAINTAINER_MODE MATCHES "ERR")
SET(MY_C_WARNING_FLAGS "${MY_C_WARNING_FLAGS} -DFORCE_INIT_OF_VARS -Werror")
SET(MY_CXX_WARNING_FLAGS "${MY_CXX_WARNING_FLAGS} -DFORCE_INIT_OF_VARS -Werror")
ENDIF()
Expand Down
19 changes: 2 additions & 17 deletions cmake/make_dist.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "@CPACK_SOURCE_PACKAGE_FILE_NAME@")
SET(CMAKE_CPACK_COMMAND "@CMAKE_CPACK_COMMAND@")
SET(CMAKE_COMMAND "@CMAKE_COMMAND@")
SET(BZR_EXECUTABLE "@BZR_EXECUTABLE@")
SET(GIT_EXECUTABLE "@GIT_EXECUTABLE@")
SET(GTAR_EXECUTABLE "@GTAR_EXECUTABLE@")
SET(TAR_EXECUTABLE "@TAR_EXECUTABLE@")
Expand Down Expand Up @@ -53,22 +52,8 @@ IF(GIT_EXECUTABLE)
ENDIF()
ENDIF()

IF(BZR_EXECUTABLE AND NOT GIT_EXECUTABLE)
MESSAGE(STATUS "Running bzr export")
EXECUTE_PROCESS(
COMMAND "${BZR_EXECUTABLE}" export
${PACKAGE_DIR}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE RESULT
)

IF(NOT RESULT EQUAL 0)
SET(BZR_EXECUTABLE)
ENDIF()
ENDIF()

IF(NOT BZR_EXECUTABLE AND NOT GIT_EXECUTABLE)
MESSAGE(STATUS "bzr not found or source dir is not a repo, use CPack")
IF(NOT GIT_EXECUTABLE)
MESSAGE(STATUS "git not found or source dir is not a repo, use CPack")

IF(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
# In-source build is the worst option, we have to cleanup source tree.
Expand Down
34 changes: 17 additions & 17 deletions cmake/ssl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -159,23 +159,6 @@ MACRO (MYSQL_CHECK_SSL)
LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
ENDIF()

# Verify version number. Version information looks like:
# #define OPENSSL_VERSION_NUMBER 0x1000103fL
# Encoded as MNNFFPPS: major minor fix patch status
FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
OPENSSL_VERSION_NUMBER
REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
)
STRING(REGEX REPLACE
"^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
)

MESSAGE(STATUS "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}")
MESSAGE(STATUS "OPENSSL_LIBRARIES = ${OPENSSL_LIBRARIES}")
MESSAGE(STATUS "CRYPTO_LIBRARY = ${CRYPTO_LIBRARY}")
MESSAGE(STATUS "OPENSSL_MAJOR_VERSION = ${OPENSSL_MAJOR_VERSION}")

INCLUDE(CheckSymbolExists)
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
Expand All @@ -190,6 +173,23 @@ MACRO (MYSQL_CHECK_SSL)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBDL})
ENDIF()

# Verify version number. Version information looks like:
# #define OPENSSL_VERSION_NUMBER 0x1000103fL
# Encoded as MNNFFPPS: major minor fix patch status
FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
OPENSSL_VERSION_NUMBER
REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
)
STRING(REGEX REPLACE
"^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
)

MESSAGE(STATUS "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}")
MESSAGE(STATUS "OPENSSL_LIBRARIES = ${OPENSSL_LIBRARIES}")
MESSAGE(STATUS "CRYPTO_LIBRARY = ${CRYPTO_LIBRARY}")
MESSAGE(STATUS "OPENSSL_MAJOR_VERSION = ${OPENSSL_MAJOR_VERSION}")
MESSAGE(STATUS "SSL_LIBRARIES = ${SSL_LIBRARIES}")
SET(SSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
SET(SSL_INTERNAL_INCLUDE_DIRS "")
Expand Down
5 changes: 3 additions & 2 deletions debian/dist/Debian/mariadb-server-10.1.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ invoke() {
fi
}

MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --default-storage-engine=myisam"
MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --disable-log-bin --skip-grant-tables --default-storage-engine=myisam"

test_mysql_access() {
mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1
Expand All @@ -40,6 +40,7 @@ set_mysql_rootpw() {
# this avoids us having to call "test" or "[" on $rootpw
cat << EOF > $tfile
USE mysql;
SET sql_log_bin=0;
UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root';
FLUSH PRIVILEGES;
EOF
Expand Down Expand Up @@ -144,7 +145,7 @@ EOF
# Debian: beware of the bashisms...
# Debian: can safely run on upgrades with existing databases
set +e
/bin/bash /usr/bin/mysql_install_db --rpm --user=mysql 2>&1 | $ERR_LOGGER
/bin/bash /usr/bin/mysql_install_db --rpm --user=mysql --disable-log-bin 2>&1 | $ERR_LOGGER
set -e

## On every reconfiguration the maintenance user is recreated.
Expand Down
7 changes: 4 additions & 3 deletions debian/dist/Ubuntu/mariadb-server-10.1.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ invoke() {
fi
}

MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --default-storage-engine=myisam"
MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --disable-log-bin --skip-grant-tables --default-storage-engine=myisam"

test_mysql_access() {
mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1
Expand All @@ -41,6 +41,7 @@ set_mysql_rootpw() {
# this avoids us having to call "test" or "[" on $rootpw
cat << EOF > $tfile
USE mysql;
SET sql_log_bin=0;
UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root';
FLUSH PRIVILEGES;
EOF
Expand Down Expand Up @@ -145,7 +146,7 @@ EOF
# Debian: beware of the bashisms...
# Debian: can safely run on upgrades with existing databases
set +e
/bin/bash /usr/bin/mysql_install_db --rpm --user=mysql 2>&1 | $ERR_LOGGER
/bin/bash /usr/bin/mysql_install_db --rpm --user=mysql --disable-log-bin 2>&1 | $ERR_LOGGER
set -e

## On every reconfiguration the maintenance user is recreated.
Expand Down Expand Up @@ -213,7 +214,7 @@ EOF
# admin might already have chosen to remove one or more plugins. Newlines are necessary.
install_plugins=`/bin/echo -e \
"USE mysql;\n" \
"CREATE TABLE plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \
"CREATE TABLE IF NOT EXISTS plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \
" dl char(128) COLLATE utf8_bin NOT NULL DEFAULT '', " \
" PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins';" `

Expand Down
10 changes: 10 additions & 0 deletions extra/yassl/README
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ before calling SSL_new();

*** end Note ***

yaSSL Release notes, version 2.3.7 (12/10/2014)
This release of yaSSL fixes the potential to process duplicate handshake
messages by explicitly marking/checking received handshake messages.

yaSSL Release notes, version 2.3.6 (11/25/2014)

This release of yaSSL fixes some valgrind warnings/errors including
uninitialized reads and off by one index errors induced from fuzzing
the handshake. These were reported by Oracle.

yaSSL Release notes, version 2.3.5 (9/29/2014)

This release of yaSSL fixes an RSA Padding check vulnerability reported by
Expand Down
11 changes: 10 additions & 1 deletion extra/yassl/examples/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

/* client.cpp */

// takes an optional command line argument of cipher list to make scripting
// easier


#include "../../testsuite/test.hpp"

//#define TEST_RESUME
Expand Down Expand Up @@ -73,11 +77,16 @@ void client_test(void* args)
#ifdef NON_BLOCKING
tcp_set_nonblocking(sockfd);
#endif

SSL_METHOD* method = TLSv1_client_method();
SSL_CTX* ctx = SSL_CTX_new(method);

set_certs(ctx);
if (argc >= 2) {
printf("setting cipher list to %s\n", argv[1]);
if (SSL_CTX_set_cipher_list(ctx, argv[1]) != SSL_SUCCESS) {
ClientError(ctx, NULL, sockfd, "set_cipher_list error\n");
}
}
SSL* ssl = SSL_new(ctx);

SSL_set_fd(ssl, sockfd);
Expand Down
Loading

0 comments on commit 2db62f6

Please sign in to comment.