diff --git a/libmariadb/ma_errmsg.c b/libmariadb/ma_errmsg.c index 3d2f725a..23b38afb 100644 --- a/libmariadb/ma_errmsg.c +++ b/libmariadb/ma_errmsg.c @@ -53,7 +53,7 @@ const char *client_errors[]= /* 2023 */ "", /* 2024 */ "", /* 2025 */ "", -/* 2026 */ "SSL connection error: %-.100s", +/* 2026 */ "TLS/SSL error: %-.100s", /* 2027 */ "Received malformed packet", /* 2028 */ "", /* 2029 */ "", diff --git a/libmariadb/secure/gnutls.c b/libmariadb/secure/gnutls.c index 805ea4f7..34028d5d 100644 --- a/libmariadb/secure/gnutls.c +++ b/libmariadb/secure/gnutls.c @@ -889,7 +889,7 @@ static void ma_tls_set_error(MYSQL *mysql, void *ssl, int ssl_errno) alert_name= gnutls_alert_get_name(alert_desc); snprintf(ssl_error, MAX_SSL_ERR_LEN, "fatal alert received: %s", alert_name); - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ssl_error); + pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, 0, ssl_error); return; } diff --git a/libmariadb/secure/ma_schannel.c b/libmariadb/secure/ma_schannel.c index e3d395d1..be4148c7 100644 --- a/libmariadb/secure/ma_schannel.c +++ b/libmariadb/secure/ma_schannel.c @@ -52,7 +52,7 @@ void ma_schannel_set_sec_error(MARIADB_PVIO* pvio, DWORD ErrorNo) void ma_schannel_set_win_error(MARIADB_PVIO *pvio, DWORD ErrorNo) { char buffer[256]; - ma_format_win32_error(buffer, sizeof(buffer), ErrorNo, "SSL connection error: "); + ma_format_win32_error(buffer, sizeof(buffer), ErrorNo, "TLS/SSL error: "); pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, buffer); return; } @@ -526,8 +526,7 @@ my_bool ma_schannel_verify_certs(MARIADB_TLS *ctls, BOOL verify_server_name) end: if (!ret) { - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, - "SSL connection error: %s", errmsg); + pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, 0, errmsg); } if (pServerCert) CertFreeCertificateContext(pServerCert); diff --git a/libmariadb/secure/schannel.c b/libmariadb/secure/schannel.c index acd7394e..4b168129 100644 --- a/libmariadb/secure/schannel.c +++ b/libmariadb/secure/schannel.c @@ -225,7 +225,7 @@ static int ma_tls_set_client_certs(MARIADB_TLS *ctls,const CERT_CONTEXT **cert_c *cert_ctx = schannel_create_cert_context(certfile, keyfile, errmsg, sizeof(errmsg)); if (!*cert_ctx) { - pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: %s", errmsg); + pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, 0, errmsg); return 1; } diff --git a/plugins/auth/sha256_pw.c b/plugins/auth/sha256_pw.c index 52d18461..79febf1a 100644 --- a/plugins/auth/sha256_pw.c +++ b/plugins/auth/sha256_pw.c @@ -1,5 +1,5 @@ /************************************************************************************ - Copyright (C) 2017, 2021, MariaDB Corporation AB + Copyright (C) 2017, 2022, MariaDB Corporation AB This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/unittest/libmariadb/cursor.c b/unittest/libmariadb/cursor.c index f6cbe1d2..9cdda475 100644 --- a/unittest/libmariadb/cursor.c +++ b/unittest/libmariadb/cursor.c @@ -421,11 +421,9 @@ static int test_bug10736(MYSQL *mysql) for (i= 0; i < 3; i++) { - int row_no= 0; rc= mysql_stmt_execute(stmt); check_stmt_rc(rc, stmt); - while ((rc= mysql_stmt_fetch(stmt)) == 0) - ++row_no; + while ((rc= mysql_stmt_fetch(stmt)) == 0); FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); } rc= mysql_stmt_close(stmt);