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:
Avi Kivity
2015-06-01 18:33:11 +03:00
committed by Tomasz Grabiec
parent 750543fc04
commit db46ced43c
2 changed files with 2 additions and 2 deletions

View File

@@ -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,

View File

@@ -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;