Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
mariadb
Commits
a5679af1
Commit
a5679af1
authored
9 years ago
by
Sergei Golubchik
Browse files
Options
Download
Plain Diff
Merge branch '10.0' into 10.1
parents
20c4dfd4
5f2f3c4f
Changes
222
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
173 additions
and
126 deletions
+173
-126
.gitignore
.gitignore
+3
-0
CREDITS
CREDITS
+26
-19
README
README
+4
-4
VERSION
VERSION
+0
-1
client/mysql.cc
client/mysql.cc
+41
-36
client/mysql_upgrade.c
client/mysql_upgrade.c
+2
-2
cmake/dtrace.cmake
cmake/dtrace.cmake
+3
-0
cmake/jemalloc.cmake
cmake/jemalloc.cmake
+22
-27
configure.cmake
configure.cmake
+23
-3
extra/yassl/README
extra/yassl/README
+11
-0
extra/yassl/include/crypto_wrapper.hpp
extra/yassl/include/crypto_wrapper.hpp
+1
-0
extra/yassl/include/openssl/ssl.h
extra/yassl/include/openssl/ssl.h
+1
-1
extra/yassl/src/crypto_wrapper.cpp
extra/yassl/src/crypto_wrapper.cpp
+8
-3
extra/yassl/src/yassl_imp.cpp
extra/yassl/src/yassl_imp.cpp
+4
-11
extra/yassl/src/yassl_int.cpp
extra/yassl/src/yassl_int.cpp
+15
-0
include/byte_order_generic_x86_64.h
include/byte_order_generic_x86_64.h
+1
-1
include/my_global.h
include/my_global.h
+4
-15
include/probes_mysql_nodtrace.h.in
include/probes_mysql_nodtrace.h.in
+0
-0
include/welcome_copyright_notice.h
include/welcome_copyright_notice.h
+3
-3
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_cases.pm
+1
-0
No files found.
.gitignore
View file @
a5679af1
...
...
@@ -59,6 +59,9 @@ include/mysql_version.h
include/mysqld_ername.h
include/mysqld_error.h
include/sql_state.h
include/probes_mysql.d
include/probes_mysql_dtrace.h
include/probes_mysql_nodtrace.h
info_macros.cmake
libmysql*/libmysql*_exports_file.cc
libmysql*/merge_archives_mysql*.cmake
...
...
This diff is collapsed.
Click to expand it.
CREDITS
View file @
a5679af1
MariaDB is brought to you by the MariaDB
f
oundation, a
USA
non profit
organization.
MariaDB is brought to you by the MariaDB
F
oundation, a non profit
organization
registered in the USA
.
The current main members and sponsors of the MariaDB
f
oundation are:
The current main members and sponsors of the MariaDB
F
oundation are:
Automattic http://automattic.com (2014)
SkySQL Ab http://www.skysql.com (2013, 2014)
Booking.com http://www.booking.com (2013)
Parallels http://www.parallels.com/products/plesk (2013)
MariaDB Corporation http://www.mariadb.com (2013 - 2016)
Booking.com http://www.booking.com (2013 - 2016)
Parallels http://www.parallels.com/products/plesk (2013 - 2016)
Automattic http://automattic.com (2014 - 2016)
Verkkokauppa.com http://verkkokauppa.com (2015 - 2016)
Visma http://visma.com/ (2015 - 2016)
Webyog http://webyog.com (2015 - 2016)
Wikimedia Foundation http://wikimedia.org (2015 - 2016)
Acronis http://acronis.com (2016)
For a full list of supporters and sponsors see
https://mariadb.org/
en
/supporters/
https://mariadb.org/
about
/supporters/
You can also do this by
do
ing SHOW CONTRIBUTORS.
You can also do this by
runn
ing SHOW CONTRIBUTORS.
For all corporate memberships and sponsorships please contact the
MariaDB
f
oundation Board via foundation@mariadb.org.
MariaDB
F
oundation Board via foundation@mariadb.org.
The MariaDB
f
oundation is responsible for the MariaDB source
The MariaDB
F
oundation is responsible for the MariaDB source
repository, the official MariaDB binaries and http://mariadb.org.
The MariaDB
f
oundation provides
also
, among other things, the
The MariaDB
F
oundation
also
provides, among other things, the
following services to the MariaDB community:
- Code reviews and applying patches for MariaDB
...
...
@@ -28,17 +33,19 @@ following services to the MariaDB community:
- Bug fixing in MariaDB (for bugs that affects a large part of the community)
- Building the official MariaDB binaries
- Maintaining http://mariadb.org
- Documenting MariaDB in the MariaDB Knowledge Base http://mariadb.com/kb
To be able to do the above we need help from co
ope
rations and individuals!
To be able to do the above we need help from co
rpo
rations and individuals!
You can help support MariaDB by be becoming a MariaDB developer or a
member or sponsor of the MariaDB foundation!
You can help support MariaDB by becoming a MariaDB developer or a
member or sponsor of the MariaDB Foundation. To donate or sponsor,
go to https://mariadb.org/donate/
You can get a list of all main authors of MariaDB / MySQL by
do
ing
You can get a list of all
the
main authors of MariaDB / MySQL by
runn
ing
SHOW AUTHORS;
You can get a list sponsors and contributors by
do
ing
You can get a list sponsors and contributors by
runn
ing
SHOW CONTRIBUTORS;
You can read more about the MariaDB
f
oundation at:
https://mariadb.org/
en/foundation
/
You can read more about the MariaDB
F
oundation at:
https://mariadb.org/
about
/
This diff is collapsed.
Click to expand it.
README
View file @
a5679af1
MariaDB is designed as a drop-in replacement of MySQL(R) with more
features, new storage engines, fewer bugs, and better performance.
MariaDB is brought to you by the MariaDB
f
oundation.
Please read the
file
CREDITS for details about the MariaDB
f
oundation,
MariaDB is brought to you by the MariaDB
F
oundation.
Please read the CREDITS
file
for details about the MariaDB
F
oundation,
and who is developing MariaDB.
MariaDB is developed by many of the original developers of MySQL who
now work for MariadB
f
oundation and
SkySQL Ab
, and by many people in
now work for
the
MariadB
F
oundation and
the MariaDB Corporation
, and by many people in
the community.
MySQL, which is the base of MariaDB, is a product and trademark of Oracle
Corporation, Inc. For a list of developers and other contributors,
see the Credits appendix. You can also
do
'SHOW authors' to get a
see the Credits appendix. You can also
run
'SHOW authors' to get a
list of active contributors.
A description of the MariaDB project and a manual can be found at:
...
...
This diff is collapsed.
Click to expand it.
VERSION
View file @
a5679af1
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=1
MYSQL_VERSION_PATCH=12
MYSQL_VERSION_EXTRA=
This diff is collapsed.
Click to expand it.
client/mysql.cc
View file @
a5679af1
...
...
@@ -1344,6 +1344,44 @@ sig_handler mysql_end(int sig)
exit
(
status
.
exit_status
);
}
/*
set connection-specific options and call mysql_real_connect
*/
static
bool
do_connect
(
MYSQL
*
mysql
,
const
char
*
host
,
const
char
*
user
,
const
char
*
password
,
const
char
*
database
,
ulong
flags
)
{
if
(
opt_secure_auth
)
mysql_options
(
mysql
,
MYSQL_SECURE_AUTH
,
(
char
*
)
&
opt_secure_auth
);
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
if
(
opt_use_ssl
)
{
mysql_ssl_set
(
mysql
,
opt_ssl_key
,
opt_ssl_cert
,
opt_ssl_ca
,
opt_ssl_capath
,
opt_ssl_cipher
);
mysql_options
(
mysql
,
MYSQL_OPT_SSL_CRL
,
opt_ssl_crl
);
mysql_options
(
mysql
,
MYSQL_OPT_SSL_CRLPATH
,
opt_ssl_crlpath
);
}
mysql_options
(
mysql
,
MYSQL_OPT_SSL_VERIFY_SERVER_CERT
,
(
char
*
)
&
opt_ssl_verify_server_cert
);
#endif
if
(
opt_protocol
)
mysql_options
(
mysql
,
MYSQL_OPT_PROTOCOL
,(
char
*
)
&
opt_protocol
);
#ifdef HAVE_SMEM
if
(
shared_memory_base_name
)
mysql_options
(
mysql
,
MYSQL_SHARED_MEMORY_BASE_NAME
,
shared_memory_base_name
);
#endif
if
(
opt_plugin_dir
&&
*
opt_plugin_dir
)
mysql_options
(
mysql
,
MYSQL_PLUGIN_DIR
,
opt_plugin_dir
);
if
(
opt_default_auth
&&
*
opt_default_auth
)
mysql_options
(
mysql
,
MYSQL_DEFAULT_AUTH
,
opt_default_auth
);
mysql_options
(
mysql
,
MYSQL_OPT_CONNECT_ATTR_RESET
,
0
);
mysql_options4
(
mysql
,
MYSQL_OPT_CONNECT_ATTR_ADD
,
"program_name"
,
"mysql"
);
return
mysql_real_connect
(
mysql
,
host
,
user
,
password
,
database
,
opt_mysql_port
,
opt_mysql_unix_port
,
flags
);
}
/*
This function handles sigint calls
...
...
@@ -1365,11 +1403,7 @@ sig_handler handle_sigint(int sig)
}
kill_mysql
=
mysql_init
(
kill_mysql
);
mysql_options(kill_mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
mysql_options4(kill_mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
"program_name", "mysql");
if (!mysql_real_connect(kill_mysql,current_host, current_user, opt_password,
"", opt_mysql_port, opt_mysql_unix_port,0))
if
(
!
do_connect
(
kill_mysql
,
current_host
,
current_user
,
opt_password
,
""
,
0
))
{
tee_fprintf
(
stdout
,
"Ctrl-C -- sorry, cannot connect to server to kill query, giving up ...
\n
"
);
goto
err
;
...
...
@@ -4576,27 +4610,8 @@ sql_real_connect(char *host,char *database,char *user,char *password,
}
if
(
opt_compress
)
mysql_options
(
&
mysql
,
MYSQL_OPT_COMPRESS
,
NullS
);
if (opt_secure_auth)
mysql_options(&mysql, MYSQL_SECURE_AUTH, (char *) &opt_secure_auth);
if
(
using_opt_local_infile
)
mysql_options
(
&
mysql
,
MYSQL_OPT_LOCAL_INFILE
,
(
char
*
)
&
opt_local_infile
);
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
if (opt_use_ssl)
{
mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher);
mysql_options(&mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
mysql_options(&mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
}
mysql_options(&mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
(char*)&opt_ssl_verify_server_cert);
#endif
if (opt_protocol)
mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
#ifdef HAVE_SMEM
if (shared_memory_base_name)
mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
#endif
if
(
safe_updates
)
{
char
init_command
[
100
];
...
...
@@ -4608,18 +4623,8 @@ sql_real_connect(char *host,char *database,char *user,char *password,
mysql_options
(
&
mysql
,
MYSQL_SET_CHARSET_NAME
,
default_charset
);
if (opt_plugin_dir && *opt_plugin_dir)
mysql_options(&mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
if (opt_default_auth && *opt_default_auth)
mysql_options(&mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
mysql_options(&mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
mysql_options4(&mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
"program_name", "mysql");
if (!mysql_real_connect(&mysql, host, user, password,
database, opt_mysql_port, opt_mysql_unix_port,
connect_flag | CLIENT_MULTI_STATEMENTS))
if
(
!
do_connect
(
&
mysql
,
host
,
user
,
password
,
database
,
connect_flag
|
CLIENT_MULTI_STATEMENTS
))
{
if
(
!
silent
||
(
mysql_errno
(
&
mysql
)
!=
CR_CONN_HOST_ERROR
&&
...
...
This diff is collapsed.
Click to expand it.
client/mysql_upgrade.c
View file @
a5679af1
...
...
@@ -184,7 +184,8 @@ static const char *load_default_groups[]=
static
void
free_used_memory
(
void
)
{
/* Free memory allocated by 'load_defaults' */
free_defaults
(
defaults_argv
);
if
(
defaults_argv
)
free_defaults
(
defaults_argv
);
dynstr_free
(
&
ds_args
);
dynstr_free
(
&
conn_args
);
...
...
@@ -1110,7 +1111,6 @@ int main(int argc, char **argv)
if
(
opt_systables_only
&&
!
opt_silent
)
printf
(
"The --upgrade-system-tables option was used, user tables won't be touched.
\n
"
);
/*
Read the mysql_upgrade_info file to check if mysql_upgrade
already has been run for this installation of MySQL
...
...
This diff is collapsed.
Click to expand it.
cmake/dtrace.cmake
View file @
a5679af1
...
...
@@ -86,6 +86,9 @@ IF(ENABLE_DTRACE)
${
CMAKE_BINARY_DIR
}
/include/probes_mysql_dtrace.h
${
CMAKE_BINARY_DIR
}
/include/probes_mysql_nodtrace.h
)
ELSE
()
CONFIGURE_FILE
(
${
CMAKE_SOURCE_DIR
}
/include/probes_mysql_nodtrace.h.in
${
CMAKE_BINARY_DIR
}
/include/probes_mysql_nodtrace.h COPYONLY
)
ENDIF
()
FUNCTION
(
DTRACE_INSTRUMENT target
)
...
...
This diff is collapsed.
Click to expand it.
cmake/jemalloc.cmake
View file @
a5679af1
...
...
@@ -3,20 +3,6 @@ INCLUDE (CheckLibraryExists)
SET
(
WITH_JEMALLOC auto CACHE STRING
"Build with jemalloc. Possible values are 'yes', 'no', 'static', 'auto'"
)
MACRO
(
JEMALLOC_TRY_STATIC
)
SET
(
libname jemalloc_pic
)
SET
(
CMAKE_REQUIRED_LIBRARIES pthread dl m
)
SET
(
what bundled
)
CHECK_LIBRARY_EXISTS
(
${
libname
}
malloc_stats_print
""
HAVE_STATIC_JEMALLOC
)
SET
(
CMAKE_REQUIRED_LIBRARIES
)
ENDMACRO
()
MACRO
(
JEMALLOC_TRY_DYNAMIC
)
SET
(
libname jemalloc
)
SET
(
what system
)
CHECK_LIBRARY_EXISTS
(
${
libname
}
malloc_stats_print
""
HAVE_DYNAMIC_JEMALLOC
)
ENDMACRO
()
MACRO
(
CHECK_JEMALLOC
)
# compatibility with old WITH_JEMALLOC values
IF
(
WITH_JEMALLOC STREQUAL
"bundled"
)
...
...
@@ -26,21 +12,30 @@ MACRO (CHECK_JEMALLOC)
SET
(
WITH_JEMALLOC
"yes"
)
ENDIF
()
IF
(
WITH_JEMALLOC STREQUAL
"yes"
OR WITH_JEMALLOC STREQUAL
"auto"
)
JEMALLOC_TRY_DYNAMIC
()
ENDIF
()
IF
(
WITH_JEMALLOC STREQUAL
"yes"
OR WITH_JEMALLOC STREQUAL
"auto"
OR
WITH_JEMALLOC STREQUAL
"static"
)
IF
(
WITH_JEMALLOC STREQUAL
"static"
OR WITH_JEMALLOC STREQUAL
"auto"
AND NOT HAVE_DYNAMIC_JEMALLOC
)
JEMALLOC_TRY_STATIC
()
ENDIF
()
IF
(
WITH_JEMALLOC STREQUAL
"static"
)
SET
(
libname jemalloc_pic
)
SET
(
CMAKE_REQUIRED_LIBRARIES pthread dl m
)
SET
(
what bundled
)
ELSE
()
SET
(
libname jemalloc c
)
SET
(
what system
)
ENDIF
()
FOREACH
(
lib
${
libname
}
)
CHECK_LIBRARY_EXISTS
(
${
lib
}
malloc_stats_print
""
HAVE_JEMALLOC_IN_
${
lib
}
)
IF
(
HAVE_JEMALLOC_IN_
${
lib
}
)
SET
(
LIBJEMALLOC
${
lib
}
)
SET
(
MALLOC_LIBRARY
"
${
what
}
jemalloc"
)
BREAK
()
ENDIF
()
ENDFOREACH
()
SET
(
CMAKE_REQUIRED_LIBRARIES
)
IF
(
libname
)
IF
(
HAVE_DYNAMIC_JEMALLOC OR HAVE_STATIC_JEMALLOC
)
SET
(
LIBJEMALLOC
${
libname
}
)
SET
(
MALLOC_LIBRARY
"
${
what
}
jemalloc"
)
ELSEIF
(
NOT WITH_JEMALLOC STREQUAL
"auto"
)
MESSAGE
(
FATAL_ERROR
"
${
libname
}
is not found"
)
IF
(
NOT LIBJEMALLOC AND NOT WITH_JEMALLOC STREQUAL
"auto"
)
MESSAGE
(
FATAL_ERROR
"jemalloc is not found"
)
ENDIF
()
ENDIF
()
ENDMACRO
()
This diff is collapsed.
Click to expand it.
configure.cmake
View file @
a5679af1
...
...
@@ -799,16 +799,36 @@ ENDIF()
#
# Test for how the C compiler does inline, if at all
#
# SunPro is weird, apparently it only supports inline at -xO3 or -xO4.
# And if CMAKE_C_FLAGS has -xO4 but CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} has -xO2
# then CHECK_C_SOURCE_COMPILES will succeed but the built will fail.
# We must test all flags here.
# XXX actually, we can do this for all compilers, not only SunPro
IF
(
CMAKE_CXX_COMPILER_ID MATCHES
"SunPro"
AND
CMAKE_GENERATOR MATCHES
"Makefiles"
)
STRING
(
TOUPPER
"CMAKE_C_FLAGS_
${
CMAKE_BUILD_TYPE
}
"
flags
)
SET
(
CMAKE_REQUIRED_FLAGS
"
${${
flags
}}
"
)
ENDIF
()
CHECK_C_SOURCE_COMPILES
(
"
static inline int foo(){return 0;}
extern int bar(int x);
static inline int foo(){return bar(1);}
int main(int argc, char *argv[]){return 0;}"
C_HAS_inline
)
IF
(
NOT C_HAS_inline
)
CHECK_C_SOURCE_COMPILES
(
"
static __inline int foo(){return 0;}
extern int bar(int x);
static __inline int foo(){return bar(1);}
int main(int argc, char *argv[]){return 0;}"
C_HAS___inline
)
SET
(
C_INLINE __inline
)
IF
(
C_HAS___inline
)
SET
(
C_INLINE __inline
)
ElSE
()
SET
(
C_INLINE
)
MESSAGE
(
WARNING
"C compiler does not support funcion inlining"
)
IF
(
NOT NOINLINE
)
MESSAGE
(
FATAL_ERROR
"Use -DNOINLINE=TRUE to allow compilation without inlining"
)
ENDIF
()
ENDIF
()
ENDIF
()
IF
(
NOT CMAKE_CROSSCOMPILING AND NOT MSVC
)
...
...
This diff is collapsed.
Click to expand it.
extra/yassl/README
View file @
a5679af1
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
extra/yassl/include/crypto_wrapper.hpp
View file @
a5679af1
...
...
@@ -378,6 +378,7 @@ public:
uint
get_agreedKeyLength
()
const
;
const
byte
*
get_agreedKey
()
const
;
uint
get_publicKeyLength
()
const
;
const
byte
*
get_publicKey
()
const
;
void
makeAgreement
(
const
byte
*
,
unsigned
int
);
...
...
This diff is collapsed.
Click to expand it.
extra/yassl/include/openssl/ssl.h
View file @
a5679af1
...
...
@@ -34,7 +34,7 @@
#include "rsa.h"
#define YASSL_VERSION "2.3.
8
"
#define YASSL_VERSION "2.3.
9
"
#if defined(__cplusplus)
...
...
This diff is collapsed.
Click to expand it.
extra/yassl/src/crypto_wrapper.cpp
View file @
a5679af1
...
...
@@ -751,9 +751,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_
);
...
...
@@ -762,7 +763,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
);
...
...
@@ -810,7 +811,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
);
}
...
...
@@ -869,6 +870,10 @@ const byte* DiffieHellman::get_agreedKey() const
return
pimpl_
->
agreedKey_
;
}
uint
DiffieHellman
::
get_publicKeyLength
()
const
{
return
pimpl_
->
pubKeyLength_
;
}
const
byte
*
DiffieHellman
::
get_publicKey
()
const
{
...
...
This diff is collapsed.
Click to expand it.
extra/yassl/src/yassl_imp.cpp
View file @
a5679af1
...
...
@@ -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
);
}
...
...
@@ -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
();
}
...
...
This diff is collapsed.
Click to expand it.
extra/yassl/src/yassl_int.cpp
View file @
a5679af1
...
...
@@ -807,6 +807,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
);
}
...
...
@@ -924,6 +937,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
{
...
...
This diff is collapsed.
Click to expand it.
include/byte_order_generic_x86_64.h
View file @
a5679af1
...
...
@@ -31,7 +31,7 @@
Attention: Please, note, uint3korr reads 4 bytes (not 3)!
It means, that you have to provide enough allocated space.
*/
#if defined(HAVE_
purify
) && !defined(_WIN32)
#if defined(HAVE_
valgrind
) && !defined(_WIN32)
#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
(((uint32) ((uchar) (A)[1])) << 8) +\
(((uint32) ((uchar) (A)[2])) << 16))
...
...
This diff is collapsed.
Click to expand it.
include/my_global.h
View file @
a5679af1
...
...
@@ -200,20 +200,6 @@
#define likely(x) __builtin_expect(((x) != 0),1)
#define unlikely(x) __builtin_expect(((x) != 0),0)
/*
now let's figure out if inline functions are supported
autoconf defines 'inline' to be empty, if not
*/
#define inline_test_1(X) X ## 1
#define inline_test_2(X) inline_test_1(X)
#if inline_test_2(inline) != 1
#define HAVE_INLINE
#else
#error Compiler does not support inline!
#endif
#undef inline_test_2
#undef inline_test_1
/* Fix problem with S_ISLNK() on Linux */
#if defined(TARGET_OS_LINUX) || defined(__GLIBC__)
#undef _GNU_SOURCE
...
...
@@ -454,7 +440,7 @@ extern "C" int madvise(void *addr, size_t len, int behav);
#endif
#ifndef STDERR_FILENO
#define STDERR_FILENO
2
#define STDERR_FILENO
fileno(stderr)
#endif
#ifndef SO_EXT
...
...
@@ -825,6 +811,9 @@ inline unsigned long long my_double2ulonglong(double d)
#else
#define finite(x) (1.0 / fabs(x) > 0.0)
#endif
/* HAVE_FINITE */
#elif (__cplusplus >= 201103L)
#include <cmath>
static
inline
bool
isfinite
(
double
x
)
{
return
std
::
isfinite
(
x
);
}
#endif
/* isfinite */
#ifndef HAVE_ISNAN
...
...
This diff is collapsed.
Click to expand it.
include/probes_mysql_nodtrace.h
→
include/probes_mysql_nodtrace.h
.in
View file @
a5679af1
File moved
This diff is collapsed.
Click to expand it.
include/welcome_copyright_notice.h
View file @
a5679af1
/* Copyright (c) 2011, 201
5
, Oracle and/or its affiliates.
Copyright (c) 2011, 201
5
, MariaDB
/* Copyright (c) 2011, 201
6
, Oracle and/or its affiliates.
Copyright (c) 2011, 201
6
, MariaDB
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
...
...
@@ -17,7 +17,7 @@
#ifndef _welcome_copyright_notice_h_
#define _welcome_copyright_notice_h_
#define COPYRIGHT_NOTICE_CURRENT_YEAR "201
5
"
#define COPYRIGHT_NOTICE_CURRENT_YEAR "201
6
"
/*
This define specifies copyright notice which is displayed by every MySQL
...
...
This diff is collapsed.
Click to expand it.
mysql-test/lib/mtr_cases.pm
View file @
a5679af1
...
...
@@ -496,6 +496,7 @@ sub process_suite {
# disabled.def
parse_disabled
(
$suite
->
{
dir
}
.
'
/disabled.def
',
$suitename
);
parse_disabled
(
$suite
->
{
dir
}
.
'
/t/disabled.def
',
$suitename
);
# combinations
if
(
@
::
opt_combinations
)
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
…
12
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment