Fri Jan 21 11:23:50 2022 UTC ()
mysql57: updated to 5.7.37

Changes in MySQL 5.7.37

Audit Log Notes

Previously, each event logged by MySQL Enterprise Audit included the SQL statement literal text. To provide an alternative (because it is possible that statements contain sensitive information), the audit log filtering language now supports logging a statement's digest rather than its literal text. For example, instead of logging this statement:

SELECT * FROM orders WHERE some_sensitive_column=1234567
The audit log plugin can log this digest:

SELECT * FROM `orders` WHERE `some_sensitive_column` = ?
This is similar to what is already logged for prepared statements, for which parameter markers appear rather than actual data values.

To perform digest logging, use audit filter definitions that replace the statement literal text by its corresponding digest, as discussed in Replacement of Event Field Values.

Because text replacement occurs at an early auditing stage (during filtering), the choice of whether to log statement literal text or digest values applies regardless of log format written later (that is, whether the audit log plugin produces XML or JSON output).

Compilation Notes

Binary packages that include curl rather than linking to the system curl library have been upgraded to use curl 7.80.0.

SQL Function and Operator Notes

Queries making use of the MBRContains() function did not employ all available spatial indexes.

The FORMAT() function returned a formatted number without showing the thousands separator and grouping between separators when either the es_ES or es_MX locale was specified.

Packaging Notes

The GnuPG build key used to sign MySQL downloadable packages has been updated. The previous GnuPG build key is set to expire on 2022-02-16. For information about verifying the integrity and authenticity of MySQL downloadable packages using GnuPG signature checking, or to obtain a copy of our public GnuPG build key, see Signature Checking Using GnuPG.

Due to the GnuPG key update, systems configured to use repo.mysql.com may report a signature verification error when upgrading to MySQL 5.7.37 and higher or to MySQL 8.0.28 and higher using apt or yum. Use one of the following methods to resolve this issue:

Manually reinstall the MySQL APT or YUM repository setup package from https://dev.mysql.com/downloads/.

Download the MySQL GnuPG public key and add it your system GPG keyring.

For MySQL APT repository instructions, see Appendix A: Adding and Configuring the MySQL APT Repository Manually.

For MySQL YUM repository instructions, see Upgrading MySQL with the MySQL Yum Repository.

Bugs Fixed

InnoDB: The buf_validate() function in the InnoDB sources was optimized, improving performance on debug builds.

Thanks to Hobert Lu for the contribution.

Partitioning: Creating a table with nondeterministic functions in generated column expressions should not be possible, but this was not enforced in all cases; a series of one or more ALTER TABLE statements could be employed to arrive at a partitioned table with one or more such generated columns. When attempting to execute the CREATE TABLE statement obtained by running SHOW CREATE TABLE against this table, MySQL rejected the statement with a misleading error message referring to the partitioning expression rather than to the problematic column, despite the fact that the partitioning expression itself was legal.

This was caused by the result of a check for any unsafe expressions defined for a generated column (in the internal variable thd->safe_to_cache_query), which was later checked again without being cleared while parsing the partition expression, leading to an error even when the partition expression did not refer to the problematic generated column expression. Now in such cases, we reset thd->safe_to_cache_query before parsing the partition function.

The issue of allowing the use of certain nondeterminstic functions (AES_ENCRYPT(), AES_DECRYPT(), RANDOM_BYTES()) in generated columns is handled separately.

Partitioning: A query using an index other than the primary key of a partitioned table sometimes resulted in excessive CPU load.

Replication: When the PAD_CHAR_TO_FULL_LENGTH SQL mode was enabled on a replica server, trailing spaces could be added to a replication channel窶冱 name in the replication metadata repository tables, resulting in errors in replication operations that identified the channel using that data. The issue has now been fixed in MySQL 8.0 by using VARCHAR for character columns, and in MySQL 5.7 by disabling the SQL mode when reading from those tables. Thanks to Brian Yue for the contribution.

