From 78e857e3afd9301ad53df7fe345fcd3368ea82f8 Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Mon, 3 Jun 2019 11:03:57 +0200 Subject: [PATCH 1/2] Removed unused call to QueryContextAttributes with connection info. --- libmariadb/secure/schannel.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libmariadb/secure/schannel.c b/libmariadb/secure/schannel.c index d1f519be..b7a85789 100644 --- a/libmariadb/secure/schannel.c +++ b/libmariadb/secure/schannel.c @@ -545,13 +545,11 @@ const char *ma_tls_get_cipher(MARIADB_TLS *ctls) SecPkgContext_CipherInfo CipherInfo = { SECPKGCONTEXT_CIPHERINFO_V1 }; SECURITY_STATUS sRet; SC_CTX *sctx; - SecPkgContext_ConnectionInfo ci; if (!ctls || !ctls->ssl) return NULL; sctx= (SC_CTX *)ctls->ssl; - sRet = QueryContextAttributesA(&sctx->ctxt, SECPKG_ATTR_CONNECTION_INFO, (PVOID)&ci); sRet= QueryContextAttributesA(&sctx->ctxt, SECPKG_ATTR_CIPHER_INFO, (PVOID)&CipherInfo); if (sRet != SEC_E_OK) From d4a0a384459e3a6645ad4df46db18a5d2dd4c780 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Fri, 14 Jun 2019 08:47:21 +0200 Subject: [PATCH 2/2] Better test of warnings during prepare. --- unittest/libmariadb/ps_bugs.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/unittest/libmariadb/ps_bugs.c b/unittest/libmariadb/ps_bugs.c index 1766d04b..f151573b 100644 --- a/unittest/libmariadb/ps_bugs.c +++ b/unittest/libmariadb/ps_bugs.c @@ -4275,13 +4275,7 @@ static int test_conc179(MYSQL *mysql) { MYSQL_STMT *stmt; int rc; - const char *stmtstr= "CREATE TABLE t1 (`blurb_id` int NOT NULL DEFAULT 0, `blurb` text default '', PRIMARY KEY (blurb_id)) ENGINE='FEDERATED' DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1'"; - - rc= mysql_query(mysql, "set sql_mode=''"); - check_mysql_rc(rc, mysql); - - rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); - check_mysql_rc(rc, mysql); + const char *stmtstr= "select 1 as ' '"; stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, SL(stmtstr)); @@ -4289,8 +4283,8 @@ static int test_conc179(MYSQL *mysql) if (mysql_get_server_version(mysql) >= 100100) { - FAIL_IF(mysql_warning_count(mysql) < 2, "expected 2 or more warnings"); - FAIL_IF(mysql_stmt_warning_count(stmt) < 2, "expected 2 or more warnings"); + FAIL_IF(mysql_warning_count(mysql) < 1, "expected 1 or more warnings"); + FAIL_IF(mysql_stmt_warning_count(stmt) < 1, "expected 1 or more warnings"); } mysql_stmt_close(stmt);