Changeset: 8199b38f4e18 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8199b38f4e18
Modified Files:
        monetdb5/extras/jaql/json.c
Branch: Oct2012
Log Message:

drop: commit to make the drop persistent over server restart


diffs (65 lines):

diff --git a/monetdb5/extras/jaql/json.c b/monetdb5/extras/jaql/json.c
--- a/monetdb5/extras/jaql/json.c
+++ b/monetdb5/extras/jaql/json.c
@@ -1046,6 +1046,8 @@ JSONdrop(int *ret, str *name)
 {
        char buf[256];
        int bid;
+       bat blist[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+       int bcnt = 1;
 
        snprintf(buf, sizeof(buf), "json_%s_kind", *name);
        bid = BBPindex(buf);
@@ -1054,31 +1056,46 @@ JSONdrop(int *ret, str *name)
                                "no such JSON object with name: %s", *name);
 
        BBPclear(bid);
+       blist[bcnt++] = ABS(bid);
 
        snprintf(buf, sizeof(buf), "json_%s_string", *name);
        bid = BBPindex(buf);
-       if (bid)
+       if (bid) {
                BBPclear(bid);
+               blist[bcnt++] = ABS(bid);
+       }
        snprintf(buf, sizeof(buf), "json_%s_integer", *name);
        bid = BBPindex(buf);
-       if (bid)
+       if (bid) {
                BBPclear(bid);
+               blist[bcnt++] = ABS(bid);
+       }
        snprintf(buf, sizeof(buf), "json_%s_doble", *name);
        bid = BBPindex(buf);
-       if (bid)
+       if (bid) {
                BBPclear(bid);
+               blist[bcnt++] = ABS(bid);
+       }
        snprintf(buf, sizeof(buf), "json_%s_array", *name);
        bid = BBPindex(buf);
-       if (bid)
+       if (bid) {
                BBPclear(bid);
+               blist[bcnt++] = ABS(bid);
+       }
        snprintf(buf, sizeof(buf), "json_%s_object", *name);
        bid = BBPindex(buf);
-       if (bid)
+       if (bid) {
                BBPclear(bid);
+               blist[bcnt++] = ABS(bid);
+       }
        snprintf(buf, sizeof(buf), "json_%s_name", *name);
        bid = BBPindex(buf);
-       if (bid)
+       if (bid) {
                BBPclear(bid);
+               blist[bcnt++] = ABS(bid);
+       }
+
+       TMsubcommit_list(blist, bcnt);
 
        *ret = 0;
        return MAL_SUCCEED;
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to