MySQL 5.7 did not handle the thread_stack variable in the same manner as MySQL 5.6 or MySQL 8.0.

It was possible in some cases to create a generated column of type SERIAL, which is not allowed.

See Numeric Data Type Syntax, and CREATE TABLE and Generated Columns, for more information

Statements which commit a transaction implicitly or explicitly are not allowed inside a trigger or a stored function. Both CREATE TRIGGER and CREATE FUNCTION should report an error (ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG) in this case, but did not correctly handle DROP TABLESPACE.

The MySQL session used for online keyring migration was not closed gracefully after the migration was complete, resulting in an 窶廣borted connection窶� note being printed to the error log.

SHOW PROCESSLIST could read freed memory when accessing the query string belonging to a connection that was in the process of deleting a prepared statement.

Privileges were not checked correctly for ALTER USER ... IDENTIFIED WITH ... BY.


(adam)
diff -r1.41 -r1.42 pkgsrc/databases/mysql57-client/Makefile
diff -r1.36 -r1.37 pkgsrc/databases/mysql57-client/Makefile.common
diff -r1.23 -r1.24 pkgsrc/databases/mysql57-client/PLIST
diff -r1.47 -r1.48 pkgsrc/databases/mysql57-client/distinfo
diff -r1.42 -r1.43 pkgsrc/databases/mysql57-server/Makefile

cvs diff -r1.41 -r1.42 pkgsrc/databases/mysql57-client/Makefile (expand / switch to unified diff)

--- pkgsrc/databases/mysql57-client/Makefile 2022/01/10 01:46:27 1.41
+++ pkgsrc/databases/mysql57-client/Makefile 2022/01/21 11:23:50 1.42
@@ -1,16 +1,15 @@ @@ -1,16 +1,15 @@
1# $NetBSD: Makefile,v 1.41 2022/01/10 01:46:27 ryoon Exp $ 1# $NetBSD: Makefile,v 1.42 2022/01/21 11:23:50 adam Exp $
2 2
3PKGNAME= ${DISTNAME:S/-/-client-/} 3PKGNAME= ${DISTNAME:S/-/-client-/}
4PKGREVISION= 1 
5COMMENT= MySQL 5, a free SQL database (client) 4COMMENT= MySQL 5, a free SQL database (client)
6 5
7CONFLICTS= mysql3-client-[0-9]* 6CONFLICTS= mysql3-client-[0-9]*
8 7
9.include "Makefile.common" 8.include "Makefile.common"
10 9
11CMAKE_ARGS+= -DWITHOUT_SERVER=ON 10CMAKE_ARGS+= -DWITHOUT_SERVER=ON
12UNWRAP_FILES+= scripts/mysql_config 11UNWRAP_FILES+= scripts/mysql_config
13INFO_FILES= yes 12INFO_FILES= yes
14INSTALL_DIRS+= client include libmysql man scripts testclients 13INSTALL_DIRS+= client include libmysql man scripts testclients
15 14
16.include "../../mk/bsd.pkg.mk" 15.include "../../mk/bsd.pkg.mk"

cvs diff -r1.36 -r1.37 pkgsrc/databases/mysql57-client/Makefile.common (expand / switch to unified diff)

--- pkgsrc/databases/mysql57-client/Makefile.common 2021/10/19 18:57:37 1.36
+++ pkgsrc/databases/mysql57-client/Makefile.common 2022/01/21 11:23:50 1.37
@@ -1,19 +1,19 @@ @@ -1,19 +1,19 @@
1# $NetBSD: Makefile.common,v 1.36 2021/10/19 18:57:37 adam Exp $ 1# $NetBSD: Makefile.common,v 1.37 2022/01/21 11:23:50 adam Exp $
2# 2#
3# used by databases/mysql57-client/Makefile 3# used by databases/mysql57-client/Makefile
4# used by databases/mysql57-server/Makefile 4# used by databases/mysql57-server/Makefile
5 5
6DISTNAME= mysql-5.7.36 6DISTNAME= mysql-5.7.37
7CATEGORIES= databases 7CATEGORIES= databases
8MASTER_SITES= ${MASTER_SITE_MYSQL:=MySQL-5.7/} 8MASTER_SITES= ${MASTER_SITE_MYSQL:=MySQL-5.7/}
9 9
10MAINTAINER?= pkgsrc-users@NetBSD.org 10MAINTAINER?= pkgsrc-users@NetBSD.org
11HOMEPAGE= https://www.mysql.com/ 11HOMEPAGE= https://www.mysql.com/
12LICENSE= gnu-gpl-v2 12LICENSE= gnu-gpl-v2
13 13
14DISTINFO_FILE?= ${.CURDIR}/../../databases/mysql57-client/distinfo 14DISTINFO_FILE?= ${.CURDIR}/../../databases/mysql57-client/distinfo
15PATCHDIR?= ${.CURDIR}/../../databases/mysql57-client/patches 15PATCHDIR?= ${.CURDIR}/../../databases/mysql57-client/patches
16 16
17USE_CMAKE= yes 17USE_CMAKE= yes
18USE_LANGUAGES= c99 gnu++14 18USE_LANGUAGES= c99 gnu++14
19USE_TOOLS+= bash bison gmake perl:run 19USE_TOOLS+= bash bison gmake perl:run

cvs diff -r1.23 -r1.24 pkgsrc/databases/mysql57-client/PLIST (expand / switch to unified diff)

--- pkgsrc/databases/mysql57-client/PLIST 2021/10/19 18:57:37 1.23
+++ pkgsrc/databases/mysql57-client/PLIST 2022/01/21 11:23:50 1.24
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1@comment $NetBSD: PLIST,v 1.23 2021/10/19 18:57:37 adam Exp $ 1@comment $NetBSD: PLIST,v 1.24 2022/01/21 11:23:50 adam Exp $
2bin/mysql 2bin/mysql
3bin/mysql_client_test 3bin/mysql_client_test
4bin/mysql_config 4bin/mysql_config
5bin/mysql_config_editor 5bin/mysql_config_editor
6bin/mysql_ssl_rsa_setup 6bin/mysql_ssl_rsa_setup
7bin/mysqladmin 7bin/mysqladmin
8bin/mysqlbinlog 8bin/mysqlbinlog
9bin/mysqlcheck 9bin/mysqlcheck
10bin/mysqldump 10bin/mysqldump
11bin/mysqlimport 11bin/mysqlimport
12bin/mysqlpump 12bin/mysqlpump
13bin/mysqlshow 13bin/mysqlshow
14bin/mysqlslap 14bin/mysqlslap
@@ -112,27 +112,27 @@ include/mysql/plugin_keyring.h @@ -112,27 +112,27 @@ include/mysql/plugin_keyring.h
112include/mysql/plugin_validate_password.h 112include/mysql/plugin_validate_password.h
113include/mysql/sql_common.h 113include/mysql/sql_common.h
114include/mysql/sql_state.h 114include/mysql/sql_state.h
115include/mysql/sslopt-case.h 115include/mysql/sslopt-case.h
116include/mysql/sslopt-longopts.h 116include/mysql/sslopt-longopts.h
117include/mysql/sslopt-vars.h 117include/mysql/sslopt-vars.h
118include/mysql/thr_cond.h 118include/mysql/thr_cond.h
119include/mysql/thr_mutex.h 119include/mysql/thr_mutex.h
120include/mysql/thr_rwlock.h 120include/mysql/thr_rwlock.h
121include/mysql/typelib.h 121include/mysql/typelib.h
122lib/libmysqlclient.a 122lib/libmysqlclient.a
123lib/libmysqlclient.so 123lib/libmysqlclient.so
124lib/libmysqlclient.so.20 124lib/libmysqlclient.so.20
125lib/libmysqlclient.so.20.3.23 125lib/libmysqlclient.so.20.3.24
126lib/pkgconfig/mysqlclient.pc 126lib/pkgconfig/mysqlclient.pc
127man/man1/comp_err.1 127man/man1/comp_err.1
128man/man1/innochecksum.1 128man/man1/innochecksum.1
129man/man1/lz4_decompress.1 129man/man1/lz4_decompress.1
130man/man1/my_print_defaults.1 130man/man1/my_print_defaults.1
131man/man1/myisam_ftdump.1 131man/man1/myisam_ftdump.1
132man/man1/myisamchk.1 132man/man1/myisamchk.1
133man/man1/myisamlog.1 133man/man1/myisamlog.1
134man/man1/myisampack.1 134man/man1/myisampack.1
135man/man1/mysql.1 135man/man1/mysql.1
136man/man1/mysql.server.1 136man/man1/mysql.server.1
137man/man1/mysql_config.1 137man/man1/mysql_config.1
138man/man1/mysql_config_editor.1 138man/man1/mysql_config_editor.1

cvs diff -r1.47 -r1.48 pkgsrc/databases/mysql57-client/distinfo (expand / switch to unified diff)

--- pkgsrc/databases/mysql57-client/distinfo 2021/11/10 11:03:52 1.47
+++ pkgsrc/databases/mysql57-client/distinfo 2022/01/21 11:23:50 1.48
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1$NetBSD: distinfo,v 1.47 2021/11/10 11:03:52 jperkin Exp $ 1$NetBSD: distinfo,v 1.48 2022/01/21 11:23:50 adam Exp $
2 2
3BLAKE2s (mysql-5.7.36.tar.gz) = 74c80608c6e00d5f24cfc1d864520a4e01d476d94a90b9c44d1e8a4aeb5d3c54 3BLAKE2s (mysql-5.7.37.tar.gz) = f4871be0ffd6432fa7a6b6833d30eb38e49ecc95bc0df154b0f5b13a4b4d26b9
4SHA512 (mysql-5.7.36.tar.gz) = 34badfff21c774a5a05cca5b505725eda440ad3d7aca4de593ec58c13a552fe4c5465e1f17b0493a21971321185ffcfa031267df13188e33503f003bfa8a14b6 4SHA512 (mysql-5.7.37.tar.gz) = 6268227d61d4ff7d29c767c409245a1ba26f6760fac724d53af18931b27295c8e7ef70819b7991746b57f36fe863561afff1577b01b73b517444a4aea3d867d3
5Size (mysql-5.7.36.tar.gz) = 56238341 bytes 5Size (mysql-5.7.37.tar.gz) = 56248775 bytes
6SHA1 (patch-CMakeLists.txt) = 1409a98380c999c6973fa3106dc35684b7c3b3cc 6SHA1 (patch-CMakeLists.txt) = 1409a98380c999c6973fa3106dc35684b7c3b3cc
7SHA1 (patch-client_CMakeLists.txt) = 4af2fb3f3d05a66a9ee89f3653e2fcccadfa5f79 7SHA1 (patch-client_CMakeLists.txt) = 4af2fb3f3d05a66a9ee89f3653e2fcccadfa5f79
8SHA1 (patch-client_completion_hash.cc) = b86ec80beac624b2aa21c7587e351ff126400ecb 8SHA1 (patch-client_completion_hash.cc) = b86ec80beac624b2aa21c7587e351ff126400ecb
9SHA1 (patch-client_mysqladmin.cc) = e1650ef3695675bcc01375bacdebcb7318218b93 9SHA1 (patch-client_mysqladmin.cc) = e1650ef3695675bcc01375bacdebcb7318218b93
10SHA1 (patch-cmake_boost.cmake) = ecf03b396c57c69e0d251497e7217e47632613c2 10SHA1 (patch-cmake_boost.cmake) = ecf03b396c57c69e0d251497e7217e47632613c2
11SHA1 (patch-cmake_build__configurations_compiler__options.cmake) = 999110815237c53a69c74c42e66c45df83cbf355 11SHA1 (patch-cmake_build__configurations_compiler__options.cmake) = 999110815237c53a69c74c42e66c45df83cbf355
12SHA1 (patch-cmake_build__configurations_mysql__release.cmake) = 7a1fb8c686f187db8fd9d8ad203c1f764d6e55a6 12SHA1 (patch-cmake_build__configurations_mysql__release.cmake) = 7a1fb8c686f187db8fd9d8ad203c1f764d6e55a6
13SHA1 (patch-cmake_curl.cmake) = 08ff31eb8de6b94a46ff90edb6df66a61a94fd9d 13SHA1 (patch-cmake_curl.cmake) = 08ff31eb8de6b94a46ff90edb6df66a61a94fd9d
14SHA1 (patch-cmake_ldap.cmake) = 9bdc3c311330852286838e6159295ecc5fbdc0ea 14SHA1 (patch-cmake_ldap.cmake) = 9bdc3c311330852286838e6159295ecc5fbdc0ea
15SHA1 (patch-cmake_os_SunOS.cmake) = b71c3e1fafb48ebbba77c19bb1c31556ebe1ad2a 15SHA1 (patch-cmake_os_SunOS.cmake) = b71c3e1fafb48ebbba77c19bb1c31556ebe1ad2a
16SHA1 (patch-cmake_plugin.cmake) = 4480438969e297f67890b1974a86fb88a23d28ed 16SHA1 (patch-cmake_plugin.cmake) = 4480438969e297f67890b1974a86fb88a23d28ed
17SHA1 (patch-cmake_readline.cmake) = 96ee989be126c939a4c9ef80f8cbb27e0c0719a5 17SHA1 (patch-cmake_readline.cmake) = 96ee989be126c939a4c9ef80f8cbb27e0c0719a5
18SHA1 (patch-cmake_ssl.cmake) = dd5bb94818d480a42ab5f971f08b3b4cdbb24034 18SHA1 (patch-cmake_ssl.cmake) = dd5bb94818d480a42ab5f971f08b3b4cdbb24034

