diff --git a/cql3/query_options.cc b/cql3/query_options.cc index 0f60414c29..8d38f00555 100644 --- a/cql3/query_options.cc +++ b/cql3/query_options.cc @@ -26,9 +26,9 @@ namespace cql3 { -const query_options::specific_options query_options::specific_options::DEFAULT{-1, {}, {}, api::missing_timestamp}; +thread_local const query_options::specific_options query_options::specific_options::DEFAULT{-1, {}, {}, api::missing_timestamp}; -default_query_options query_options::DEFAULT{db::consistency_level::ONE, +thread_local default_query_options query_options::DEFAULT{db::consistency_level::ONE, {}, false, query_options::specific_options::DEFAULT, 3, serialization_format::use_32_bit()}; } diff --git a/cql3/query_options.hh b/cql3/query_options.hh index fd886c280b..fa0c33d525 100644 --- a/cql3/query_options.hh +++ b/cql3/query_options.hh @@ -47,7 +47,7 @@ public: explicit query_options(serialization_format sf) : _serialization_format(sf) {} // Options that are likely to not be present in most queries struct specific_options final { - static const specific_options DEFAULT; + static thread_local const specific_options DEFAULT; const int32_t page_size; const ::shared_ptr state; @@ -56,7 +56,7 @@ public: }; // It can't be const because of prepare() - static default_query_options DEFAULT; + static thread_local default_query_options DEFAULT; virtual ~query_options() {}