Changeset: eddd199e706d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eddd199e706d
Modified Files:
        sql/common/sql_hash.c
        sql/storage/objectset.c
Branch: default
Log Message:

enable hash on objectset


diffs (24 lines):

diff --git a/sql/common/sql_hash.c b/sql/common/sql_hash.c
--- a/sql/common/sql_hash.c
+++ b/sql/common/sql_hash.c
@@ -60,6 +60,8 @@ hash_del(sql_hash *h, int key, void *val
 void
 hash_destroy(sql_hash *h) /* this code should be called for hash tables 
created outside SQL allocators only! */
 {
+       if (h == NULL || h->sa)
+               return;
        for (int i = 0; i < h->size; i++) {
                sql_hash_e *e = h->buckets[i], *c = NULL;
 
diff --git a/sql/storage/objectset.c b/sql/storage/objectset.c
--- a/sql/storage/objectset.c
+++ b/sql/storage/objectset.c
@@ -272,7 +272,7 @@ static objectset *
 os_append_node_name(objectset *os, versionhead  *n)
 {
        lock_writer(os);
-       if ((!os->name_map || os->name_map->size*16 < os->name_based_cnt) && 
os->name_based_cnt > HASH_MIN_SIZE && os->sa) {
+       if ((!os->name_map || os->name_map->size*16 < os->name_based_cnt) && 
os->name_based_cnt > HASH_MIN_SIZE) {
                hash_destroy(os->name_map);
                os->name_map = hash_new(os->sa, os->name_based_cnt, 
(fkeyvalue)& os_name_key);
                if (os->name_map == NULL) {
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to