cvs diff -r1.42 -r1.43 pkgsrc/databases/mysql57-server/Makefile (expand / switch to unified diff)

--- pkgsrc/databases/mysql57-server/Makefile 2022/01/10 01:46:27 1.42
+++ pkgsrc/databases/mysql57-server/Makefile 2022/01/21 11:23:50 1.43
@@ -1,17 +1,16 @@ @@ -1,17 +1,16 @@
1# $NetBSD: Makefile,v 1.42 2022/01/10 01:46:27 ryoon Exp $ 1# $NetBSD: Makefile,v 1.43 2022/01/21 11:23:50 adam Exp $
2 2
3PKGNAME= ${DISTNAME:S/-/-server-/} 3PKGNAME= ${DISTNAME:S/-/-server-/}
4PKGREVISION= 1 
5COMMENT= MySQL 5, a free SQL database (server) 4COMMENT= MySQL 5, a free SQL database (server)
6 5
7CONFLICTS= mysql3-server-[0-9]* 6CONFLICTS= mysql3-server-[0-9]*
8 7
9.include "../../databases/mysql57-client/Makefile.common" 8.include "../../databases/mysql57-client/Makefile.common"
10 9
11CMAKE_ARGS+= -DINSTALL_INFODIR=${PKGINFODIR} 10CMAKE_ARGS+= -DINSTALL_INFODIR=${PKGINFODIR}
12 11
13PLIST_VARS+= embedded auth_socket 12PLIST_VARS+= embedded auth_socket
14 13
15.if !empty(PKG_OPTIONS:Membedded-server) 14.if !empty(PKG_OPTIONS:Membedded-server)
16CMAKE_ARGS+= -DWITH_EMBEDDED_SERVER=ON 15CMAKE_ARGS+= -DWITH_EMBEDDED_SERVER=ON
17PLIST.embedded= yes 16PLIST.embedded= yes