Skip to content

Commit

Permalink
Merge pull request #380 from vlad-lesin/merge-5.6.29
Browse files Browse the repository at this point in the history
Merge 5.6.29
  • Loading branch information
Vlad Lesin committed Mar 2, 2016
2 parents bf2e906 + ab030e7 commit 445b7dd
Show file tree
Hide file tree
Showing 250 changed files with 5,337 additions and 1,312 deletions.
4 changes: 0 additions & 4 deletions BUILD-CMAKE

This file was deleted.

19 changes: 11 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 2016, 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 Down Expand Up @@ -396,9 +396,16 @@ IF(SYSCONFDIR)
SET(DEFAULT_SYSCONFDIR "${SYSCONFDIR}")
ENDIF()

SET(TMPDIR "P_tmpdir"
CACHE PATH
"PATH to MySQL TMP dir. Defaults to the P_tmpdir macro in <stdio.h>")
IF(WIN32) # P_tmpdir is not defined on Windows as of VS2015.
SET(TMPDIR "" # So we use empty path as default. In practice TMP/TEMP is used
CACHE PATH
"PATH to MySQL TMP dir")
ELSE()
SET(TMPDIR "P_tmpdir"
CACHE PATH
"PATH to MySQL TMP dir. Defaults to the P_tmpdir macro in <stdio.h>")
ENDIF()

IF(TMPDIR STREQUAL "P_tmpdir")
# Do not quote it, to refer to the P_tmpdir macro.
SET(DEFAULT_TMPDIR "P_tmpdir")
Expand Down Expand Up @@ -567,15 +574,11 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM")
)
INSTALL(FILES README.MySQL DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme)
INSTALL(FILES ${CMAKE_BINARY_DIR}/Docs/INFO_SRC ${CMAKE_BINARY_DIR}/Docs/INFO_BIN DESTINATION ${INSTALL_DOCDIR})
IF(UNIX)
INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme)
ENDIF()
# MYSQL_DOCS_LOCATON is used in "make dist", points to the documentation directory
SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied")
MARK_AS_ADVANCED(MYSQL_DOCS_LOCATION)
INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR}
COMPONENT Documentation
PATTERN "INSTALL-BINARY" EXCLUDE
PATTERN "Makefile.*" EXCLUDE
PATTERN "glibc*" EXCLUDE
PATTERN "linuxthreads.txt" EXCLUDE
Expand Down
8 changes: 0 additions & 8 deletions Docs/INSTALL-BINARY

This file was deleted.

11 changes: 11 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Pre-built binaries in different package formats can be found on

http://www.mysql.com/downloads

You can find information about how to install from a source distribution at

http://dev.mysql.com/doc/refman/5.6/en/source-installation.html

The MySQL 5.6 Reference Manual is available on

http://dev.mysql.com/doc/refman/5.6/en/
7 changes: 0 additions & 7 deletions INSTALL-SOURCE

This file was deleted.

8 changes: 0 additions & 8 deletions INSTALL-WIN-SOURCE

This file was deleted.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=6
MYSQL_VERSION_PATCH=28
MYSQL_VERSION_EXTRA=-76.1
MYSQL_VERSION_EXTRA=-76.2
5 changes: 3 additions & 2 deletions cmake/os/Windows.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2010, 2016, 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 Down Expand Up @@ -186,12 +186,13 @@ CHECK_SYMBOL_REPLACEMENT(SIGQUIT SIGTERM signal.h)
CHECK_SYMBOL_REPLACEMENT(SIGPIPE SIGINT signal.h)
CHECK_SYMBOL_REPLACEMENT(isnan _isnan float.h)
CHECK_SYMBOL_REPLACEMENT(finite _finite float.h)
CHECK_SYMBOL_REPLACEMENT(tzname _tzname time.h)
CHECK_SYMBOL_REPLACEMENT(snprintf _snprintf stdio.h)
CHECK_FUNCTION_REPLACEMENT(popen _popen)
CHECK_FUNCTION_REPLACEMENT(pclose _pclose)
CHECK_FUNCTION_REPLACEMENT(access _access)
CHECK_FUNCTION_REPLACEMENT(strcasecmp _stricmp)
CHECK_FUNCTION_REPLACEMENT(strncasecmp _strnicmp)
CHECK_FUNCTION_REPLACEMENT(snprintf _snprintf)
CHECK_FUNCTION_REPLACEMENT(strtok_r strtok_s)
CHECK_FUNCTION_REPLACEMENT(strtoll _strtoi64)
CHECK_FUNCTION_REPLACEMENT(strtoull _strtoui64)
Expand Down
5 changes: 2 additions & 3 deletions cmake/os/WindowsCache.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2010, 2016, 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 Down Expand Up @@ -231,7 +231,6 @@ SET(HAVE_SIZEOF_ULONG FALSE CACHE INTERNAL "")
SET(HAVE_SIZEOF_U_INT32_T FALSE CACHE INTERNAL "")
SET(HAVE_SIZE_OF_SSIZE_T FALSE CACHE INTERNAL "")
SET(HAVE_SLEEP CACHE INTERNAL "")
SET(HAVE_SNPRINTF CACHE INTERNAL "")
SET(HAVE_SOCKADDR_IN_SIN_LEN CACHE INTERNAL "")
SET(HAVE_SOCKADDR_IN6_SIN6_LEN CACHE INTERNAL "")
SET(HAVE_SOCKADDR_STORAGE_SS_FAMILY 1 CACHE INTERNAL "")
Expand Down Expand Up @@ -306,7 +305,6 @@ SET(HAVE_TIME 1 CACHE INTERNAL "")
SET(HAVE_TIMES CACHE INTERNAL "")
SET(HAVE_TIMESPEC_TS_SEC CACHE INTERNAL "")
SET(HAVE_TIME_H 1 CACHE INTERNAL "")
SET(HAVE_TZNAME 1 CACHE INTERNAL "")
SET(HAVE_UNISTD_H CACHE INTERNAL "")
SET(HAVE_UTIME_H CACHE INTERNAL "")
SET(HAVE_VALLOC CACHE INTERNAL "")
Expand All @@ -333,6 +331,7 @@ SET(HAVE__strtoui64 1 CACHE INTERNAL "")
IF(MSVC_VERSION GREATER 1310)
SET(HAVE_strtok_s 1 CACHE INTERNAL "")
ENDIF()
SET(HAVE__tzname 1 CACHE INTERNAL "")
SET(STDC_HEADERS CACHE 1 INTERNAL "")
SET(STRUCT_DIRENT_HAS_D_INO CACHE INTERNAL "")
SET(STRUCT_DIRENT_HAS_D_INO CACHE INTERNAL "")
Expand Down
4 changes: 3 additions & 1 deletion config.h.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2009, 2016, 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 Down Expand Up @@ -401,6 +401,7 @@
#cmakedefine HAVE_UINT64 1
#cmakedefine SIZEOF_BOOL @SIZEOF_BOOL@
#cmakedefine HAVE_BOOL 1
#cmakedefine HAVE_STRUCT_TIMESPEC

#cmakedefine SOCKET_SIZE_TYPE @SOCKET_SIZE_TYPE@

Expand Down Expand Up @@ -523,6 +524,7 @@
#cmakedefine strtok_r @strtok_r@
#cmakedefine strtoll @strtoll@
#cmakedefine strtoull @strtoull@
#cmakedefine tzname @tzname@
#cmakedefine vsnprintf @vsnprintf@
#if (_MSC_VER > 1310)
# define HAVE_SETENV
Expand Down
5 changes: 3 additions & 2 deletions configure.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2009, 2016, 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 Down Expand Up @@ -759,7 +759,7 @@ MY_CHECK_TYPE_SIZE(char CHAR)
MY_CHECK_TYPE_SIZE(short SHORT)
MY_CHECK_TYPE_SIZE(int INT)
MY_CHECK_TYPE_SIZE("long long" LONG_LONG)
SET(CMAKE_EXTRA_INCLUDE_FILES stdio.h sys/types.h)
SET(CMAKE_EXTRA_INCLUDE_FILES stdio.h sys/types.h time.h)
MY_CHECK_TYPE_SIZE(off_t OFF_T)
MY_CHECK_TYPE_SIZE(uchar UCHAR)
MY_CHECK_TYPE_SIZE(uint UINT)
Expand All @@ -774,6 +774,7 @@ MY_CHECK_TYPE_SIZE(u_int32_t U_INT32_T)
MY_CHECK_TYPE_SIZE(int64 INT64)
MY_CHECK_TYPE_SIZE(uint64 UINT64)
MY_CHECK_TYPE_SIZE(time_t TIME_T)
MY_CHECK_TYPE_SIZE("struct timespec" STRUCT_TIMESPEC)
SET (CMAKE_EXTRA_INCLUDE_FILES sys/types.h)
MY_CHECK_TYPE_SIZE(bool BOOL)
SET(CMAKE_EXTRA_INCLUDE_FILES)
Expand Down
11 changes: 11 additions & 0 deletions extra/yassl/README
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ before calling SSL_new();

*** end Note ***

yaSSL Release notes, version 2.3.9 (12/01/2015)
This release of yaSSL fixes two client side Diffie-Hellman problems.
yaSSL was only handling the cases of zero or one leading zeros for the key
agreement instead of potentially any number. This caused about 1 in 50,000
connections to fail when using DHE cipher suites. The second problem was
the case where a server would send a public value shorter than the prime
value, causing about 1 in 128 client connections to fail, and also
caused the yaSSL client to read off the end of memory. All client side
DHE cipher suite users should update.
Thanks to Adam Langely (agl@imperialviolet.org) for the detailed report!

yaSSL Release notes, version 2.3.8 (9/17/2015)
This release of yaSSL fixes a high security vulnerability. All users
SHOULD update. If using yaSSL for TLS on the server side with private
Expand Down
1 change: 1 addition & 0 deletions extra/yassl/include/crypto_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ class DiffieHellman {

uint get_agreedKeyLength() const;
const byte* get_agreedKey() const;
uint get_publicKeyLength() const;
const byte* get_publicKey() const;
void makeAgreement(const byte*, unsigned int);

Expand Down
2 changes: 1 addition & 1 deletion extra/yassl/include/openssl/ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "rsa.h"


#define YASSL_VERSION "2.3.8"
#define YASSL_VERSION "2.3.9"


#if defined(__cplusplus)
Expand Down
11 changes: 8 additions & 3 deletions extra/yassl/src/crypto_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,10 @@ struct DiffieHellman::DHImpl {
byte* publicKey_;
byte* privateKey_;
byte* agreedKey_;
uint pubKeyLength_;

DHImpl(TaoCrypt::RandomNumberGenerator& r) : ranPool_(r), publicKey_(0),
privateKey_(0), agreedKey_(0) {}
privateKey_(0), agreedKey_(0), pubKeyLength_(0) {}
~DHImpl()
{
ysArrayDelete(agreedKey_);
Expand All @@ -759,7 +760,7 @@ struct DiffieHellman::DHImpl {
}

DHImpl(const DHImpl& that) : dh_(that.dh_), ranPool_(that.ranPool_),
publicKey_(0), privateKey_(0), agreedKey_(0)
publicKey_(0), privateKey_(0), agreedKey_(0), pubKeyLength_(0)
{
uint length = dh_.GetByteLength();
AllocKeys(length, length, length);
Expand Down Expand Up @@ -807,7 +808,7 @@ DiffieHellman::DiffieHellman(const byte* p, unsigned int pSz, const byte* g,
using TaoCrypt::Integer;

pimpl_->dh_.Initialize(Integer(p, pSz).Ref(), Integer(g, gSz).Ref());
pimpl_->publicKey_ = NEW_YS opaque[pubSz];
pimpl_->publicKey_ = NEW_YS opaque[pimpl_->pubKeyLength_ = pubSz];
memcpy(pimpl_->publicKey_, pub, pubSz);
}

Expand Down Expand Up @@ -866,6 +867,10 @@ const byte* DiffieHellman::get_agreedKey() const
return pimpl_->agreedKey_;
}

uint DiffieHellman::get_publicKeyLength() const
{
return pimpl_->pubKeyLength_;
}

const byte* DiffieHellman::get_publicKey() const
{
Expand Down
15 changes: 4 additions & 11 deletions extra/yassl/src/yassl_imp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,12 @@ void ClientDiffieHellmanPublic::build(SSL& ssl)
uint keyLength = dhClient.get_agreedKeyLength(); // pub and agree same

alloc(keyLength, true);
dhClient.makeAgreement(dhServer.get_publicKey(), keyLength);
dhClient.makeAgreement(dhServer.get_publicKey(),
dhServer.get_publicKeyLength());
c16toa(keyLength, Yc_);
memcpy(Yc_ + KEY_OFFSET, dhClient.get_publicKey(), keyLength);

// because of encoding first byte might be zero, don't use it for preMaster
if (*dhClient.get_agreedKey() == 0)
ssl.set_preMaster(dhClient.get_agreedKey() + 1, keyLength - 1);
else
ssl.set_preMaster(dhClient.get_agreedKey(), keyLength);
ssl.set_preMaster(dhClient.get_agreedKey(), keyLength);
}


Expand Down Expand Up @@ -321,11 +318,7 @@ void ClientDiffieHellmanPublic::read(SSL& ssl, input_buffer& input)
}
dh.makeAgreement(Yc_, keyLength);

// because of encoding, first byte might be 0, don't use for preMaster
if (*dh.get_agreedKey() == 0)
ssl.set_preMaster(dh.get_agreedKey() + 1, dh.get_agreedKeyLength() - 1);
else
ssl.set_preMaster(dh.get_agreedKey(), dh.get_agreedKeyLength());
ssl.set_preMaster(dh.get_agreedKey(), dh.get_agreedKeyLength());
ssl.makeMasterSecret();
}

Expand Down
15 changes: 15 additions & 0 deletions extra/yassl/src/yassl_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,19 @@ void SSL::set_random(const opaque* random, ConnectionEnd sender)
// store client pre master secret
void SSL::set_preMaster(const opaque* pre, uint sz)
{
uint i(0); // trim leading zeros
uint fullSz(sz);

while (i++ < fullSz && *pre == 0) {
sz--;
pre++;
}

if (sz == 0) {
SetError(bad_input);
return;
}

secure_.use_connection().AllocPreSecret(sz);
memcpy(secure_.use_connection().pre_master_secret_, pre, sz);
}
Expand Down Expand Up @@ -976,6 +989,8 @@ void SSL::order_error()
// Create and store the master secret see page 32, 6.1
void SSL::makeMasterSecret()
{
if (GetError()) return;

if (isTLS())
makeTLSMasterSecret();
else {
Expand Down
6 changes: 3 additions & 3 deletions include/ft_global.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2015, 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 @@ -25,8 +25,8 @@
extern "C" {
#endif

#define HA_FT_MAXBYTELEN 254
#define HA_FT_MAXCHARLEN (HA_FT_MAXBYTELEN/3)
#define HA_FT_MAXBYTELEN 336
#define HA_FT_MAXCHARLEN (HA_FT_MAXBYTELEN/4)

#define DEFAULT_FTB_SYNTAX "+ -><()~*:\"\"&|"

Expand Down
5 changes: 4 additions & 1 deletion include/my_pthread.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2016, 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 Down Expand Up @@ -94,6 +94,7 @@ typedef volatile LONG my_pthread_once_t;
windows implementation of pthread_cond_timedwait
*/

#ifndef HAVE_STRUCT_TIMESPEC
/*
Declare a union to make sure FILETIME is properly aligned
so it can be used directly as a 64 bit value. The value
Expand Down Expand Up @@ -135,6 +136,8 @@ struct timespec {
#define diff_timespec(TS1, TS2) \
((TS1.tv.i64 - TS2.tv.i64) * 100)

#endif

int win_pthread_mutex_trylock(pthread_mutex_t *mutex);
int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *);
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
Expand Down
2 changes: 1 addition & 1 deletion include/mysql/thread_pool_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void end_connection(THD *thd);
/* Release resources of the THD object */
void thd_release_resources(THD *thd);
/* Decrement connection counter */
void dec_connection_count();
void dec_connection_count(THD *thd);
/* Destroy THD object */
void destroy_thd(THD *thd);
/* Remove the THD from the set of global threads. */
Expand Down
4 changes: 2 additions & 2 deletions include/welcome_copyright_notice.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2010, 2016, 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,7 +16,7 @@
#ifndef _welcome_copyright_notice_h_
#define _welcome_copyright_notice_h_

#define COPYRIGHT_NOTICE_CURRENT_YEAR "2015"
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2016"

/*
This define specifies copyright notice which is displayed by every MySQL
Expand Down
Loading

0 comments on commit 445b7dd

Please sign in to comment.