From 07f6f951e4954ed12054aaa1ab65ab45bfa9b519 Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Wed, 17 Jul 2019 08:22:19 +0200 Subject: [PATCH 1/2] Fix for Windows OpenSSL build: Link crypt and ws2_32 in case OpenSSL is a newer version which was build with capi engine support --- plugins/auth/caching_sha2_pw.c | 3 +++ plugins/auth/sha256_pw.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/plugins/auth/caching_sha2_pw.c b/plugins/auth/caching_sha2_pw.c index f49c455a..6e46891d 100644 --- a/plugins/auth/caching_sha2_pw.c +++ b/plugins/auth/caching_sha2_pw.c @@ -23,6 +23,9 @@ #ifdef _WIN32 #if !defined(HAVE_OPENSSL) #define HAVE_WINCRYPT +#else +#pragma comment(lib, "crypt32.lib") +#pragma comment(lib, "ws2_32.lib") #endif #endif diff --git a/plugins/auth/sha256_pw.c b/plugins/auth/sha256_pw.c index 58e27735..78b4ce0c 100644 --- a/plugins/auth/sha256_pw.c +++ b/plugins/auth/sha256_pw.c @@ -23,6 +23,9 @@ #ifdef _WIN32 #if !defined(HAVE_OPENSSL) #define HAVE_WINCRYPT +#else +#pragma comment(lib, "crypt32.lib") +#pragma comment(lib, "ws2_32.lib") #endif #endif From 0c20765bafa60fdce8f6393df5356676fe463c7d Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Thu, 18 Jul 2019 13:42:29 +0200 Subject: [PATCH 2/2] Fix of memory leack in the test and end spaces. --- unittest/libmariadb/ps_bugs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unittest/libmariadb/ps_bugs.c b/unittest/libmariadb/ps_bugs.c index 3b55bf2c..b7247603 100644 --- a/unittest/libmariadb/ps_bugs.c +++ b/unittest/libmariadb/ps_bugs.c @@ -5099,9 +5099,10 @@ static int test_conc424(MYSQL *mysql) mysql_free_result(res); } rc= mysql_stmt_next_result(stmt); - + } while (!rc); + mysql_stmt_close(stmt); rc= mysql_query(mysql, "DROP PROCEDURE testCursor"); check_mysql_rc(rc, mysql); @@ -5109,7 +5110,7 @@ static int test_conc424(MYSQL *mysql) check_mysql_rc(rc, mysql); return OK; -} +} struct my_tests_st my_tests[] = { {"test_conc424", test_conc424, TEST_CONNECTION_NEW, 0, NULL, NULL},