Changeset: f99c944ca4cd for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f99c944ca4cd
Modified Files:
        sql/storage/store.c
Branch: sciql
Log Message:

Merge with default branch.


diffs (135 lines):

diff --git a/clients/mapiclient/Makefile.ag b/clients/mapiclient/Makefile.ag
--- a/clients/mapiclient/Makefile.ag
+++ b/clients/mapiclient/Makefile.ag
@@ -49,7 +49,8 @@
        NOINST
        SOURCES = mnc.c
        LIBS = ../../common/stream/libstream \
-               $(curl_LIBS) $(MALLOC_LIBS) $(PTHREAD_LIBS)
+               ../mapilib/libmapi \
+               $(curl_LIBS) $(MALLOC_LIBS) $(PTHREAD_LIBS) $(SOCKET_LIBS)
 }
 
 man_MANS = mclient.1 msqldump.1
diff --git a/gdk/ChangeLog.Apr2011 b/gdk/ChangeLog.Apr2011
--- a/gdk/ChangeLog.Apr2011
+++ b/gdk/ChangeLog.Apr2011
@@ -1,6 +1,10 @@
 # ChangeLog file for MonetDB
 # This file is updated with Maddlog
 
+* Sat Jul  9 2011 Sjoerd Mullender <sjo...@acm.org>
+- Fixed a problem where appending string BATs could cause enormous growth
+  of the string heap.  This fixes bug 2820.
+
 * Wed Jun 29 2011 Sjoerd Mullender <sjo...@acm.org>
 - Fixes to memory detection on FreeBSD.
 
diff --git a/gdk/gdk_batop.mx b/gdk/gdk_batop.mx
--- a/gdk/gdk_batop.mx
+++ b/gdk/gdk_batop.mx
@@ -99,11 +99,13 @@
            (!GDK_ELIMDOUBLES(b->@2->vheap) || b->batCount == 0) &&
            !GDK_ELIMDOUBLES(n->@2->vheap) &&
            b->@2->vheap->hashash == n->@2->vheap->hashash &&
+           /* if needs to be kept unique, take slow path */
            (b->@1key & BOUND2BTRUE) == 0 &&
+           /* if view, only copy if significant part of parent is used */
            (VIEW@1parent(n) == 0 ||
             BATcapacity(BBP_cache(VIEW@1parent(n))) < 2 * BATcount(n))) {
                /* append string heaps */
-               @1off = b->batCount == 0 ? 0 : b->@2->vheap->size;
+               @1off = b->batCount == 0 ? 0 : b->@2->vheap->free;
                /* make sure we get alignment right */
                @1off = (@1off + GDK_VARALIGN - 1) & ~(GDK_VARALIGN - 1);
                assert(((@1off >> GDK_VARSHIFT) << GDK_VARSHIFT) == @1off);
diff --git a/gdk/gdk_logger.mx b/gdk/gdk_logger.mx
--- a/gdk/gdk_logger.mx
+++ b/gdk/gdk_logger.mx
@@ -804,7 +804,7 @@
        if (!lg->log || mnstr_errnr(lg->log)) {
                if (lg->log)
                        mnstr_destroy(lg->log);
-
+               lg->log = NULL;
                return 0;
        }
        while (!err && log_read_format(lg, &l)) {
diff --git a/monetdb5/modules/mal/remote.mx b/monetdb5/modules/mal/remote.mx
--- a/monetdb5/modules/mal/remote.mx
+++ b/monetdb5/modules/mal/remote.mx
@@ -558,9 +558,9 @@
 }
 
 str RMTprelude(int *ret) {
-       (void)ret;
        int type = 0;
        
+       (void)ret;
 #ifdef WORDS_BIGENDIAN
        type |= RMTT_B_ENDIAN;
 #else
diff --git a/sql/backends/monet5/datacell/Makefile.ag 
b/sql/backends/monet5/datacell/Makefile.ag
--- a/sql/backends/monet5/datacell/Makefile.ag
+++ b/sql/backends/monet5/datacell/Makefile.ag
@@ -68,13 +68,13 @@
 scripts_mal = {
        HEADERS = mal
        DIR = libdir/monetdb5
-       SOURCES = basket.mal \
-                 receptor.mal \
-                 emitter.mal \
-                 petrinet.mal \
-                 datacell.mal \
-                 opt_datacell.mal \
-                 dcoperator.mal
+       SOURCES = basket.mx \
+                 receptor.mx \
+                 emitter.mx \
+                 petrinet.mx \
+                 datacell.mx \
+                 opt_datacell.mx \
+                 dcoperator.mx
 }
 
 scripts_sql = {
diff --git a/sql/backends/monet5/datacell/basket.mx 
b/sql/backends/monet5/datacell/basket.mx
--- a/sql/backends/monet5/datacell/basket.mx
+++ b/sql/backends/monet5/datacell/basket.mx
@@ -702,9 +702,9 @@
 str
 BSKTtable(int *ret)
 {
-       BAT *bn, *name, *seen, *events, *grabs;
-       BAT *threshold, *winsize, *winstride, *beat;
-       BAT *timeslice, *timestride;
+       BAT *bn = NULL, *name = NULL, *seen = NULL, *events = NULL, *grabs = 
NULL;
+       BAT *threshold = NULL, *winsize = NULL, *winstride = NULL, *beat = NULL;
+       BAT *timeslice = NULL, *timestride = NULL;
        int i;
 
        bn = BATnew(TYPE_str, TYPE_bat, BATTINY);
diff --git a/sql/backends/monet5/datacell/petrinet.mx 
b/sql/backends/monet5/datacell/petrinet.mx
--- a/sql/backends/monet5/datacell/petrinet.mx
+++ b/sql/backends/monet5/datacell/petrinet.mx
@@ -644,7 +644,7 @@
 str
 PNtable(int *ret)
 {
-       BAT *bn, *name, *def, *status, *seen, *cycles, *events, *time, *error;
+       BAT *bn = NULL, *name = NULL, *def = NULL, *status = NULL, *seen = 
NULL, *cycles = NULL, *events = NULL, *time = NULL, *error = NULL;
        int i;
 
        bn = BATnew(TYPE_str, TYPE_bat, BATTINY);
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -1583,6 +1583,8 @@
                if (logging && res == LOG_OK)
                        res = logger_funcs.cleanup();
                logging = 0;
+               if (res != LOG_OK)
+                       GDKfatal("write-ahead logging failure, disk full?");
        }
 }
 
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to