git: cc257a5eaf1f - main - databases/mysq57-{client, server}: Update to latest release 5.7.43

From: Jochen Neumeister <joneum_at_FreeBSD.org>
Date: Thu, 16 Nov 2023 19:10:49 UTC
The branch main has been updated by joneum:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cc257a5eaf1f5ea45513df8d46bc60db9ea5b908

commit cc257a5eaf1f5ea45513df8d46bc60db9ea5b908
Author:     User Joneum <joneum@joneumbox.org>
AuthorDate: 2023-11-16 19:03:22 +0000
Commit:     Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2023-11-16 19:08:39 +0000

    databases/mysq57-{client, server}: Update to latest release 5.7.43
    
    Bugs Fixed
    
    Group Replication: After one machine halted and restarted in a
    three-node MySQL InnoDB Cluster, one node failed to start; after
    restarting all nodes, the cluster shut down unexpectedly.
    
    Our thanks to Zetang Zeng for the contribution. (Bug #34976442)
    
    Fortified parsing of the network packet data sent by the server to
    the client. (Bug #35374491)
    
    Some floating-point literals were not always handled correctly. (Bug
    
    Executing a query with an implicit aggregation should return exactly
    one row, unless the query has a HAVING clause that filters out the row,
    but a query with a HAVING clause which evaluated to FALSE sometimes
    ignored this, and returned a row regardless. (Bug #14272020)
    
    During optimization, range-select tree creation uses logic which
    differs based on the left-hand side of the IN() predicate. For a field
    item, each value on the right-hand side is added to an OR tree to create
    the necessary expression. In the case of a row item comparison (example:
    WHERE (a,b) IN ((n1,m1), (n2, m2), ...)), an expression in disjunctive
    normal form (DNF) is needed. A DNF expression is created by adding an
    AND tree with column values to an OR tree for each set of RHS values,
    but instead the OR tree was added to the AND tree causing the tree merge
    to require exponential time due to O(n2) runtime complexity. (Bug
    
    Changelog: https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-43.html
    
    Sponsored by:   Netzkommune GmbH
---
 .../mysql57-client/files/patch-cmake_ssl.cmake     | 62 ++--------------------
 databases/mysql57-server/Makefile                  |  2 +-
 databases/mysql57-server/distinfo                  |  6 +--
 .../mysql57-server/files/patch-cmake_ssl.cmake     | 17 +++---
 4 files changed, 17 insertions(+), 70 deletions(-)

diff --git a/databases/mysql57-client/files/patch-cmake_ssl.cmake b/databases/mysql57-client/files/patch-cmake_ssl.cmake
index 014ae927331a..6efbcd0e492d 100644
--- a/databases/mysql57-client/files/patch-cmake_ssl.cmake
+++ b/databases/mysql57-client/files/patch-cmake_ssl.cmake
@@ -1,6 +1,6 @@
---- cmake/ssl.cmake.orig	2023-03-16 22:25:04.000000000 +0700
-+++ cmake/ssl.cmake	2023-06-13 12:11:25.125506000 +0700
-@@ -176,24 +176,32 @@ MACRO (MYSQL_CHECK_SSL)
+--- cmake/ssl.cmake.orig	2023-10-25 22:22:28.748647000 +0200
++++ cmake/ssl.cmake	2023-10-30 19:12:39.388494000 +0100
+@@ -232,13 +232,6 @@ MACRO (MYSQL_CHECK_SSL)
        MESSAGE(STATUS "OPENSSL_APPLINK_C ${OPENSSL_APPLINK_C}")
      ENDIF()
  
@@ -14,46 +14,9 @@
      FIND_LIBRARY(OPENSSL_LIBRARY
                   NAMES ssl libssl ssleay32 ssleay32MD
                   HINTS ${OPENSSL_ROOT_DIR}/lib)
-     FIND_LIBRARY(CRYPTO_LIBRARY
-                  NAMES crypto libcrypto libeay32
-                  HINTS ${OPENSSL_ROOT_DIR}/lib)
--    IF (WITH_SSL_PATH)
--      LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
--    ENDIF()
--
-     IF(OPENSSL_INCLUDE_DIR)
-+     FOREACH(version_part
-+        OPENSSL_VERSION_MAJOR
-+        OPENSSL_VERSION_MINOR
-+        OPENSSL_VERSION_PATCH
-+     )
-+        FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" ${version_part}
-+        REGEX "^#[\t ]*define[\t ]+${version_part}[\t ]+([0-9]+).*")
-+        STRING(REGEX REPLACE
-+          "^.*${version_part}[\t ]+([0-9]+).*" "\\1"
-+          ${version_part} "${${version_part}}")
-+     ENDFOREACH()
-+
-+     IF(OPENSSL_VERSION_MAJOR VERSION_EQUAL 3)
-+      # OpenSSL 3
-+        SET(OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_MAJOR}")
-+        SET(OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_MINOR}")
-+        SET(OPENSSL_FIX_VERSION "${OPENSSL_VERSION_PATCH}")
-+        SET(OPENSSL_FOUND TRUE)
-+     ELSE()
-       # Verify version number. Version information looks like:
-       #   #define OPENSSL_VERSION_NUMBER 0x1000103fL
-       # Encoded as MNNFFPPS: major minor fix patch status
-@@ -213,15 +221,17 @@ MACRO (MYSQL_CHECK_SSL)
-         "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
-         OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
-         )
-+     ENDIF()
+@@ -253,9 +246,10 @@ MACRO (MYSQL_CHECK_SSL)
+       FIND_OPENSSL_VERSION()
      ENDIF()
-     SET(OPENSSL_VERSION
-       "${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}"
-       )
-     SET(OPENSSL_VERSION ${OPENSSL_VERSION} CACHE INTERNAL "")
  
 -    IF("${OPENSSL_VERSION}" VERSION_GREATER "1.1.0")
 -       ADD_DEFINITIONS(-DHAVE_TLSv13)
@@ -65,18 +28,3 @@
         IF(SOLARIS)
           SET(FORCE_SSL_SOLARIS "-Wl,--undefined,address_of_sk_new_null")
         ENDIF()
-@@ -229,7 +239,13 @@ MACRO (MYSQL_CHECK_SSL)
-     IF(OPENSSL_INCLUDE_DIR AND
-        OPENSSL_LIBRARY   AND
-        CRYPTO_LIBRARY      AND
--       OPENSSL_MAJOR_VERSION STREQUAL "1"
-+       OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1"
-+      )
-+      SET(OPENSSL_FOUND TRUE)
-+    ELSEIF(OPENSSL_INCLUDE_DIR AND
-+       OPENSSL_LIBRARY   AND
-+       CRYPTO_LIBRARY      AND
-+       OPENSSL_MAJOR_VERSION STREQUAL "2"
-       )
-       SET(OPENSSL_FOUND TRUE)
-     ELSE()
diff --git a/databases/mysql57-server/Makefile b/databases/mysql57-server/Makefile
index 36e5fb57ad01..4df55337b904 100644
--- a/databases/mysql57-server/Makefile
+++ b/databases/mysql57-server/Makefile
@@ -1,5 +1,5 @@
 PORTNAME?=	mysql
-PORTVERSION=	5.7.42
+PORTVERSION=	5.7.43
 PORTREVISION?=	0
 CATEGORIES=	databases
 MASTER_SITES=	MYSQL/MySQL-5.7
diff --git a/databases/mysql57-server/distinfo b/databases/mysql57-server/distinfo
index 4ce64f6ed061..267de0d7943e 100644
--- a/databases/mysql57-server/distinfo
+++ b/databases/mysql57-server/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1686034482
-SHA256 (mysql-boost-5.7.42.tar.gz) = 7e1a7d45e7ca382eb3a992f63631c380904dd49c89f3382ec950aef01997524f
-SIZE (mysql-boost-5.7.42.tar.gz) = 53288125
+TIMESTAMP = 1697571027
+SHA256 (mysql-boost-5.7.43.tar.gz) = 22998c0fe8439a6946644f175b6f219d5f503d4c194b246a338f1dfcd87db045
+SIZE (mysql-boost-5.7.43.tar.gz) = 53291096
diff --git a/databases/mysql57-server/files/patch-cmake_ssl.cmake b/databases/mysql57-server/files/patch-cmake_ssl.cmake
index 0e70d693a90d..a82dbb94680a 100644
--- a/databases/mysql57-server/files/patch-cmake_ssl.cmake
+++ b/databases/mysql57-server/files/patch-cmake_ssl.cmake
@@ -1,6 +1,6 @@
---- cmake/ssl.cmake.orig	2019-12-06 10:41:47 UTC
-+++ cmake/ssl.cmake
-@@ -150,22 +150,12 @@ MACRO (MYSQL_CHECK_SSL)
+--- cmake/ssl.cmake.orig	2023-11-10 17:37:52.213133000 +0100
++++ cmake/ssl.cmake	2023-11-10 17:50:19.620626000 +0100
+@@ -232,30 +232,21 @@ MACRO (MYSQL_CHECK_SSL)
        MESSAGE(STATUS "OPENSSL_APPLINK_C ${OPENSSL_APPLINK_C}")
      ENDIF()
  
@@ -22,10 +22,8 @@
 -    ENDIF()
  
      IF(OPENSSL_INCLUDE_DIR)
-       # Verify version number. Version information looks like:
-@@ -193,9 +183,10 @@ MACRO (MYSQL_CHECK_SSL)
-       )
-     SET(OPENSSL_VERSION ${OPENSSL_VERSION} CACHE INTERNAL "")
+       FIND_OPENSSL_VERSION()
+     ENDIF()
  
 -    IF("${OPENSSL_VERSION}" VERSION_GREATER "1.1.0")
 -       ADD_DEFINITIONS(-DHAVE_TLSv13)
@@ -37,11 +35,12 @@
         IF(SOLARIS)
           SET(FORCE_SSL_SOLARIS "-Wl,--undefined,address_of_sk_new_null")
         ENDIF()
-@@ -203,7 +204,13 @@ MACRO (MYSQL_CHECK_SSL)
+@@ -263,8 +254,13 @@ MACRO (MYSQL_CHECK_SSL)
      IF(OPENSSL_INCLUDE_DIR AND
         OPENSSL_LIBRARY   AND
         CRYPTO_LIBRARY      AND
--       OPENSSL_MAJOR_VERSION STREQUAL "1"
+-       (OPENSSL_MAJOR_VERSION STREQUAL "1" OR
+-        OPENSSL_MAJOR_VERSION STREQUAL "3")
 +       OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1"
 +      )
 +      SET(OPENSSL_FOUND TRUE)