mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #28298 from kitaisreal/odbc-connection-holder-fix-dangling-reference
ODBC connection holder fix dangling reference
This commit is contained in:
commit
1a6c2c78c8
@ -6,6 +6,7 @@
|
||||
#include <common/BorrowedObjectPool.h>
|
||||
#include <unordered_map>
|
||||
|
||||
|
||||
namespace DB
|
||||
{
|
||||
namespace ErrorCodes
|
||||
@ -28,8 +29,8 @@ class ConnectionHolder
|
||||
{
|
||||
public:
|
||||
ConnectionHolder(PoolPtr pool_,
|
||||
ConnectionPtr connection_,
|
||||
const String & connection_string_)
|
||||
ConnectionPtr connection_,
|
||||
const String & connection_string_)
|
||||
: pool(pool_)
|
||||
, connection(std::move(connection_))
|
||||
, connection_string(connection_string_)
|
||||
@ -57,7 +58,7 @@ public:
|
||||
private:
|
||||
PoolPtr pool;
|
||||
ConnectionPtr connection;
|
||||
const String & connection_string;
|
||||
String connection_string;
|
||||
};
|
||||
|
||||
using ConnectionHolderPtr = std::shared_ptr<ConnectionHolder>;
|
||||
|
Loading…
Reference in New Issue
Block a user