cql3: fix shared_ptr misuse in select_statement
A shared_ptr is mutable, so it must be thread_local, not static.
This commit is contained in:
committed by
Tomasz Grabiec
parent
750543fc04
commit
db46ced43c
@@ -33,7 +33,7 @@ namespace cql3 {
|
||||
|
||||
namespace statements {
|
||||
|
||||
const shared_ptr<select_statement::parameters> select_statement::_default_parameters = ::make_shared<select_statement::parameters>();
|
||||
thread_local const shared_ptr<select_statement::parameters> select_statement::_default_parameters = ::make_shared<select_statement::parameters>();
|
||||
|
||||
select_statement::select_statement(schema_ptr schema,
|
||||
uint32_t bound_terms,
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
};
|
||||
private:
|
||||
static constexpr int DEFAULT_COUNT_PAGE_SIZE = 10000;
|
||||
static const ::shared_ptr<parameters> _default_parameters;
|
||||
static thread_local const ::shared_ptr<parameters> _default_parameters;
|
||||
schema_ptr _schema;
|
||||
uint32_t _bound_terms;
|
||||
::shared_ptr<parameters> _parameters;
|
||||
|
||||
Reference in New Issue
Block a user