Skip to content

Commit 27e1230

Browse files
committed
Addendum 4 to bug #28179051: Turned the assert into a warning.
Suppressed the warning in MTR.
1 parent 454e011 commit 27e1230

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

mysql-test/include/mtr_warnings.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,11 @@ INSERT INTO global_suppressions VALUES
290290
("RSA private key file not found"),
291291
("RSA public key file not found"),
292292

293+
/*
294+
SSL Library instrumentation failed
295+
*/
296+
("The SSL library function CRYPTO_set_mem_functions failed"),
297+
293298
("THE_LAST_SUPPRESSION")||
294299

295300

share/errmsg-utf8.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18438,6 +18438,10 @@ ER_WARN_DEPRECATED_UTF8MB3_CHARSET_OPTION
1843818438
ER_WARN_DEPRECATED_UTF8MB3_COLLATION_OPTION
1843918439
eng "%s: '%-.64s' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead."
1844018440

18441+
ER_SSL_MEMORY_INSTRUMENTATION_INIT_FAILED
18442+
eng "The SSL library function %s failed. This is typically caused by the SSL library already being used. As a result the SSL memory allocation will not be instrumented."
18443+
bg "Функцията от SSL библиотеката %s върна грешка. Това обикновено е защото SSL библиотеката вече е била използвана. Заради това SSL паметта няма да се инструментира."
18444+
1844118445
#
1844218446
# End of 8.0 error messages intended to be logged to the server error log.
1844318447
#

sql/mysqld.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4490,6 +4490,7 @@ static int warn_self_signed_ca() {
44904490

44914491
#if !defined(HAVE_WOLFSSL) && defined(HAVE_OPENSSL) && !defined(__sun)
44924492
/* TODO: remove the !defined(__sun) when bug 23285559 is out of the picture */
4493+
44934494
static PSI_memory_key key_memory_openssl = PSI_NOT_INSTRUMENTED;
44944495

44954496
#if OPENSSL_VERSION_NUMBER < 0x10100000L
@@ -4517,12 +4518,11 @@ static void init_ssl() {
45174518
mysql_memory_register("mysqld_openssl", all_openssl_memory,
45184519
array_elements(all_openssl_memory));
45194520
#endif /* defined(HAVE_PSI_MEMORY_INTERFACE) */
4520-
#ifndef DBUG_OFF
4521-
int ret =
4522-
#endif
4523-
CRYPTO_set_mem_functions(my_openssl_malloc, my_openssl_realloc,
4524-
my_openssl_free);
4525-
DBUG_ASSERT(ret != 0);
4521+
int ret = CRYPTO_set_mem_functions(my_openssl_malloc, my_openssl_realloc,
4522+
my_openssl_free);
4523+
if (ret == 0)
4524+
LogErr(WARNING_LEVEL, ER_SSL_MEMORY_INSTRUMENTATION_INIT_FAILED,
4525+
"CRYPTO_set_mem_functions");
45264526
#endif /* HAVE_WOLFSSL */
45274527
ssl_start();
45284528
#endif /* HAVE_OPENSSL */

0 commit comments

Comments
 (0)