Changeset: b1fae3b806ae for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b1fae3b806ae
Modified Files:
        gdk/gdk_cbp.c
        gdk/gdk_colop.c
        gdk/gdk_utils.c
        geom/lib/libgeom.c
        geom/lib/libgeom.h
        geom/monetdb5/geom.mx
        monetdb5/mal/mal_debugger.c
        monetdb5/mal/mal_instruction.c
        monetdb5/modules/kernel/group.mx
        monetdb5/modules/mal/attach.c
        monetdb5/modules/mal/mal_init.mal
        monetdb5/modules/mal/remote.c
        monetdb5/optimizer/Makefile.ag
        monetdb5/optimizer/opt_prelude.c
        monetdb5/optimizer/opt_prelude.h
        monetdb5/optimizer/opt_support.c
        monetdb5/optimizer/opt_support.h
        sql/backends/monet5/sql_gencode.c
        sql/backends/monet5/sql_gencode.h
        sql/storage/restrict/restrict_storage.c
Branch: headless
Log Message:

Merge with default branch.


diffs (truncated from 34033 to 300 lines):

diff --git a/buildtools/autogen/autogen/am.py b/buildtools/autogen/autogen/am.py
--- a/buildtools/autogen/autogen/am.py
+++ b/buildtools/autogen/autogen/am.py
@@ -1014,7 +1014,8 @@
         fd.write("\tmkdir -p $(DESTDIR)'%s'\n" % rd)
         fd.write("\tgem install --local --install-dir $(DESTDIR)'%s' --force 
--rdoc '%s'\n" % (rd, f[:-4]))
         fd.write("uninstall-local-%s: %s\n" % (sf, f[:-4]))
-        fd.write("\tgem uninstall --install-dir $(DESTDIR)'%s' '%s'\n" % (rd, 
f[:-4]))
+        # remove "-0.1.gemspec" from end of `f'
+        fd.write("\tgem uninstall --install-dir $(DESTDIR)'%s' '%s'\n" % (rd, 
f[:-12]))
         am['BUILT_SOURCES'].append(f[:-4])
         am['CLEAN'].append(f[:-4])
     fd.write('else\n')
diff --git a/clients/ChangeLog.Apr2011 b/clients/ChangeLog.Apr2011
--- a/clients/ChangeLog.Apr2011
+++ b/clients/ChangeLog.Apr2011
@@ -1,6 +1,9 @@
 # ChangeLog file for clients
 # This file is updated with Maddlog
 
+* Fri Jul  1 2011 Fabian Groffen <[email protected]>
+- Fix stethoscope's mod.fcn filter when using multiple targets, bug #2827
+
 * Wed Jun 29 2011 Sjoerd Mullender <[email protected]>
 - The separate Python distribution now uses the same version number as
   the main package.
diff --git a/clients/mapiclient/stethoscope.c b/clients/mapiclient/stethoscope.c
--- a/clients/mapiclient/stethoscope.c
+++ b/clients/mapiclient/stethoscope.c
@@ -297,20 +297,24 @@
        } else {
                for (a = 0; a < wthr->argc; a++) {
                        char *c;
-                       c = strchr(wthr->argv[a], '.');
+                       char *arg = strdup(wthr->argv[a]);
+                       c = strchr(arg, '.');
                        if (c) {
-                               mod = wthr->argv[a];
-                               if (mod == c) mod = "*";
+                               mod = arg;
+                               if (mod == c)
+                                       mod = "*";
                                fcn = c + 1;
-                               if (*fcn == 0) fcn = "*";
+                               if (*fcn == 0)
+                                       fcn = "*";
                                *c = 0;
                        } else {
-                               fcn = wthr->argv[a];
+                               fcn = arg;
                                mod = "*";
                        }
                        snprintf(buf, BUFSIZ, 
"profiler.setFilter(\"%s\",\"%s\");", mod, fcn);
                        printf("-- %s%s\n", id, buf);
                        doQ(buf);
+                       free(arg);
                }
        }
        printf("-- %sprofiler.start();\n", id);
diff --git a/clients/python/monetdb/mapi2.py b/clients/python/monetdb/mapi2.py
--- a/clients/python/monetdb/mapi2.py
+++ b/clients/python/monetdb/mapi2.py
@@ -237,7 +237,7 @@
         while count > 0:
             try:
                 recv = self.socket.recv(bytes, flags)
