From 136564549775e0c3d5aec9a4ad06188464821fa4 Mon Sep 17 00:00:00 2001 From: Lawrin Novitsky Date: Mon, 24 Feb 2025 01:22:08 +0100 Subject: [PATCH] CONCPP-140 Marked reset and reconnect Connection methods deprecated --- include/conncpp/Connection.hpp | 7 ++++++- test/unit/classes/connection.cpp | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/conncpp/Connection.hpp b/include/conncpp/Connection.hpp index be43340..83ea6a0 100644 --- a/include/conncpp/Connection.hpp +++ b/include/conncpp/Connection.hpp @@ -98,8 +98,13 @@ public: virtual int32_t getNetworkTimeout()=0; virtual SQLString getSchema()=0; virtual void setSchema(const SQLString& arg0)=0; + /** + * @deprecated This method is deprecated and will be removed in future versions. + */ virtual void reset()=0; - + /** + * @deprecated This method is deprecated and will be removed in future versions. + */ virtual bool reconnect()=0; virtual Connection* setClientOption(const SQLString& name, void* value)=0; diff --git a/test/unit/classes/connection.cpp b/test/unit/classes/connection.cpp index 48d51bf..eb45f42 100644 --- a/test/unit/classes/connection.cpp +++ b/test/unit/classes/connection.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. - * 2020, 2023 MariaDB Corporation AB + * 2020, 2025 MariaDB Corporation plc * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, as @@ -3194,6 +3194,7 @@ void connection::cached_sha2_auth() created_objects.clear(); //need to close connection, otherwise will use fast auth! con->close(); + // we can't really know, if we used the key from the given file :/ con.reset(driver->connect(opts)); } catch(std::exception &/*e*/)