Changeset: 3c01198c9f3f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3c01198c9f3f
Modified Files:
sql/storage/objectset.c
sql/storage/store.c
Branch: nospare
Log Message:
make use of special nodes, ie we know the structure we are storing
diffs (43 lines):
diff --git a/sql/storage/objectset.c b/sql/storage/objectset.c
--- a/sql/storage/objectset.c
+++ b/sql/storage/objectset.c
@@ -28,7 +28,7 @@ typedef struct objectversion {
typedef struct object_node {
struct object_node* prev;
struct object_node* next;
- void* data;
+ objectversion* data;
} object_node;
typedef struct objectset {
@@ -83,7 +83,7 @@ static void
node_destroy(objectset *os, object_node *n)
{
if (n->data && os->destroy) {
- os->destroy(NULL, n->data);
+ os->destroy(n->data, NULL);
n->data = NULL;
}
if (!os->sa)
@@ -275,7 +275,7 @@ os_destroy(objectset *os, sql_store stor
return;
if (os->destroy) {
for(object_node *n=os->h; n; n=n->next) {
- os->destroy(store, n->data);
+ os->destroy(n->data, store);
}
}
object_node *n = os->h;
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -1708,6 +1708,9 @@ store_load(sqlstore *store, sql_allocato
tr->active = 0;
GDKqsort(store_oids, NULL, NULL, nstore_oids, sizeof(sqlid), 0,
TYPE_int, false, false);
store->obj_id = store_oids[nstore_oids - 1] + 1;
+
+ if (sql_trans_commit(tr) != SQL_OK)
+ TRC_CRITICAL(SQL_STORE, "Cannot commit initial
transaction\n");
}
id = store->obj_id; /* db objects up till id are already created */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list