ports/databases/mysql80-server/files/patch-sql_mysqld.cc
Mahdi Mokhtari 017db20ddf databases/mysql80-{client, server}: Update ports to latest version 8.0.13
This update fixes several issues including CVEs.
Bug-fixes:
	- Return better error messages for OpenSSL errors
	- Incorrect copying of an integer value by X Plugin caused an
	    error relating to misaligned memory access
Improvement:
	- Important Change: X Protocol now provides a connection pooling option

Upstream notes: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-13

While here, fix the build with GCC-based architectures too (ported from fix on MySQL57)

Sponsored by:	The FreeBSD Foundation
2019-01-13 23:24:27 +00:00

29 lines
1.1 KiB
C++

--- sql/mysqld.cc.orig 2018-10-07 08:44:22 UTC
+++ sql/mysqld.cc
@@ -4493,7 +4493,7 @@ static int warn_self_signed_ca() {
static PSI_memory_key key_memory_openssl = PSI_NOT_INSTRUMENTED;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
#define FILE_LINE_ARGS
#else
#define FILE_LINE_ARGS , const char *, int
@@ -4530,7 +4530,7 @@ static void init_ssl() {
static int init_ssl_communication() {
#ifdef HAVE_OPENSSL
-#ifndef HAVE_WOLFSSL
+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
int ret_fips_mode = set_fips_mode(opt_ssl_fips_mode, ssl_err_string);
if (ret_fips_mode != 1) {
@@ -8919,7 +8919,7 @@ bool mysqld_get_one_option(int optid,
One can disable SSL later by using --skip-ssl or --ssl=0.
*/
opt_use_ssl = true;
-#ifdef HAVE_WOLFSSL
+#if defined(HAVE_WOLFSSL) || defined(LIBRESSL_VERSION_NUMBER)
/* crl has no effect in wolfSSL. */
opt_ssl_crl = NULL;
opt_ssl_crlpath = NULL;