Use a transaction around the DELETE + INSERT of the after_connection_commands
Otherwise we can imagine that two clients changing this value at the same time would mix things up. ref #3275
This commit is contained in:
@@ -203,11 +203,20 @@ class Database
|
||||
|
||||
static auto raw_exec(const std::string& query)
|
||||
{
|
||||
Database::db->raw_exec(query);
|
||||
return Database::db->raw_exec(query);
|
||||
}
|
||||
|
||||
private:
|
||||
static std::string gen_uuid();
|
||||
static std::map<CacheKey, EncodingIn::real_type> encoding_in_cache;
|
||||
};
|
||||
|
||||
class Transaction
|
||||
{
|
||||
public:
|
||||
Transaction();
|
||||
~Transaction();
|
||||
bool success{false};
|
||||
};
|
||||
|
||||
#endif /* USE_DATABASE */
|
||||
|
||||
Reference in New Issue
Block a user