-                logging.debug("II: package size: %i payload: %s" % (len(recv), 
recv))
+                logger.debug("II: package size: %i payload: %s" % (len(recv), 
recv))
             except socket.error, error:
                 raise OperationalError(error[1])
             count -= len(recv)
diff --git a/clients/python/monetdb/mapi3.py b/clients/python/monetdb/mapi3.py
--- a/clients/python/monetdb/mapi3.py
+++ b/clients/python/monetdb/mapi3.py
@@ -238,7 +238,7 @@
         while count > 0:
             try:
                 recv = self.socket.recv(bytes, flags)
-                logging.debug("II: package size: %i payload: %s" % (len(recv), 
recv))
+                logger.debug("II: package size: %i payload: %s" % (len(recv), 
recv))
             except socket.error as error:
                 raise OperationalError(error[1])
             count -= len(recv)
diff --git a/gdk/gdk_cbp.c b/gdk/gdk_cbp.c
--- a/gdk/gdk_cbp.c
+++ b/gdk/gdk_cbp.c
@@ -664,8 +664,8 @@
                        if (CBPsize >= CBPlimit)
                                CBPextend(COLMARGIN, FALSE);
                }
-               if (src == 0)
-                       assert(CBP[bid].cache == NULL); /* no duplicates in 
CBP.dir */
+               if (src == 0 && CBP[bid].cache != NULL)
+                       GDKfatal("CBPinit: duplicate entry in CBP.dir.");
                bs = GDKzalloc(sizeof(COL));
                if (bs == NULL)
                        GDKfatal("CBPinit: cannot allocate memory for COL.");
@@ -920,9 +920,13 @@
        oid CBPoid;
        bat limit;
 
-       IODEBUG mnstr_printf(GDKerr, "#importEntry %s\n", nme);
-       strcpy(cbpdir, nme);
-       s = strstr(cbpdir, COLDIR);
+       IODEBUG mnstr_printf(GDKerr,"#importEntry %s\n",nme);
+       if (strlen(nme) >= sizeof(cbpdir)) {
+               GDKerror("CBPimportEntry: file name too long\n");
+               return 0;
+       }
+       strcpy(cbpdir,nme);
+       s= strstr(cbpdir,COLDIR);
        if (s == 0)
                return 0;
        *s = 0;
