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

View File

@@ -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) {

View File

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