cql3: fix shared_ptr misuse in modification_statement
A shared_ptr is mutable, so it must be thread_local, not static.
This commit is contained in:
committed by
Tomasz Grabiec
parent
b261bc9f42
commit
750543fc04
@@ -36,7 +36,7 @@ namespace cql3 {
|
||||
|
||||
namespace statements {
|
||||
|
||||
::shared_ptr<column_identifier> modification_statement::CAS_RESULT_COLUMN = ::make_shared<column_identifier>("[applied]", false);
|
||||
thread_local const ::shared_ptr<column_identifier> modification_statement::CAS_RESULT_COLUMN = ::make_shared<column_identifier>("[applied]", false);
|
||||
|
||||
std::ostream&
|
||||
operator<<(std::ostream& out, modification_statement::statement_type t) {
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace statements {
|
||||
*/
|
||||
class modification_statement : public cql_statement {
|
||||
private:
|
||||
static ::shared_ptr<column_identifier> CAS_RESULT_COLUMN;
|
||||
static thread_local const ::shared_ptr<column_identifier> CAS_RESULT_COLUMN;
|
||||
|
||||
public:
|
||||
enum class statement_type { INSERT, UPDATE, DELETE };
|
||||
|
||||
Reference in New Issue
Block a user