@@ -961,7 +965,11 @@
        bs->copiedtodisk = 1;
 
        if (bs->type != TYPE_void) {
-               lstat(bufhead, &st);
+               if (lstat(bufhead, &st) < 0) {
+                       GDKerror("CBPimportEntry: file '%s' does not exist.\n", 
bufhead);
+                       CBPdestroy(bn);
+                       return 0;
+               }
                GDKfilepath(path, COLDIR, CBP_physical(bs->cacheid), "tail");
                GDKcreatedir(path);
                IODEBUG mnstr_printf(GDKerr, "#symlink %s ->%s\n", bufhead, 
path);
@@ -978,7 +986,11 @@
                }
                HEAPload(&bs->heap, CBP_physical(bs->cacheid), "tail", TRUE);
                if (bs->varsized) {
-                       lstat(bufhheap, &st);
+                       if (lstat(bufhheap, &st) < 0) {
+                               GDKerror("CBPimportEntry: file '%s' does not 
exist.\n", bufhheap);
+                               CBPdestroy(bn);
+                               return 0;
+                       }
                        GDKfilepath(path, COLDIR, CBP_physical(bs->cacheid), 
"theap");
                        GDKcreatedir(path);
                        IODEBUG mnstr_printf(GDKerr, "#symlink %s ->%s\n", 
bufhheap, path);
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -1584,7 +1584,7 @@
        if (GDKstopped == 0) {
                GDKstopped = 1; /* shouldn't there be a lock here? */
 #ifdef HAVE_POSIX_FADVISE
-               if (!GDKembedded && GDK_vm_trim)
+               if (!GDKembedded && GDK_vm_trim && GDKvmtrim_id)
                        MT_join_thread(GDKvmtrim_id);
 #endif
                GDKnrofthreads = 0;
diff --git a/geom/lib/libgeom.c b/geom/lib/libgeom.c
--- a/geom/lib/libgeom.c
+++ b/geom/lib/libgeom.c
@@ -32,10 +32,10 @@
 void
 libgeom_init(void)
 {
-       initGEOS((GEOSMessageHandler)GDKerror, (GEOSMessageHandler)GDKerror);
-       GEOS_setWKBByteOrder(1);  /* NDR (little endian) */
+       initGEOS((GEOSMessageHandler) GDKerror, (GEOSMessageHandler) GDKerror);
+       GEOS_setWKBByteOrder(1);        /* NDR (little endian) */
        printf("# MonetDB/GIS module loaded\n");
-       fflush(stdout); /* make merovingian see this *now* */
+       fflush(stdout);         /* make merovingian see this *now* */
 }
 
 void
@@ -45,9 +45,9 @@
 }
 
 int
-wkb_isnil(wkb *wkb)
+wkb_isnil(wkb *w)
 {
-       if (!wkb || wkb->len == ~0)
+       if (!w ||w->len == ~0)
                return 1;
        return 0;
 }
@@ -58,7 +58,7 @@
  * of a GEOSGeom.
  */
 int
-getMbrGeos( mbr *res, const GEOSGeom geosGeometry )
+getMbrGeos(mbr *res, const GEOSGeom geosGeometry)
 {
        GEOSGeom envelope;
        double xmin, ymin, xmax, ymax;
@@ -80,7 +80,7 @@
                res->ymin = (float) ymin;
                res->xmax = (float) xmin;
                res->ymax = (float) ymin;
-       } else { /* GEOSGeomTypeId(envelope) == GEOS_POLYGON */
+       } else {                /* GEOSGeomTypeId(envelope) == GEOS_POLYGON */
 #if GEOS_CAPI_VERSION_MAJOR >= 1 && GEOS_CAPI_VERSION_MINOR >= 3
                const GEOSGeometry *ring = GEOSGetExteriorRing(envelope);
 #else
@@ -114,7 +114,7 @@
  * A wrapper for getMbrGeos on a geom_geometry.
  */
 int
-getMbrGeom( mbr *res,  wkb* geom )
+getMbrGeom(mbr *res, wkb *geom)
 {
        GEOSGeom geosGeometry = wkb2geos(geom);
 
@@ -130,15 +130,20 @@
 geom_type2str(int t)
 {
        switch (t) {
-       case wkbPoint: return "Point";
-       case wkbLineString: return "Line";
-       case wkbPolygon: return "Polygon";
-       case wkbMultiPoint: return "MultiPoint";
-       case wkbMultiLineString: return "MultiLine";
-       case wkbMultiPolygon: return "MultiPolygon";
-       case wkbGeometryCollection: return "GeomCollection";
+       case wkbPoint:
+               return "Point";
+       case wkbLineString:
+               return "Line";
+       case wkbPolygon:
+               return "Polygon";
+       case wkbMultiPoint:
+               return "MultiPoint";
+       case wkbMultiLineString:
+               return "MultiLine";
+       case wkbMultiPolygon:
+               return "MultiPolygon";
+       case wkbGeometryCollection:
+               return "GeomCollection";
        }
        return "unknown";
 }
-
-
diff --git a/geom/lib/libgeom.h b/geom/lib/libgeom.h
--- a/geom/lib/libgeom.h
+++ b/geom/lib/libgeom.h
@@ -39,12 +39,11 @@
 
 #include "geos_c.h"
 
-typedef struct mbr
-{
-        float xmin;
-        float ymin;
-        float xmax;
-        float ymax;
+typedef struct mbr {
+       float xmin;
+       float ymin;
+       float xmax;
+       float ymax;
 } mbr;
 
 /*
@@ -94,29 +93,27 @@
 */
 
 typedef enum wkb_type {
-      wkbPoint = 1,
-      wkbLineString = 2,
-      wkbPolygon = 3,
-      wkbMultiPoint = 4,
-      wkbMultiLineString = 5,
-      wkbMultiPolygon = 6,
-      wkbGeometryCollection = 7,
+       wkbPoint = 1,
+       wkbLineString = 2,
+       wkbPolygon = 3,
+       wkbMultiPoint = 4,
+       wkbMultiLineString = 5,
+       wkbMultiPolygon = 6,
+       wkbGeometryCollection = 7,
 } wkb_type;
 
-libgeom_export const char * geom_type2str(int t);
+libgeom_export const char *geom_type2str(int t);
 
-typedef struct wkb
-{
-       int  len;
+typedef struct wkb {
+       int len;
        char data[1];
 } wkb;
 
-typedef struct
-{
-       unsigned char   type;
-       mbr     bbox;
-       int             SRID;
-       wkb     wkb;
+typedef struct {
+       unsigned char type;
+       mbr bbox;
+       int SRID;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to