Commit 86bb520f authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

cleanup: Hash_sets are not copy-able

Creating an object copy would imply that the destructor would delete the
underlying same HASH object for both instances. That would lead to a
double free and thus a crash.
parent 489fd0d6
......@@ -45,6 +45,8 @@ class Hash_set
my_hash_init(psi_key, &m_hash, charset, default_array_elements, key_offset,
key_length, get_key, free_element, flags);
}
Hash_set(const Hash_set&) = delete; /* It is not safe to copy hash_sets. */
/**
Destroy the hash by freeing the buckets table. Does
not call destructors for the elements.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment