MonetDB: iot - Compilation issues

2016-07-13 Thread Martin Kersten
Changeset: 65e0c621b233 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=65e0c621b233
Modified Files:
sql/backends/monet5/iot/basket.c
Branch: iot
Log Message:

Compilation issues


diffs (67 lines):

diff --git a/sql/backends/monet5/iot/basket.c b/sql/backends/monet5/iot/basket.c
--- a/sql/backends/monet5/iot/basket.c
+++ b/sql/backends/monet5/iot/basket.c
@@ -428,23 +428,20 @@ BSKTimportInternal(Client cntxt, int bsk
str cname= NULL;
 
(void)cntxt;
-   // check access permission to directory first
-   if( access (dir , F_OK | R_OK)){
-   throw(SQL, "iot.basket", "Could not access the basket directory 
%s. error %d\n",dir,errno);
-   }
-   
/* check for missing files */
for( i=0; i < MAXCOLS && baskets[bskt].cols[i]; i++){
cname = baskets[bskt].cols[i];
snprintf(buf,PATHLENGTH, "%s%c%s",dir,DIR_SEP, cname);
_DEBUG_BASKET_ mnstr_printf(BSKTout,"Attach the file %s\n",buf);
-   if( access (buf,R_OK))
+   f=  fopen(buf,"r");
+   if( f == NULL)
throw(MAL,"iot.basket","Could not access the column %s 
file %s\n",cname, buf);
-   b = baskets[bskt].bats[i];
-   if( b == 0)
-   throw(MAL,"iot.basket","Could not access the column 
%s\n",cname);
+   fclose(f);
}
 
+   if(msg != MAL_SUCCEED)
+   return msg;
+
// types are already checked during stream initialization
MT_lock_set(&iotLock);
for( i=0; i < MAXCOLS && baskets[bskt].cols[i]; i++){
@@ -522,7 +519,6 @@ BSKTimportInternal(Client cntxt, int bsk
/* remove the basket files */
for( i=0; i < MAXCOLS && baskets[bskt].cols[i]; i++){
snprintf(buf,PATHLENGTH, "%s%c%s",dir,DIR_SEP, 
baskets[bskt].cols[i]);
-   assert( access (buf,R_OK) == 0);
//unlink(buf);
}
baskets[bskt].count = cnt;
@@ -572,20 +568,16 @@ BSKTexportInternal(Client cntxt, int bsk
(void)cntxt;
// check access permission to directory first
(void) mkdir(dir,0755);
-   if( access (dir , F_OK | R_OK)){
-   throw(SQL, "iot.basket", "Could not access the target basket 
directory %s. error %d",dir,errno);
-   }

/* check for leftover files */
for( i=0; i < MAXCOLS && baskets[bskt].cols[i]; i++){
cname = baskets[bskt].cols[i];
snprintf(buf,PATHLENGTH, "%s%c%s",dir,DIR_SEP, cname);
-   _DEBUG_BASKET_ mnstr_printf(BSKTout,"Check for the file 
%s\n",buf);
-   if( !access (buf,R_OK))
-   throw(MAL,"iot.export","Left over %s file %s\n",cname, 
buf);
-   b = baskets[bskt].bats[i];
-   if( b == 0)
-   throw(MAL,"iot.export","Could not access the column 
%s\n",cname);
+   _DEBUG_BASKET_ mnstr_printf(BSKTout,"Attach the file %s\n",buf);
+   f=  fopen(buf,"w");
+   if( f == NULL)
+   throw(MAL,"iot.export","Could not access the column %s 
file %s\n",cname, buf);
+   fclose(f);
}
 
// types are already checked during stream initialization
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mosaic - Compilation issues

2016-07-13 Thread Martin Kersten
Changeset: 53c6706ed0c8 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=53c6706ed0c8
Modified Files:
monetdb5/modules/mosaic/mosaic_frame.c
monetdb5/modules/mosaic/mosaic_prefix.c
Branch: mosaic
Log Message:

Compilation issues


diffs (49 lines):

diff --git a/monetdb5/modules/mosaic/mosaic_frame.c 
b/monetdb5/modules/mosaic/mosaic_frame.c
--- a/monetdb5/modules/mosaic/mosaic_frame.c
+++ b/monetdb5/modules/mosaic/mosaic_frame.c
@@ -255,7 +255,7 @@ MOScreateframeDictionary(Client cntxt, M
//assert(hdr->framesize);
// sort it
for(i=0; i< (BUN) hdr->framesize; i++)
-   for(j=i+1; j< hdr->framesize; j++)
+   for(j= (BUN)(i+1); j< hdr->framesize; j++)
if(task->hdr->frame.valint[i] 
>task->hdr->frame.valint[j]){
int v= 
task->hdr->frame.valint[i];
task->hdr->frame.valint[i] = 
task->hdr->frame.valint[j];
diff --git a/monetdb5/modules/mosaic/mosaic_prefix.c 
b/monetdb5/modules/mosaic/mosaic_prefix.c
--- a/monetdb5/modules/mosaic/mosaic_prefix.c
+++ b/monetdb5/modules/mosaic/mosaic_prefix.c
@@ -962,7 +962,32 @@ MOSsubjoin_prefix(Client cntxt,  MOStask
case TYPE_bte: join_prefix(bte,unsigned char); break;
case TYPE_sht: join_prefix(sht,unsigned short); break;
case TYPE_int: join_prefix(int,unsigned short); break;
-   case TYPE_lng: join_prefix(lng,ulng); break;
+   case TYPE_lng: //join_prefix(lng,ulng); break;
+{   lng *w;
+   ulng *dst =  (ulng*)  (((char*) blk) + MosaicBlkSize);
+   ulng mask = *dst++;
+   ulng  val  =  (ulng) *dst++,v;
+   ulng m;
+   BitVector base;
+   int residu;
+   lng value;
+   m = ~mask;
+   residu = val & m;
+   val = val & mask;
+   base = (BitVector) dst;
+   w = (lng*) task->src;
+   for(n = task->elm, o = 0; n -- > 0; w++,o++){
+   for(i=0, oo= (oid) first; oo < (oid) last; v++, oo++,i++){
+   v = decompress(base,i,residu);
+   value =  (lng) ((ulng)val |(ulng) v);
+   if ( *w == value){
+   BUNappend(task->lbat, &oo, FALSE);
+   BUNappend(task->rbat, &o, FALSE);
+   }
+   }
+   }
+}
+   break;
case TYPE_oid: join_prefix(oid,BUN); break;
case TYPE_flt: join_prefix(flt,unsigned int); break;
case TYPE_dbl: join_prefix(dbl,unsigned int); break;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: sfcgal - ST_Simplify is now available.

2016-07-13 Thread Romulo Goncalves
Changeset: b688653f630f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b688653f630f
Modified Files:
geom/monetdb5/geom.c
geom/monetdb5/geom.h
geom/monetdb5/geom.mal
geom/sql/40_geom.sql
Branch: sfcgal
Log Message:

ST_Simplify is now available.


diffs (72 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -2232,6 +2232,24 @@ wkbsubPolygonize(bat *outBAT_id, bat* bB
return err;
 }
 
+str wkbSimplify(wkb** outWKB, wkb** geom, float* tolerance){
+   GEOSGeom geosGeometry = wkb2geos(*geom);
+   GEOSGeometry* outGeometry;
+
+   if(!(outGeometry = GEOSSimplify(geosGeometry, *tolerance))) {
+   *outWKB = NULL;
+   GEOSGeom_destroy(geosGeometry);
+   return createException(MAL, "geom.Simplify", "GEOSSimplify 
failed");
+   }
+
+   GEOSGeom_destroy(geosGeometry);
+
+   *outWKB = geos2wkb(outGeometry);
+   GEOSGeom_destroy(outGeometry);
+
+   return MAL_SUCCEED;
+}
+
 str wkbSimplifyPreserveTopology(wkb** outWKB, wkb** geom, float* tolerance){
GEOSGeom geosGeometry = wkb2geos(*geom);
GEOSGeometry* outGeometry;
@@ -2239,7 +2257,7 @@ str wkbSimplifyPreserveTopology(wkb** ou
if(!(outGeometry = GEOSTopologyPreserveSimplify(geosGeometry, 
*tolerance))) {
*outWKB = NULL;
GEOSGeom_destroy(geosGeometry);
-   return createException(MAL, "geom.SimplifyPreserveTopology", 
"GEOSSimplifyPreserveTopology failed");
+   return createException(MAL, "geom.SimplifyPreserveTopology", 
"GEOSTopologyPreserveSimplify failed");
}
 
GEOSGeom_destroy(geosGeometry);
diff --git a/geom/monetdb5/geom.h b/geom/monetdb5/geom.h
--- a/geom/monetdb5/geom.h
+++ b/geom/monetdb5/geom.h
@@ -257,6 +257,7 @@ geom_export str wkbDumpPointsP(bat* part
 geom_export str dumpGeometriesGeometry(BAT *idBAT, BAT *geomBAT, const 
GEOSGeometry *geosGeometry, const char *path);
 geom_export str wkbPolygonize(wkb **res, wkb **geom);
 geom_export str wkbsubPolygonize(bat *outBAT_id, bat* bBAT_id, bat *gBAT_id, 
bat *eBAT_id, bit* flag);
+geom_export str wkbSimplify(wkb **res, wkb **geom, float *tolerance);
 geom_export str wkbSimplifyPreserveTopology(wkb **res, wkb **geom, float 
*tolerance);
 
 geom_export str geom_2_geom(wkb** resWKB, wkb **valueWKB, int* columnType, 
int* columnSRID); 
diff --git a/geom/monetdb5/geom.mal b/geom/monetdb5/geom.mal
--- a/geom/monetdb5/geom.mal
+++ b/geom/monetdb5/geom.mal
@@ -360,6 +360,8 @@ comment "Creates a GeometryCollection co
 command subPolygonize(a:bat[:wkb], g:bat[:oid], e:bat[:oid], :bit) :bat[:wkb] 
address wkbsubPolygonize
 comment "Creates a GeometryCollection containing possible polygons formed from 
the constituent linework of a set of geometries.";
 
+command Simplify(a:wkb, t:flt) :wkb address wkbSimplify
+comment "Returns a \"simplified\" version of the given geometry using the 
Douglas-Peucker algorithm.";
 command SimplifyPreserveTopology(a:wkb, t:flt) :wkb address 
wkbSimplifyPreserveTopology
 comment "Returns a \"simplified\" version of the given geometry using the 
Douglas-Peucker algorithm.";
 
diff --git a/geom/sql/40_geom.sql b/geom/sql/40_geom.sql
--- a/geom/sql/40_geom.sql
+++ b/geom/sql/40_geom.sql
@@ -4384,7 +4384,7 @@ CREATE AGGREGATE ST_Polygonize(geom Geom
 --CREATE FUNCTION ST_RemoveRepeatedPoints RETURNS EXTERNAL NAME
 --CREATE FUNCTION ST_SharedPaths RETURNS EXTERNAL NAME
 --CREATE FUNCTION ST_Shift_Longitude RETURNS EXTERNAL NAME
---CREATE FUNCTION ST_Simplify RETURNS EXTERNAL NAME
+CREATE FUNCTION ST_Simplify(geom1 Geometry, tolerance real) RETURNS Geometry 
EXTERNAL NAME geom."Simplify";
 CREATE FUNCTION ST_SimplifyPreserveTopology(geom1 Geometry, tolerance real) 
RETURNS Geometry EXTERNAL NAME geom."SimplifyPreserveTopology";
 --CREATE FUNCTION ST_Split RETURNS EXTERNAL NAME
 --CREATE FUNCTION ST_Union(geometry set geoms)?
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: sfcgal - Aggregation function for Polygonize. Fix typo ...

2016-07-13 Thread Romulo Goncalves
Changeset: a8408633b65e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a8408633b65e
Modified Files:
geom/monetdb5/geom.c
geom/monetdb5/geom.h
geom/monetdb5/geom.mal
geom/sql/40_geom.sql
Branch: sfcgal
Log Message:

Aggregation function for Polygonize. Fix typo in MAL exception


diffs (260 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -2073,33 +2073,163 @@ wkbDumpPointsP(bat *parentBAT_id, bat *i
 return wkbDumpPoints_(parentBAT_id, idBAT_id, geomBAT_id, geomWKB, parent);
 }
 
-str wkbPolygonize(wkb** outWKB, wkb** geom){
-   GEOSGeom geosGeometry = wkb2geos(*geom);
-   int i = 0, geometriesNum = GEOSGetNumGeometries(geosGeometry);
-   GEOSGeometry* outGeometry;
-   const GEOSGeometry **multiGeometry;
-
-   multiGeometry = malloc(sizeof(GEOSGeometry*) * geometriesNum);
-   for(i=0; ibatCacheid);
+   throw(MAL, "geom.wkbPolygonize", RUNTIME_OBJECT_MISSING);
+   }
+   if ((e = BATdescriptor(*eBAT_id)) == NULL) {
+   BBPunfix(b->batCacheid);
+   BBPunfix(g->batCacheid);
+   throw(MAL, "geom.wkbPolygonize", RUNTIME_OBJECT_MISSING);
+   }
+
+if ((msg = BATgroupaggrinit(b, g, e, NULL, &min, &max, &ngrp,
+&start, &end, &cnt,
+&cand, &candend)) != NULL) {
+throw(MAL, "BATgroupPolygonize: %s\n", msg);
+}
+
+/*Create the empty geoms*/
+empty_geoms = (wkb**) GDKmalloc(sizeof(wkb*)*ngrp);
+for (i = 0; i < ngrp; i++)
+empty_geoms[i] = 
geos2wkb(GEOSGeom_createEmptyCollection(wkbGeometryCollection_mdb - 1));
+
+err = BATgroupWKBWKBtoWKB(outBAT_id, b, g, e, skip_nils, min, max, ngrp, 
start, end, empty_geoms, wkbPolygonize_, "wkbPolygonize");
+   BBPkeepref(*outBAT_id);
+
+GDKfree(empty_geoms);
+BBPunfix(b->batCacheid);
+BBPunfix(g->batCacheid);
+BBPunfix(e->batCacheid);
+
+   return err;
 }
 
 str wkbSimplifyPreserveTopology(wkb** outWKB, wkb** geom, float* tolerance){
@@ -4754,22 +4884,22 @@ wkbsubUnion(bat *outBAT_id, bat* bBAT_id
 const oid *cand = NULL, *candend = NULL;
 
if ((b = BATdescriptor(*bBAT_id)) == NULL) {
-   throw(MAL, "geom.wkbCollect", RUNTIME_OBJECT_MISSING);
+   throw(MAL, "geom.wkbUnion", RUNTIME_OBJECT_MISSING);
}
if ((g = BATdescriptor(*gBAT_id)) == NULL) {
BBPunfix(b->batCacheid);
-   throw(MAL, "geom.wkbCollect", RUNTIME_OBJECT_MISSING);
+   throw(MAL, "geom.wkbUnion", RUNTIME_OBJECT_MISSING);
}
if ((e = BATdescriptor(*eBAT_id)) == NULL) {
BBPunfix(b->batCacheid);
BBPunfix(g->batCacheid);
-   throw(MAL, "geom.wkbCollect", RUNTIME_OBJECT_MISSING);
+   throw(MAL, "geom.wkbUnion", RUNTIME_OBJECT_MISSING);
}
 
 if ((msg = BATgroupaggrinit(b, g, e, NULL, &min, &max, &ngrp,
 &start, &end, &cnt,
 &cand, &candend)) != NULL) {
-throw(MAL, "BATgroupCollect: %s\n", msg);
+throw(MAL, "BATgroupUnion: %s\n", msg);
 }
 
 /*Create the empty geoms*/
diff --git a/geom/monetdb5/geom.h b/geom/monetdb5/geom.h
--- a/geom/monetdb5/geom.h
+++ b/geom/monetdb5/geom.h
@@ -256,6 +256,7 @@ geom_export str wkbDumpPoints(bat* idBAT
 geom_export str wkbDumpPointsP(bat* partentBAT_id, bat* idBAT_id, bat* 
geomBAT_id, wkb**, int* parent);
 geom_export str dumpGeometriesGeometry(BAT *idBAT, BAT *geomBAT, const 
GEOSGeometry *geosGeometry, const char *path);
 geom_export str wkbPolygonize(wkb **res, wkb **geom);
+geom_export str wkbsubPolygonize(bat *outBAT_id, bat* bBAT_id, bat *gBAT_id, 
bat *eBAT_id, bit* flag);
 geom_export str wkbSimplifyPreserveTopology(wkb **res, wkb **geom, float 
*tolerance);
 
 geom_export str geom_2_geom(wkb** resWKB, wkb **valueWKB, int* columnType, 
int* columnSRID); 
diff --git a/geom/monetdb5/geom.mal b/geom/monetdb5/geom.mal
--- a/geom/monetdb5/geom.mal
+++ b/geom/monetdb5/geom.mal
@@ -354,8 +354,12 @@ command DumpPoints(a:wkb) (id:bat[:oid, 
 comment "Gets a Geometry and returns the Points in it";
 command DumpPointsP(a:wkb, p:int) (parent:bat[:oid, :int], id:bat[:oid, :str], 
geom:bat[:oid, :wkb]) address wkbDumpPointsP
 comment "Gets a Geometry and returns the Points in it";
+
 command Polygonize(a:wkb) :wkb address wkbPolygonize
 comment "Creates a GeometryCollection containing possible polygons formed from 
the constituent linework of a set of geometries.";
+command subPolygonize(a:bat[:wkb], g:bat[:oid], e:bat[:oid], :bit) :bat[:wkb] 
address wkbsubPolygonize
+comment "Creates a GeometryCollection containing possible polygons formed from 
the constituent linework of a set of geometries.";
+
 command SimplifyPreserveTopology(a:wkb, t:flt) :wkb address 
wkbSimplifyPreserveTopology
 comment "Returns a \"simplified\" version of the given geome

MonetDB: sfcgal - Add another aggregation function, subUnion. Fi...

2016-07-13 Thread Romulo Goncalves
Changeset: 099f60388f21 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=099f60388f21
Modified Files:
geom/monetdb5/geom.c
geom/monetdb5/geom.h
geom/monetdb5/geom.mal
Branch: sfcgal
Log Message:

Add another aggregation function, subUnion. Fix a bug in BATgroupWKBWKBtoWKB.


diffs (90 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -4741,6 +4741,54 @@ wkbUnionCascade(wkb **outWKB, bat *inBAT
 }
 
 str
+wkbsubUnion(bat *outBAT_id, bat* bBAT_id, bat *gBAT_id, bat *eBAT_id, bit* 
flag) {
+(void) flag;
+int skip_nils = 1, i = 0;
+const char *msg = MAL_SUCCEED;
+str err;
+BAT *b = NULL, *g = NULL, *e = NULL;
+oid min, max;
+BUN ngrp;
+BUN start, end, cnt;
+wkb **empty_geoms = NULL;
+const oid *cand = NULL, *candend = NULL;
+
+   if ((b = BATdescriptor(*bBAT_id)) == NULL) {
+   throw(MAL, "geom.wkbCollect", RUNTIME_OBJECT_MISSING);
+   }
+   if ((g = BATdescriptor(*gBAT_id)) == NULL) {
+   BBPunfix(b->batCacheid);
+   throw(MAL, "geom.wkbCollect", RUNTIME_OBJECT_MISSING);
+   }
+   if ((e = BATdescriptor(*eBAT_id)) == NULL) {
+   BBPunfix(b->batCacheid);
+   BBPunfix(g->batCacheid);
+   throw(MAL, "geom.wkbCollect", RUNTIME_OBJECT_MISSING);
+   }
+
+if ((msg = BATgroupaggrinit(b, g, e, NULL, &min, &max, &ngrp,
+&start, &end, &cnt,
+&cand, &candend)) != NULL) {
+throw(MAL, "BATgroupCollect: %s\n", msg);
+}
+
+/*Create the empty geoms*/
+empty_geoms = (wkb**) GDKmalloc(sizeof(wkb*)*ngrp);
+for (i = 0; i < ngrp; i++)
+empty_geoms[i] = geos2wkb(GEOSGeom_createEmptyPolygon());
+
+err = BATgroupWKBWKBtoWKB(outBAT_id, b, g, e, skip_nils, min, max, ngrp, 
start, end, empty_geoms, wkbUnion, "wkbUnion");
+   BBPkeepref(*outBAT_id);
+
+GDKfree(empty_geoms);
+BBPunfix(b->batCacheid);
+BBPunfix(g->batCacheid);
+BBPunfix(e->batCacheid);
+
+   return err;
+}
+
+str
 wkbCollect(wkb **out, wkb **geom1WKB, wkb **geom2WKB)
 {
GEOSGeom outGeometry, geom1Geometry, geom2Geometry, geomGeometries[2];
@@ -5028,7 +5076,6 @@ BATgroupWKBWKBtoWKB(bat *outBAT_id, BAT 
 if (!outWKBs[gid])
 outWKBs[gid] = aWKBs[gid];
 } else {
-nils = 1;
 if (empty_geoms)
 aWKBs[gid] = empty_geoms[gid];
 
diff --git a/geom/monetdb5/geom.h b/geom/monetdb5/geom.h
--- a/geom/monetdb5/geom.h
+++ b/geom/monetdb5/geom.h
@@ -224,7 +224,7 @@ geom_export str wkbIntersection_bat_s(ba
 geom_export str wkbUnion(wkb **out, wkb **a, wkb **b);
 geom_export str wkbUnionAggr(wkb** outWKB, bat* inBAT_id);
 geom_export str wkbUnionCascade(wkb** outWKB, bat* inBAT_id);
-geom_export str wkbsubUnion(bat *outBAT_id, bat* bBAT_id, bat *gBAT_id, bat 
*eBAT_id, bit* fla);
+geom_export str wkbsubUnion(bat *outBAT_id, bat* bBAT_id, bat *gBAT_id, bat 
*eBAT_id, bit* flag);
 geom_export str wkbCollect(wkb **out, wkb **a, wkb **b);
 geom_export str wkbCollectCascade(wkb** outWKB, bat* inBAT_id);
 geom_export str wkbsubCollect(bat *outBAT_id, bat* bBAT_id, bat *gBAT_id, bat 
*eBAT_id, bit* flag);
diff --git a/geom/monetdb5/geom.mal b/geom/monetdb5/geom.mal
--- a/geom/monetdb5/geom.mal
+++ b/geom/monetdb5/geom.mal
@@ -289,7 +289,7 @@ command Union(a:wkb, b:wkb) :wkb address
 comment "Returns a geometry that represents the point set union of the 
Geometries a, b";
 command Union(a:bat[:oid,:wkb]) :wkb address wkbUnionCascade
 comment "Gets a BAT with geometries and returns their union"; 
-command subUnion(a:bat[:oid,:wkb], g:bat[:oid], e:bat[:oid], :bit) :bat[:wkb] 
address wkbsubUnion
+command subUnion(b:bat[:wkb], g:bat[:oid], e:bat[:oid], :bit) :bat[:wkb] 
address wkbsubUnion
 comment "Gets a BAT with geometries, candidate group list and returns the 
union of each group element."; 
 
 command Collect(a:wkb, b:wkb) :wkb address wkbCollect
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: sfcgal - Add another aggregation function, subMakLine. ...

2016-07-13 Thread Romulo Goncalves
Changeset: 6cdb359506cb for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6cdb359506cb
Modified Files:
geom/monetdb5/geom.c
geom/monetdb5/geom.h
geom/monetdb5/geom.mal
Branch: sfcgal
Log Message:

Add another aggregation function, subMakLine. Allow the function to choose the 
initiation point, an empty geometry of the first element of a BAT.


diffs (197 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -15,6 +15,8 @@
 
 int TYPE_mbr;
 
+static str BATgroupWKBWKBtoWKB(bat *outBAT_id, BAT *b, BAT *g, BAT *e, int 
skip_nils, oid min, oid max, BUN ngrp, BUN start, BUN end, wkb **empty_geoms, 
str (*func) (wkb **, wkb **, wkb**), const char* name);
+
 static inline int
 geometryHasZ(int info)
 {
@@ -3633,6 +3635,51 @@ wkbMakeLineAggr(wkb **outWKB, bat *inBAT
return err;
 }
 
+str
+wkbsubMakeLine(bat *outBAT_id, bat* bBAT_id, bat *gBAT_id, bat *eBAT_id, bit* 
flag)
+{
+(void) flag;
+int skip_nils = 1, i = 0;
+const char *msg = MAL_SUCCEED;
+str err;
+BAT *b = NULL, *g = NULL, *e = NULL;
+oid min, max;
+BUN ngrp;
+BUN start, end, cnt;
+wkb **empty_geoms = NULL;
+const oid *cand = NULL, *candend = NULL;
+
+   if ((b = BATdescriptor(*bBAT_id)) == NULL) {
+   throw(MAL, "geom.subMakeLine", RUNTIME_OBJECT_MISSING);
+   }
+   if ((g = BATdescriptor(*gBAT_id)) == NULL) {
+   BBPunfix(b->batCacheid);
+   throw(MAL, "geom.subMakeLine", RUNTIME_OBJECT_MISSING);
+   }
+   if ((e = BATdescriptor(*eBAT_id)) == NULL) {
+   BBPunfix(b->batCacheid);
+   BBPunfix(g->batCacheid);
+   throw(MAL, "geom.subMakeLine", RUNTIME_OBJECT_MISSING);
+   }
+
+if ((msg = BATgroupaggrinit(b, g, e, NULL, &min, &max, &ngrp,
+&start, &end, &cnt,
+&cand, &candend)) != NULL) {
+throw(MAL, "BATgroupMakeLine: %s\n", msg);
+}
+
+err = BATgroupWKBWKBtoWKB(outBAT_id, b, g, e, skip_nils, min, max, ngrp, 
start, end, empty_geoms, wkbMakeLine, "wkbMakeLine");
+   BBPkeepref(*outBAT_id);
+
+GDKfree(empty_geoms);
+BBPunfix(b->batCacheid);
+BBPunfix(g->batCacheid);
+BBPunfix(e->batCacheid);
+
+   return err;
+return MAL_SUCCEED;
+}
+
 /* Returns the first or last point of a linestring */
 static str
 wkbBorderPoint(wkb **out, wkb **geom, GEOSGeometry *(*func) (const 
GEOSGeometry *), const char *name)
@@ -4952,29 +4999,49 @@ BATgroupWKBWKBtoWKB(bat *outBAT_id, BAT 
 "start " BUNFMT ", end " BUNFMT
 ", nonil = %d\n",
 name, start, end, nonil);
+gid = 0;
 if (nonil) {
-aWKBs[0] = empty_geoms[0];
+if (empty_geoms)
+aWKBs[gid] = empty_geoms[gid];
 
 // add one more segment for each following row
 for (i = start; i < end; i++) {
+if (aWKBs[gid] == NULL) {
+aWKBs[gid] = (wkb *) BUNtail(bBAT_iter, i);
+continue;
+}
+
 bWKB = (wkb *) BUNtail(bBAT_iter, i);
-outWKBs[0] = NULL;
-
-if ( (err = (*func)(&outWKBs[0], &aWKBs[0], &bWKB)) != 
MAL_SUCCEED )
-break;
-else
-*aWKBs[0] = *outWKBs[0];
+
+if ( (msg = (*func)(&outWKBs[gid], &aWKBs[gid], &bWKB)) != 
MAL_SUCCEED ) {
+GDKfree(aWKBs);
+GDKfree(outWKBs);
+GDKfree(grpWKBs);
+BBPunfix(outBAT->batCacheid);
+outBAT = NULL;
+err = createException(MAL, name, msg);
+GDKfree(msg);
+return err;
+} else
+aWKBs[gid] = outWKBs[gid];
 }
+if (!outWKBs[gid])
+outWKBs[gid] = aWKBs[gid];
 } else {
 nils = 1;
-aWKBs[0] = empty_geoms[0];
+if (empty_geoms)
+aWKBs[gid] = empty_geoms[gid];
 
 for (i = start; i < end && nils == 0; i++) {
+if (aWKBs[gid] == NULL) {
+aWKBs[gid] = (wkb *) BUNtail(bBAT_iter, i);
+continue;
+}
 bWKB = (wkb *) BUNtail(bBAT_iter, i);
 
 if (wkb_isnil(bWKB)) {
 if (!skip_nils) {
-if ((outWKBs[0] = wkbNULLcopy()) == NULL) {
+if ((outWKBs[gid] = wkbNULLcopy()) == NULL) {
 GDKfree(aWKBs);
 GDKfree(outWKBs);
 GDKfree(grpWKBs);
@@ -4985,14 +5052,23 @@ BATgroupWKBWKBtoWKB(bat *outBAT_id, BAT 
 nils = 1;
 }
 } else {
-if ( (err = (*func)

MonetDB: default - fixed problem with slice and packed flag

2016-07-13 Thread Niels Nes
Changeset: a62747757b50 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a62747757b50
Modified Files:
monetdb5/optimizer/opt_mergetable.c

sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
Branch: default
Log Message:

fixed problem with slice and packed flag


diffs (31 lines):

diff --git a/monetdb5/optimizer/opt_mergetable.c 
b/monetdb5/optimizer/opt_mergetable.c
--- a/monetdb5/optimizer/opt_mergetable.c
+++ b/monetdb5/optimizer/opt_mergetable.c
@@ -1444,14 +1444,12 @@ mat_topn(MalBlkPtr mb, InstrPtr p, matli
pushInstruction(mb,r);
 
q = copyInstruction(p);
-   //setFunctionId(q, subsliceRef);
-   setFunctionId(q, sliceRef);
+   setFunctionId(q, subsliceRef);
if (ml->v[m].type != mat_tpn || is_slice) 
getArg(q,1) = getArg(r,0);
pushInstruction(mb,q);
}
 
-   ml->v[piv].packed = 1;
ml->v[piv].type = mat_slc;
}
 }
diff --git 
a/sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
 
b/sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
--- 
a/sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
+++ 
b/sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
@@ -22,7 +22,7 @@ Ready.
 
 #debug select * from tables;
 mdb>#X_1=0@0:void := user.s1_1();
-mdb>#X_159=0@0:void := querylog.define("debug select * from 
tables;","default_pipe",375);
+mdb>#X_164=0@0:void := querylog.define("debug select * from 
tables;","default_pipe",352);
 
 # 16:24:01 >  
 # 16:24:01 >  "Done."
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: jit - merged with default

2016-07-13 Thread Niels Nes
Changeset: cd5b2d90fd4f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cd5b2d90fd4f
Modified Files:
.hgtags
MonetDB.spec
NT/installer32/MonetDB-ODBC-Installer.vdproj
NT/installer32/MonetDB5-Geom-Module.vdproj
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer64/MonetDB-ODBC-Installer.vdproj
NT/installer64/MonetDB5-Geom-Module.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
NT/monetdb_config.h.in
NT/rules.msc
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
debian/changelog
gdk/libbat.rc
java/ChangeLog-Archive
java/ChangeLog.Jun2016
java/Makefile.ag
java/build.properties
java/pom.xml
java/release.txt
libversions
monetdb5/optimizer/opt_mergetable.c
monetdb5/tools/libmonetdb5.rc
sql/server/rel_optimizer.c

sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
sql/test/bugs/Tests/select_select_bug.stable.out
sql/test/mergetables/Tests/part-elim.stable.out
vertoo.data
Branch: jit
Log Message:

merged with default


diffs (truncated from 523 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -629,3 +629,6 @@ 192e3168234a5f9f8a4d1c4ce17805f608f001c3
 b29fdfe9c590f674208212bf4ead617beef4b73c Jun2016_release
 4a05df3932a97865ac7e4037361723d5563490b3 Jun2016_5
 4a05df3932a97865ac7e4037361723d5563490b3 Jun2016_SP1_release
+c8b06c670a635978640d742643c317b82c5f4b8c Jun2016_7
+4a05df3932a97865ac7e4037361723d5563490b3 Jun2016_SP1_release
+c8b06c670a635978640d742643c317b82c5f4b8c Jun2016_SP1_release
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -962,6 +962,44 @@ rm -f %{buildroot}%{_bindir}/Maddlog
 %postun -p /sbin/ldconfig
 
 %changelog
+* Wed Jul 13 2016 Sjoerd Mullender  - 11.23.7-20160713
+- Rebuilt.
+- BZ#4014: KILL signal
+- BZ#4021: Analyze query does not escape input [security]
+- BZ#4026: JDBC driver incorrectly converts TINYINT fields to String
+  instead of an integer type.
+- BZ#4028: inputs not the same size
+- BZ#4032: no decimal places after update. ODBC driver
+- BZ#4035: SQL Function call bug
+- BZ#4036: Possible sql_catalog corruption due to unclean backuped tail
+
+* Thu Jul  7 2016 Martin van Dinther  
- 11.23.7-20160713
+- java: Corrected PROCEDURE_TYPE output value of method 
DatabaseMetaData.getProcedures().
+  It used to return procedureReturnsResult. Now it returns procedureNoResult.
+  Corrected ORDINAL_POSITION output value of method 
DatabaseMetaData.getProcedureColumns().
+  It used to start with 0, but as procedures do not return a result value it 
now
+  starts with 1 for all the procedure arguments, as defined by the JDBC API.
+- java: Improved output of method DatabaseMetaData.getProcedures(). The REMARKS
+  column now contains the procedure definition as stored in sys.functions.func.
+  The SPECIFIC_NAME column now contains the procedure unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the specific
+  overloaded procedure which has the same name, but different arguments.
+  Also improved output of method DatabaseMetaData.getProcedureColumns().
+  The SPECIFIC_NAME column now contains the procedure unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the proper
+  arguments of the specific overloaded procedure by matching the SPECIFIC_NAME
+  value.
+- java: Improved output of method DatabaseMetaData.getFunctions(). The REMARKS
+  column now contains the function definition as stored in sys.functions.func.
+  The SPECIFIC_NAME column now contains the function unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the specific
+  overloaded function which has the same name, but different arguments.
+  Also improved output of method DatabaseMetaData.getFunctionColumns().
+  The SPECIFIC_NAME column now contains the function unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the proper
+  arguments of the specific overloaded function by matching the SPECIFIC_NAME
+  value.
+
 * Mon Jul 04 2016 Sjoerd Mullender  - 11.23.5-20160704
 - Rebuilt.
 - BZ#4031: mclient doesn't accept - argument to refer to stdin
diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -23926,34 +23926,18 @@ command bat.mirror(b:bat[:any_2]):bat[:o
 address BKCmirror;
 comment Returns the head-mirror image of a BAT (two head columns).
 
-pattern bat.new_persistent(ht:oid,tt:any_1,size:lng):bat[:any_1] 
-address CMDBATnew_persi

MonetDB: default - merged

2016-07-13 Thread Niels Nes
Changeset: 59fa6c0b14cf for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=59fa6c0b14cf
Modified Files:
.hgtags
MonetDB.spec
NT/installer32/MonetDB-ODBC-Installer.vdproj
NT/installer32/MonetDB5-Geom-Module.vdproj
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer64/MonetDB-ODBC-Installer.vdproj
NT/installer64/MonetDB5-Geom-Module.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
debian/changelog
gdk/libbat.rc
java/ChangeLog-Archive
java/ChangeLog.Jun2016
java/Makefile.ag
java/build.properties
java/pom.xml
java/release.txt
libversions
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: default
Log Message:

merged


diffs (247 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -629,3 +629,6 @@ 192e3168234a5f9f8a4d1c4ce17805f608f001c3
 b29fdfe9c590f674208212bf4ead617beef4b73c Jun2016_release
 4a05df3932a97865ac7e4037361723d5563490b3 Jun2016_5
 4a05df3932a97865ac7e4037361723d5563490b3 Jun2016_SP1_release
+c8b06c670a635978640d742643c317b82c5f4b8c Jun2016_7
+4a05df3932a97865ac7e4037361723d5563490b3 Jun2016_SP1_release
+c8b06c670a635978640d742643c317b82c5f4b8c Jun2016_SP1_release
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -962,6 +962,44 @@ rm -f %{buildroot}%{_bindir}/Maddlog
 %postun -p /sbin/ldconfig
 
 %changelog
+* Wed Jul 13 2016 Sjoerd Mullender  - 11.23.7-20160713
+- Rebuilt.
+- BZ#4014: KILL signal
+- BZ#4021: Analyze query does not escape input [security]
+- BZ#4026: JDBC driver incorrectly converts TINYINT fields to String
+  instead of an integer type.
+- BZ#4028: inputs not the same size
+- BZ#4032: no decimal places after update. ODBC driver
+- BZ#4035: SQL Function call bug
+- BZ#4036: Possible sql_catalog corruption due to unclean backuped tail
+
+* Thu Jul  7 2016 Martin van Dinther  
- 11.23.7-20160713
+- java: Corrected PROCEDURE_TYPE output value of method 
DatabaseMetaData.getProcedures().
+  It used to return procedureReturnsResult. Now it returns procedureNoResult.
+  Corrected ORDINAL_POSITION output value of method 
DatabaseMetaData.getProcedureColumns().
+  It used to start with 0, but as procedures do not return a result value it 
now
+  starts with 1 for all the procedure arguments, as defined by the JDBC API.
+- java: Improved output of method DatabaseMetaData.getProcedures(). The REMARKS
+  column now contains the procedure definition as stored in sys.functions.func.
+  The SPECIFIC_NAME column now contains the procedure unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the specific
+  overloaded procedure which has the same name, but different arguments.
+  Also improved output of method DatabaseMetaData.getProcedureColumns().
+  The SPECIFIC_NAME column now contains the procedure unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the proper
+  arguments of the specific overloaded procedure by matching the SPECIFIC_NAME
+  value.
+- java: Improved output of method DatabaseMetaData.getFunctions(). The REMARKS
+  column now contains the function definition as stored in sys.functions.func.
+  The SPECIFIC_NAME column now contains the function unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the specific
+  overloaded function which has the same name, but different arguments.
+  Also improved output of method DatabaseMetaData.getFunctionColumns().
+  The SPECIFIC_NAME column now contains the function unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the proper
+  arguments of the specific overloaded function by matching the SPECIFIC_NAME
+  value.
+
 * Mon Jul 04 2016 Sjoerd Mullender  - 11.23.5-20160704
 - Rebuilt.
 - BZ#4031: mclient doesn't accept - argument to refer to stdin
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,47 @@
+monetdb (11.23.7) unstable; urgency=low
+
+  * Rebuilt.
+  * BZ#4014: KILL signal
+  * BZ#4021: Analyze query does not escape input [security]
+  * BZ#4026: JDBC driver incorrectly converts TINYINT fields to String
+instead of an integer type.
+  * BZ#4028: inputs not the same size
+  * BZ#4032: no decimal places after update. ODBC driver
+  * BZ#4035: SQL Function call bug
+  * BZ#4036: Possible sql_catalog corruption due to unclean backuped tail
+
+ -- Sjoerd Mullender   Wed, 13 Jul 2016 14:33:03 +0200
+
+monetdb (11.23.7) unstable; urgency=low
+
+  * java: Corrected PROCEDURE_TYPE output value of method 
DatabaseMetaData.getProcedures().
+It used to return procedureReturnsResult. Now it returns procedureNoResult.
+Corr

MonetDB: default - don't use mat after they got packed.

2016-07-13 Thread Niels Nes
Changeset: b0a97a62eacd for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b0a97a62eacd
Modified Files:
monetdb5/optimizer/opt_mergetable.c
Branch: default
Log Message:

don't use mat after they got packed.


diffs (52 lines):

diff --git a/monetdb5/optimizer/opt_mergetable.c 
b/monetdb5/optimizer/opt_mergetable.c
--- a/monetdb5/optimizer/opt_mergetable.c
+++ b/monetdb5/optimizer/opt_mergetable.c
@@ -53,7 +53,7 @@ static int
 is_a_mat(int idx, matlist_t *ml){
int i;
for(i =0; itop; i++)
-   if (ml->v[i].mv == idx) 
+   if (!ml->v[i].packed && ml->v[i].mv == idx) 
return i;
return -1;
 }
@@ -1444,7 +1444,8 @@ mat_topn(MalBlkPtr mb, InstrPtr p, matli
pushInstruction(mb,r);
 
q = copyInstruction(p);
-   setFunctionId(q, subsliceRef);
+   //setFunctionId(q, subsliceRef);
+   setFunctionId(q, sliceRef);
if (ml->v[m].type != mat_tpn || is_slice) 
getArg(q,1) = getArg(r,0);
pushInstruction(mb,q);
@@ -1491,7 +1492,7 @@ OPTmergetableImplementation(Client cntxt
 {
InstrPtr *old;
matlist_t ml;
-   int oldtop, fm, fn, fo, fe, i, k, m, n, o, e, slimit;
+   int oldtop, fm, fn, fo, fe, i, k, m, n, o, e, slimit, bailout = 0;
int size=0, match, actions=0, distinct_topn = 0, /*topn_res = 0,*/ 
groupdone = 0, *vars;
char buf[256];
lng usec = GDKusec();
@@ -1523,7 +1524,9 @@ OPTmergetableImplementation(Client cntxt
if (getModuleId(q) == groupRef && getFunctionId(q) == 
subgroupdoneRef)
groupdone = 1;
}
-
+   if (getModuleId(p) == algebraRef && 
+   getFunctionId(p) == selectNotNilRef ) 
+   bailout = 1;
/*
if (isTopn(p))
topn_res = getArg(p, 0);
@@ -1533,6 +1536,9 @@ OPTmergetableImplementation(Client cntxt
}
GDKfree(vars);
 
+   if (bailout)
+   goto cleanup;
+
/* the number of MATs is limited to the variable stack*/
ml.size = mb->vtop;
ml.top = 0;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge heads.

2016-07-13 Thread Sjoerd Mullender
Changeset: a99d546f149f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a99d546f149f
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
monetdb5/optimizer/opt_mergetable.c
sql/server/rel_optimizer.c

sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
sql/test/bugs/Tests/select_select_bug.stable.out
sql/test/mergetables/Tests/part-elim.stable.out
Branch: default
Log Message:

Merge heads.


diffs (239 lines):

diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -23926,34 +23926,18 @@ command bat.mirror(b:bat[:any_2]):bat[:o
 address BKCmirror;
 comment Returns the head-mirror image of a BAT (two head columns).
 
-pattern bat.new_persistent(ht:oid,tt:any_1,size:lng):bat[:any_1] 
-address CMDBATnew_persistent;
-comment Creates a new BAT in the persistent farm and allocate space.
-
-pattern bat.new_persistent(ht:oid,tt:any_1,size:int):bat[:any_1] 
-address CMDBATnew_persistent;
-pattern bat.new_persistent(ht:oid,tt:any_1):bat[:any_1] 
-address CMDBATnew_persistent;
-comment Creates a new empty transient BAT in the persistent farm, with head- 
and tail-types as indicated.
-
-pattern bat.new(ht:oid,tt:any_1,size:lng):bat[:any_1] 
+pattern bat.new(tt:any_1,size:lng):bat[:any_1] 
 address CMDBATnew;
-comment Creates a new BAT with sufficient space.
-
-pattern bat.new(ht:oid,tt:any_1,size:int):bat[:any_1] 
+comment Creates a new empty transient BAT, with tail-types as indicated.
+
+pattern bat.new(tt:any_1,size:int,persist:bit):bat[:any_1] 
 address CMDBATnew;
-pattern bat.new(ht:oid,tt:any_1):bat[:any_1] 
+pattern bat.new(tt:any_1,size:lng,persist:bit):bat[:any_1] 
 address CMDBATnew;
-comment Creates a new empty transient BAT, with head- and tail-types as 
indicated.
-
-pattern bat.new(tt:any_1,size:lng):bat[:any_1] 
-address CMDBATnewColumn;
-comment Creates a new empty transient BAT, with tail-types as indicated.
-
 pattern bat.new(tt:any_1,size:int):bat[:any_1] 
-address CMDBATnewColumn;
+address CMDBATnew;
 pattern bat.new(tt:any_1):bat[:any_1] 
-address CMDBATnewColumn;
+address CMDBATnew;
 pattern bat.orderidx(bv:bat[:any_1],l:bat[:any_1]...):void 
 address OIDXmerge;
 comment Consolidates the OID index arrangement
diff --git a/clients/Tests/MAL-signatures.stable.out.int128 
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -31785,34 +31785,18 @@ command bat.mirror(b:bat[:any_2]):bat[:o
 address BKCmirror;
 comment Returns the head-mirror image of a BAT (two head columns).
 
-pattern bat.new_persistent(ht:oid,tt:any_1,size:lng):bat[:any_1] 
-address CMDBATnew_persistent;
-comment Creates a new BAT in the persistent farm and allocate space.
-
-pattern bat.new_persistent(ht:oid,tt:any_1,size:int):bat[:any_1] 
-address CMDBATnew_persistent;
-pattern bat.new_persistent(ht:oid,tt:any_1):bat[:any_1] 
-address CMDBATnew_persistent;
-comment Creates a new empty transient BAT in the persistent farm, with head- 
and tail-types as indicated.
-
-pattern bat.new(ht:oid,tt:any_1,size:lng):bat[:any_1] 
+pattern bat.new(tt:any_1,size:lng):bat[:any_1] 
 address CMDBATnew;
-comment Creates a new BAT with sufficient space.
-
-pattern bat.new(ht:oid,tt:any_1,size:int):bat[:any_1] 
+comment Creates a new empty transient BAT, with tail-types as indicated.
+
+pattern bat.new(tt:any_1,size:int,persist:bit):bat[:any_1] 
 address CMDBATnew;
-pattern bat.new(ht:oid,tt:any_1):bat[:any_1] 
+pattern bat.new(tt:any_1,size:lng,persist:bit):bat[:any_1] 
 address CMDBATnew;
-comment Creates a new empty transient BAT, with head- and tail-types as 
indicated.
-
-pattern bat.new(tt:any_1,size:lng):bat[:any_1] 
-address CMDBATnewColumn;
-comment Creates a new empty transient BAT, with tail-types as indicated.
-
 pattern bat.new(tt:any_1,size:int):bat[:any_1] 
-address CMDBATnewColumn;
+address CMDBATnew;
 pattern bat.new(tt:any_1):bat[:any_1] 
-address CMDBATnewColumn;
+address CMDBATnew;
 pattern bat.orderidx(bv:bat[:any_1],l:bat[:any_1]...):void 
 address OIDXmerge;
 comment Consolidates the OID index arrangement
diff --git a/monetdb5/optimizer/opt_mergetable.c 
b/monetdb5/optimizer/opt_mergetable.c
--- a/monetdb5/optimizer/opt_mergetable.c
+++ b/monetdb5/optimizer/opt_mergetable.c
@@ -1859,7 +1859,8 @@ cleanup:
 }
 /* keep all actions taken as a post block comment */
 snprintf(buf,256,"%-20s actions=%2d time=" LLFMT " 
usec","mergetable",actions,GDKusec() - usec);
-newComment(mb,buf);
+if ( mb->errors == 0) 
+newComment(mb,buf);
 
return actions;
 }
diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -1847,6 +1847,32 @

MonetDB: default - Merge with Jun2016 branch, not changing any f...

2016-07-13 Thread Sjoerd Mullender
Changeset: e813a65e083e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e813a65e083e
Modified Files:
MonetDB.spec
NT/installer32/MonetDB-ODBC-Installer.vdproj
NT/installer32/MonetDB5-Geom-Module.vdproj
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer64/MonetDB-ODBC-Installer.vdproj
NT/installer64/MonetDB5-Geom-Module.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: default
Log Message:

Merge with Jun2016 branch, not changing any files..

___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2016 - Setting tags Jun2016_7 and Jun2016_SP1 for th...

2016-07-13 Thread Sjoerd Mullender
Changeset: b9ea75e5218c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b9ea75e5218c
Modified Files:
.hgtags
Branch: Jun2016
Log Message:

Setting tags Jun2016_7 and Jun2016_SP1 for the release build.


diffs (10 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -629,3 +629,6 @@ 192e3168234a5f9f8a4d1c4ce17805f608f001c3
 b29fdfe9c590f674208212bf4ead617beef4b73c Jun2016_release
 4a05df3932a97865ac7e4037361723d5563490b3 Jun2016_5
 4a05df3932a97865ac7e4037361723d5563490b3 Jun2016_SP1_release
+c8b06c670a635978640d742643c317b82c5f4b8c Jun2016_7
+4a05df3932a97865ac7e4037361723d5563490b3 Jun2016_SP1_release
+c8b06c670a635978640d742643c317b82c5f4b8c Jun2016_SP1_release
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2016 - Post release build.

2016-07-13 Thread Sjoerd Mullender
Changeset: c0047d43c717 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c0047d43c717
Modified Files:
MonetDB.spec
NT/installer32/MonetDB-ODBC-Installer.vdproj
NT/installer32/MonetDB5-Geom-Module.vdproj
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer64/MonetDB-ODBC-Installer.vdproj
NT/installer64/MonetDB5-Geom-Module.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
clients/python2/setup.py
clients/python3/setup.py
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: Jun2016
Log Message:

Post release build.


diffs (truncated from 348 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1,5 +1,5 @@
 %define name MonetDB
-%define version 11.23.7
+%define version 11.23.8
 %{!?buildno: %global buildno %(date +%Y%m%d)}
 
 # groups of related archs
diff --git a/NT/installer32/MonetDB-ODBC-Installer.vdproj 
b/NT/installer32/MonetDB-ODBC-Installer.vdproj
--- a/NT/installer32/MonetDB-ODBC-Installer.vdproj
+++ b/NT/installer32/MonetDB-ODBC-Installer.vdproj
@@ -574,7 +574,7 @@
 "RemovePreviousVersions" = "11:TRUE"
 "DetectNewerInstalledVersion" = "11:TRUE"
 "InstallAllUsers" = "11:TRUE"
-"ProductVersion" = "8:11.23.7"
+"ProductVersion" = "8:11.23.8"
 "Manufacturer" = "8:MonetDB"
 "ARPHELPTELEPHONE" = "8:"
 "ARPHELPLINK" = "8:http://www.monetdb.org/";
diff --git a/NT/installer32/MonetDB5-Geom-Module.vdproj 
b/NT/installer32/MonetDB5-Geom-Module.vdproj
--- a/NT/installer32/MonetDB5-Geom-Module.vdproj
+++ b/NT/installer32/MonetDB5-Geom-Module.vdproj
@@ -439,7 +439,7 @@
 "RemovePreviousVersions" = "11:TRUE"
 "DetectNewerInstalledVersion" = "11:TRUE"
 "InstallAllUsers" = "11:TRUE"
-"ProductVersion" = "8:11.23.7"
+"ProductVersion" = "8:11.23.8"
 "Manufacturer" = "8:MonetDB"
 "ARPHELPTELEPHONE" = "8:"
 "ARPHELPLINK" = "8:http://www.monetdb.org/";
diff --git a/NT/installer32/MonetDB5-SQL-Installer.vdproj 
b/NT/installer32/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer32/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer32/MonetDB5-SQL-Installer.vdproj
@@ -4296,7 +4296,7 @@
 "RemovePreviousVersions" = "11:TRUE"
 "DetectNewerInstalledVersion" = "11:TRUE"
 "InstallAllUsers" = "11:TRUE"
-"ProductVersion" = "8:11.23.7"
+"ProductVersion" = "8:11.23.8"
 "Manufacturer" = "8:MonetDB"
 "ARPHELPTELEPHONE" = "8:"
 "ARPHELPLINK" = "8:http://www.monetdb.org/";
diff --git a/NT/installer64/MonetDB-ODBC-Installer.vdproj 
b/NT/installer64/MonetDB-ODBC-Installer.vdproj
--- a/NT/installer64/MonetDB-ODBC-Installer.vdproj
+++ b/NT/installer64/MonetDB-ODBC-Installer.vdproj
@@ -574,7 +574,7 @@
 "RemovePreviousVersions" = "11:TRUE"
 "DetectNewerInstalledVersion" = "11:TRUE"
 "InstallAllUsers" = "11:TRUE"
-"ProductVersion" = "8:11.23.7"
+"ProductVersion" = "8:11.23.8"
 "Manufacturer" = "8:MonetDB"
 "ARPHELPTELEPHONE" = "8:"
 "ARPHELPLINK" = "8:http://www.monetdb.org/";
diff --git a/NT/installer64/MonetDB5-Geom-Module.vdproj 
b/NT/installer64/MonetDB5-Geom-Module.vdproj
--- a/NT/installer64/MonetDB5-Geom-Module.vdproj
+++ b/NT/installer64/MonetDB5-Geom-Module.vdproj
@@ -439,7 +439,7 @@
 "RemovePreviousVersions" = "11:TRUE"
 "DetectNewerInstalledVersion" = "11:TRUE"
 "InstallAllUsers" = "11:TRUE"
-"ProductVersion" = "8:11.23.7"
+"ProductVersion" = "8:11.23.8"
 "Manufacturer" = "8:MonetDB"
 "ARPHELPTELEPHONE" = "8:"
 "ARPHELPLINK" = "8:http://www.monetdb.org/";
diff --git a/NT/installer64/MonetDB5-SQL-Installer.vdproj 
b/NT/installer64/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer64/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer64/MonetDB5-SQL-Installer.vdproj
@@ -4296,7 +4296,7 @@
 "RemovePreviousVersions" = "11:TRUE"
 "DetectNewerInstalledVersion" = "11:TRUE"
 "InstallAllUsers" = "11:TRUE"
-"ProductVersion" = "8:11.23.7"
+"ProductVersion" = "8:11.23.8"
 "Manufacturer" = "8:MonetDB"
 "ARPHELPTELEPHONE" = "8:"
 "ARPHELPLINK" = "8:http://www.monetdb.org/";
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -797,7 +797,7 @@
 #define MONETDB5_PASSWDHASH "SHA512"
 
 /* Release name or "unreleased" */
-#define MONETDB_RELEASE "Jun2016-SP1"
+#define MONETDB_RELEASE "unreleased"
 
 /* Define if the oid type should use 32 bits on a 64-bit architecture */
 /* #undef MONET_OID32 */
@@ -818,13 +818,13 @@
 #define PACKAGE_NAME "MonetDB"
 
 /* Define t

MonetDB: default - Merge with Jun2016 branch.

2016-07-13 Thread Sjoerd Mullender
Changeset: c2d2a09e82e6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c2d2a09e82e6
Modified Files:
.hgtags
MonetDB.spec
debian/changelog
java/ChangeLog-Archive
java/ChangeLog.Jun2016
java/Makefile.ag
java/build.properties
java/pom.xml
java/release.txt
libversions
Branch: default
Log Message:

Merge with Jun2016 branch.


diffs (247 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -629,3 +629,6 @@ 192e3168234a5f9f8a4d1c4ce17805f608f001c3
 b29fdfe9c590f674208212bf4ead617beef4b73c Jun2016_release
 4a05df3932a97865ac7e4037361723d5563490b3 Jun2016_5
 4a05df3932a97865ac7e4037361723d5563490b3 Jun2016_SP1_release
+c8b06c670a635978640d742643c317b82c5f4b8c Jun2016_7
+4a05df3932a97865ac7e4037361723d5563490b3 Jun2016_SP1_release
+c8b06c670a635978640d742643c317b82c5f4b8c Jun2016_SP1_release
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -962,6 +962,44 @@ rm -f %{buildroot}%{_bindir}/Maddlog
 %postun -p /sbin/ldconfig
 
 %changelog
+* Wed Jul 13 2016 Sjoerd Mullender  - 11.23.7-20160713
+- Rebuilt.
+- BZ#4014: KILL signal
+- BZ#4021: Analyze query does not escape input [security]
+- BZ#4026: JDBC driver incorrectly converts TINYINT fields to String
+  instead of an integer type.
+- BZ#4028: inputs not the same size
+- BZ#4032: no decimal places after update. ODBC driver
+- BZ#4035: SQL Function call bug
+- BZ#4036: Possible sql_catalog corruption due to unclean backuped tail
+
+* Thu Jul  7 2016 Martin van Dinther  
- 11.23.7-20160713
+- java: Corrected PROCEDURE_TYPE output value of method 
DatabaseMetaData.getProcedures().
+  It used to return procedureReturnsResult. Now it returns procedureNoResult.
+  Corrected ORDINAL_POSITION output value of method 
DatabaseMetaData.getProcedureColumns().
+  It used to start with 0, but as procedures do not return a result value it 
now
+  starts with 1 for all the procedure arguments, as defined by the JDBC API.
+- java: Improved output of method DatabaseMetaData.getProcedures(). The REMARKS
+  column now contains the procedure definition as stored in sys.functions.func.
+  The SPECIFIC_NAME column now contains the procedure unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the specific
+  overloaded procedure which has the same name, but different arguments.
+  Also improved output of method DatabaseMetaData.getProcedureColumns().
+  The SPECIFIC_NAME column now contains the procedure unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the proper
+  arguments of the specific overloaded procedure by matching the SPECIFIC_NAME
+  value.
+- java: Improved output of method DatabaseMetaData.getFunctions(). The REMARKS
+  column now contains the function definition as stored in sys.functions.func.
+  The SPECIFIC_NAME column now contains the function unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the specific
+  overloaded function which has the same name, but different arguments.
+  Also improved output of method DatabaseMetaData.getFunctionColumns().
+  The SPECIFIC_NAME column now contains the function unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the proper
+  arguments of the specific overloaded function by matching the SPECIFIC_NAME
+  value.
+
 * Mon Jul 04 2016 Sjoerd Mullender  - 11.23.5-20160704
 - Rebuilt.
 - BZ#4031: mclient doesn't accept - argument to refer to stdin
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,47 @@
+monetdb (11.23.7) unstable; urgency=low
+
+  * Rebuilt.
+  * BZ#4014: KILL signal
+  * BZ#4021: Analyze query does not escape input [security]
+  * BZ#4026: JDBC driver incorrectly converts TINYINT fields to String
+instead of an integer type.
+  * BZ#4028: inputs not the same size
+  * BZ#4032: no decimal places after update. ODBC driver
+  * BZ#4035: SQL Function call bug
+  * BZ#4036: Possible sql_catalog corruption due to unclean backuped tail
+
+ -- Sjoerd Mullender   Wed, 13 Jul 2016 14:33:03 +0200
+
+monetdb (11.23.7) unstable; urgency=low
+
+  * java: Corrected PROCEDURE_TYPE output value of method 
DatabaseMetaData.getProcedures().
+It used to return procedureReturnsResult. Now it returns procedureNoResult.
+Corrected ORDINAL_POSITION output value of method 
DatabaseMetaData.getProcedureColumns().
+It used to start with 0, but as procedures do not return a result value it 
now
+starts with 1 for all the procedure arguments, as defined by the JDBC API.
+  * java: Improved output of method DatabaseMetaData.getProcedures(). The 
REMARKS
+column now contains the procedure definition as stored in 
sys.functions.func.
+The SPECIFIC_NAME column now contains the procedure unique identifier as
+stored in sys.functions.id. This allows the caller to ret

MonetDB: Jun2016 - Moved contents of ChangeLog.Jun2016 to MonetD...

2016-07-13 Thread Sjoerd Mullender
Changeset: c8b06c670a63 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c8b06c670a63
Modified Files:
MonetDB.spec
debian/changelog
java/ChangeLog-Archive
java/ChangeLog.Jun2016
Branch: Jun2016
Log Message:

Moved contents of ChangeLog.Jun2016 to MonetDB.spec, debian/changelog and 
ChangeLog-Archive.


diffs (170 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1012,6 +1012,44 @@ rm -f %{buildroot}%{_bindir}/Maddlog
 %postun -p /sbin/ldconfig
 
 %changelog
+* Wed Jul 13 2016 Sjoerd Mullender  - 11.23.7-20160713
+- Rebuilt.
+- BZ#4014: KILL signal
+- BZ#4021: Analyze query does not escape input [security]
+- BZ#4026: JDBC driver incorrectly converts TINYINT fields to String
+  instead of an integer type.
+- BZ#4028: inputs not the same size
+- BZ#4032: no decimal places after update. ODBC driver
+- BZ#4035: SQL Function call bug
+- BZ#4036: Possible sql_catalog corruption due to unclean backuped tail
+
+* Thu Jul  7 2016 Martin van Dinther  
- 11.23.7-20160713
+- java: Corrected PROCEDURE_TYPE output value of method 
DatabaseMetaData.getProcedures().
+  It used to return procedureReturnsResult. Now it returns procedureNoResult.
+  Corrected ORDINAL_POSITION output value of method 
DatabaseMetaData.getProcedureColumns().
+  It used to start with 0, but as procedures do not return a result value it 
now
+  starts with 1 for all the procedure arguments, as defined by the JDBC API.
+- java: Improved output of method DatabaseMetaData.getProcedures(). The REMARKS
+  column now contains the procedure definition as stored in sys.functions.func.
+  The SPECIFIC_NAME column now contains the procedure unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the specific
+  overloaded procedure which has the same name, but different arguments.
+  Also improved output of method DatabaseMetaData.getProcedureColumns().
+  The SPECIFIC_NAME column now contains the procedure unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the proper
+  arguments of the specific overloaded procedure by matching the SPECIFIC_NAME
+  value.
+- java: Improved output of method DatabaseMetaData.getFunctions(). The REMARKS
+  column now contains the function definition as stored in sys.functions.func.
+  The SPECIFIC_NAME column now contains the function unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the specific
+  overloaded function which has the same name, but different arguments.
+  Also improved output of method DatabaseMetaData.getFunctionColumns().
+  The SPECIFIC_NAME column now contains the function unique identifier as
+  stored in sys.functions.id. This allows the caller to retrieve the proper
+  arguments of the specific overloaded function by matching the SPECIFIC_NAME
+  value.
+
 * Mon Jul 04 2016 Sjoerd Mullender  - 11.23.5-20160704
 - Rebuilt.
 - BZ#4031: mclient doesn't accept - argument to refer to stdin
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,47 @@
+monetdb (11.23.7) unstable; urgency=low
+
+  * Rebuilt.
+  * BZ#4014: KILL signal
+  * BZ#4021: Analyze query does not escape input [security]
+  * BZ#4026: JDBC driver incorrectly converts TINYINT fields to String
+instead of an integer type.
+  * BZ#4028: inputs not the same size
+  * BZ#4032: no decimal places after update. ODBC driver
+  * BZ#4035: SQL Function call bug
+  * BZ#4036: Possible sql_catalog corruption due to unclean backuped tail
+
+ -- Sjoerd Mullender   Wed, 13 Jul 2016 14:33:03 +0200
+
+monetdb (11.23.7) unstable; urgency=low
+
+  * java: Corrected PROCEDURE_TYPE output value of method 
DatabaseMetaData.getProcedures().
+It used to return procedureReturnsResult. Now it returns procedureNoResult.
+Corrected ORDINAL_POSITION output value of method 
DatabaseMetaData.getProcedureColumns().
+It used to start with 0, but as procedures do not return a result value it 
now
+starts with 1 for all the procedure arguments, as defined by the JDBC API.
+  * java: Improved output of method DatabaseMetaData.getProcedures(). The 
REMARKS
+column now contains the procedure definition as stored in 
sys.functions.func.
+The SPECIFIC_NAME column now contains the procedure unique identifier as
+stored in sys.functions.id. This allows the caller to retrieve the specific
+overloaded procedure which has the same name, but different arguments.
+Also improved output of method DatabaseMetaData.getProcedureColumns().
+The SPECIFIC_NAME column now contains the procedure unique identifier as
+stored in sys.functions.id. This allows the caller to retrieve the proper
+arguments of the specific overloaded procedure by matching the 
SPECIFIC_NAME
+value.
+  * java: Improved output of method DatabaseMetaData.getFunctions(). The 
REMARKS
+column now contains the fun

MonetDB: Jun2016 - Pre-release version number update.

2016-07-13 Thread Sjoerd Mullender
Changeset: 408354b196a5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=408354b196a5
Modified Files:
MonetDB.spec
NT/installer32/MonetDB-ODBC-Installer.vdproj
NT/installer32/MonetDB5-Geom-Module.vdproj
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer64/MonetDB-ODBC-Installer.vdproj
NT/installer64/MonetDB5-Geom-Module.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
clients/python2/setup.py
clients/python3/setup.py
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: Jun2016
Log Message:

Pre-release version number update.


diffs (truncated from 408 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1,5 +1,5 @@
 %define name MonetDB
-%define version 11.23.6
+%define version 11.23.7
 %{!?buildno: %global buildno %(date +%Y%m%d)}
 
 # groups of related archs
diff --git a/NT/installer32/MonetDB-ODBC-Installer.vdproj 
b/NT/installer32/MonetDB-ODBC-Installer.vdproj
--- a/NT/installer32/MonetDB-ODBC-Installer.vdproj
+++ b/NT/installer32/MonetDB-ODBC-Installer.vdproj
@@ -566,15 +566,15 @@
 {
 "Name" = "8:Microsoft Visual Studio"
 "ProductName" = "8:MonetDB ODBC Driver"
-"ProductCode" = "8:{1092A8DA-8849-46A3-AF75-09E9733C8526}"
-"PackageCode" = "8:{94806974-6CD4-4FDC-94D0-FFB1D1CD99C1}"
+"ProductCode" = "8:{E1E73511-1266-420E-B68B-92F99953163C}"
+"PackageCode" = "8:{DBC7A172-57AA-4D39-8330-AA82373729D7}"
 "UpgradeCode" = "8:{C1F69378-3F5C-4120-8224-32F07D3458F3}"
 "AspNetVersion" = "8:4.0.30319.0"
 "RestartWWWService" = "11:FALSE"
 "RemovePreviousVersions" = "11:TRUE"
 "DetectNewerInstalledVersion" = "11:TRUE"
 "InstallAllUsers" = "11:TRUE"
-"ProductVersion" = "8:11.23.6"
+"ProductVersion" = "8:11.23.7"
 "Manufacturer" = "8:MonetDB"
 "ARPHELPTELEPHONE" = "8:"
 "ARPHELPLINK" = "8:http://www.monetdb.org/";
diff --git a/NT/installer32/MonetDB5-Geom-Module.vdproj 
b/NT/installer32/MonetDB5-Geom-Module.vdproj
--- a/NT/installer32/MonetDB5-Geom-Module.vdproj
+++ b/NT/installer32/MonetDB5-Geom-Module.vdproj
@@ -431,15 +431,15 @@
 {
 "Name" = "8:Microsoft Visual Studio"
 "ProductName" = "8:MonetDB5 SQL GIS Module"
-"ProductCode" = "8:{54EE2F16-19DB-4457-87FC-6DA32FC9360E}"
-"PackageCode" = "8:{FEE67F99-E708-4469-8B9C-6DE5D489A7A7}"
+"ProductCode" = "8:{E5ED8353-83BD-4136-905E-E208FCB8D3CB}"
+"PackageCode" = "8:{C1DC053A-322D-449A-A84B-DA87B0EC7DDD}"
 "UpgradeCode" = "8:{92C89C36-0E86-45E1-B3D8-0D6C91108F30}"
 "AspNetVersion" = "8:4.0.30319.0"
 "RestartWWWService" = "11:FALSE"
 "RemovePreviousVersions" = "11:TRUE"
 "DetectNewerInstalledVersion" = "11:TRUE"
 "InstallAllUsers" = "11:TRUE"
-"ProductVersion" = "8:11.23.6"
+"ProductVersion" = "8:11.23.7"
 "Manufacturer" = "8:MonetDB"
 "ARPHELPTELEPHONE" = "8:"
 "ARPHELPLINK" = "8:http://www.monetdb.org/";
diff --git a/NT/installer32/MonetDB5-SQL-Installer.vdproj 
b/NT/installer32/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer32/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer32/MonetDB5-SQL-Installer.vdproj
@@ -4288,15 +4288,15 @@
 {
 "Name" = "8:Microsoft Visual Studio"
 "ProductName" = "8:MonetDB5"
-"ProductCode" = "8:{BD8979D8-5F3E-48A7-883E-A0DB2674657A}"
-"PackageCode" = "8:{4C7EADBF-F8E8-4C35-AF85-CEE04F8761BE}"
+"ProductCode" = "8:{F9304048-B8A6-40FF-BE45-A347BBC9DD13}"
+"PackageCode" = "8:{7609A7F1-8C4E-4A0C-A30E-51893D3505FB}"
 "UpgradeCode" = "8:{730C595B-DBA6-48D7-94B8-A98780AC92B6}"
 "AspNetVersion" = "8:4.0.30319.0"
 "RestartWWWService" = "11:FALSE"
 "RemovePreviousVersions" = "11:TRUE"
 "DetectNewerInstalledVersion" = "11:TRUE"
 "InstallAllUsers" = "11:TRUE"
-"ProductVersion" = "8:11.23.6"
+"ProductVersion" = "8:11.23.7"
 "Manufacturer" = "8:MonetDB"
 "ARPHELPTELEPHONE" = "8:"
 "ARPHELPLINK" = "8:http://www.monetdb.org/";
diff --git a/NT/installer64/MonetDB-ODBC-Installer.vdproj 
b/NT/installer64/MonetDB-ODBC-Installer.vdproj
--- a/NT/installer64/MonetDB-ODBC-Installer.vdproj
+++ b/NT/installer64/MonetDB-ODBC-Installer.vdproj
@@ -566,15 +566,15 @@
 {
 "Name" = "8:Microsoft Visual Studio"
 "ProductName" = "8:MonetDB ODBC Driver"
-"ProductCode" = "8:{FC52D9BA-EDD0-4010-B1F9-81D184FE9965}"
-"PackageCode" = "8:{25C270E4-A117-4A54-9FD1-97CBE3CB851B}"
+"ProductCode" = "8:{F2BB4CAA-2C24-4AC8-943D-4831089C4306}"
+"PackageCode"

MonetDB: Jun2016 - Updated library versions.

2016-07-13 Thread Sjoerd Mullender
Changeset: 05f728a877de for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=05f728a877de
Modified Files:
java/Makefile.ag
java/build.properties
java/pom.xml
java/release.txt
libversions
Branch: Jun2016
Log Message:

Updated library versions.


diffs (67 lines):

diff --git a/java/Makefile.ag b/java/Makefile.ag
--- a/java/Makefile.ag
+++ b/java/Makefile.ag
@@ -16,7 +16,7 @@ JAVA_HOME = @JAVA_HOME@
 ant_distjdbc = {
COND = HAVE_JAVAJDBC
DIR = datadir/monetdb/lib
-   FILES = monetdb-mcl-1.13.jar monetdb-jdbc-2.22.jar jdbcclient.jar
+   FILES = monetdb-mcl-1.13.jar monetdb-jdbc-2.23.jar jdbcclient.jar
 }
 
 ant_distmerocontrol = {
diff --git a/java/build.properties b/java/build.properties
--- a/java/build.properties
+++ b/java/build.properties
@@ -19,7 +19,7 @@ MCL_MINOR=13
 # major release number
 JDBC_MAJOR=2
 # minor release number
-JDBC_MINOR=22
+JDBC_MINOR=23
 # an additional identifying string
 JDBC_VER_SUFFIX=Liberica
 # the default port to connect on, if no port given when using SQL
diff --git a/java/pom.xml b/java/pom.xml
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -6,7 +6,7 @@
 
monetdb
monetdb-jdbc
-   2.22
+   2.23
${project.groupId}:${project.artifactId}
MonetDB JDBC driver
https://www.monetdb.org
diff --git a/java/release.txt b/java/release.txt
--- a/java/release.txt
+++ b/java/release.txt
@@ -1,6 +1,6 @@
 RELEASE NOTES
-MonetDB JDBC driver version 2.22 (Liberica/MCL-1.13)
-Release date: 2016-07-04
+MonetDB JDBC driver version 2.23 (Liberica/MCL-1.13)
+Release date: 2016-07-13
 
 This JDBC driver is designed for use with MonetDB, a main-memory
 database.  For more information see https://www.monetdb.org/.
diff --git a/libversions b/libversions
--- a/libversions
+++ b/libversions
@@ -36,13 +36,13 @@
 
 # version of the GDK library (subdirectory gdk; also includes
 # common/options and common/utils)
-GDK_VERSION=13:2:0
+GDK_VERSION=13:3:0
 
 # version of the MAPI library (subdirectory clients/mapilib)
 MAPI_VERSION=8:0:0
 
 # version of the MONETDB5 library (subdirectory monetdb5, not including extras)
-MONETDB5_VERSION=21:2:0
+MONETDB5_VERSION=21:3:0
 
 # version of the STREAM library (subdirectory common/stream)
 STREAM_VERSION=8:1:0
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Jun2016 branch, not changing any f...

2016-07-13 Thread Sjoerd Mullender
Changeset: ee9e0c2372f7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ee9e0c2372f7
Modified Files:
MonetDB.spec
NT/installer32/MonetDB-ODBC-Installer.vdproj
NT/installer32/MonetDB5-Geom-Module.vdproj
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer64/MonetDB-ODBC-Installer.vdproj
NT/installer64/MonetDB5-Geom-Module.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: default
Log Message:

Merge with Jun2016 branch, not changing any files.

___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - approved output

2016-07-13 Thread Niels Nes
Changeset: 38f2d94dc884 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=38f2d94dc884
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
Branch: default
Log Message:

approved output


diffs (90 lines):

diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -23926,34 +23926,18 @@ command bat.mirror(b:bat[:any_2]):bat[:o
 address BKCmirror;
 comment Returns the head-mirror image of a BAT (two head columns).
 
-pattern bat.new_persistent(ht:oid,tt:any_1,size:lng):bat[:any_1] 
-address CMDBATnew_persistent;
-comment Creates a new BAT in the persistent farm and allocate space.
-
-pattern bat.new_persistent(ht:oid,tt:any_1,size:int):bat[:any_1] 
-address CMDBATnew_persistent;
-pattern bat.new_persistent(ht:oid,tt:any_1):bat[:any_1] 
-address CMDBATnew_persistent;
-comment Creates a new empty transient BAT in the persistent farm, with head- 
and tail-types as indicated.
-
-pattern bat.new(ht:oid,tt:any_1,size:lng):bat[:any_1] 
+pattern bat.new(tt:any_1,size:lng):bat[:any_1] 
 address CMDBATnew;
-comment Creates a new BAT with sufficient space.
-
-pattern bat.new(ht:oid,tt:any_1,size:int):bat[:any_1] 
+comment Creates a new empty transient BAT, with tail-types as indicated.
+
+pattern bat.new(tt:any_1,size:int,persist:bit):bat[:any_1] 
 address CMDBATnew;
-pattern bat.new(ht:oid,tt:any_1):bat[:any_1] 
+pattern bat.new(tt:any_1,size:lng,persist:bit):bat[:any_1] 
 address CMDBATnew;
-comment Creates a new empty transient BAT, with head- and tail-types as 
indicated.
-
-pattern bat.new(tt:any_1,size:lng):bat[:any_1] 
-address CMDBATnewColumn;
-comment Creates a new empty transient BAT, with tail-types as indicated.
-
 pattern bat.new(tt:any_1,size:int):bat[:any_1] 
-address CMDBATnewColumn;
+address CMDBATnew;
 pattern bat.new(tt:any_1):bat[:any_1] 
-address CMDBATnewColumn;
+address CMDBATnew;
 pattern bat.orderidx(bv:bat[:any_1],l:bat[:any_1]...):void 
 address OIDXmerge;
 comment Consolidates the OID index arrangement
diff --git a/clients/Tests/MAL-signatures.stable.out.int128 
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -31785,34 +31785,18 @@ command bat.mirror(b:bat[:any_2]):bat[:o
 address BKCmirror;
 comment Returns the head-mirror image of a BAT (two head columns).
 
-pattern bat.new_persistent(ht:oid,tt:any_1,size:lng):bat[:any_1] 
-address CMDBATnew_persistent;
-comment Creates a new BAT in the persistent farm and allocate space.
-
-pattern bat.new_persistent(ht:oid,tt:any_1,size:int):bat[:any_1] 
-address CMDBATnew_persistent;
-pattern bat.new_persistent(ht:oid,tt:any_1):bat[:any_1] 
-address CMDBATnew_persistent;
-comment Creates a new empty transient BAT in the persistent farm, with head- 
and tail-types as indicated.
-
-pattern bat.new(ht:oid,tt:any_1,size:lng):bat[:any_1] 
+pattern bat.new(tt:any_1,size:lng):bat[:any_1] 
 address CMDBATnew;
-comment Creates a new BAT with sufficient space.
-
-pattern bat.new(ht:oid,tt:any_1,size:int):bat[:any_1] 
+comment Creates a new empty transient BAT, with tail-types as indicated.
+
+pattern bat.new(tt:any_1,size:int,persist:bit):bat[:any_1] 
 address CMDBATnew;
-pattern bat.new(ht:oid,tt:any_1):bat[:any_1] 
+pattern bat.new(tt:any_1,size:lng,persist:bit):bat[:any_1] 
 address CMDBATnew;
-comment Creates a new empty transient BAT, with head- and tail-types as 
indicated.
-
-pattern bat.new(tt:any_1,size:lng):bat[:any_1] 
-address CMDBATnewColumn;
-comment Creates a new empty transient BAT, with tail-types as indicated.
-
 pattern bat.new(tt:any_1,size:int):bat[:any_1] 
-address CMDBATnewColumn;
+address CMDBATnew;
 pattern bat.new(tt:any_1):bat[:any_1] 
-address CMDBATnewColumn;
+address CMDBATnew;
 pattern bat.orderidx(bv:bat[:any_1],l:bat[:any_1]...):void 
 address OIDXmerge;
 comment Consolidates the OID index arrangement
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: sfcgal - Start the implementation of sub functions to b...

2016-07-13 Thread Romulo Goncalves
Changeset: 3edb154ecc00 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3edb154ecc00
Modified Files:
geom/monetdb5/geom.c
geom/monetdb5/geom.h
geom/monetdb5/geom.mal
Branch: sfcgal
Log Message:

Start the implementation of sub functions to be used in spatial aggregations. 
subCollect is the first one. It uses the generic function BATgroupWKBWKBtoWKB, 
to each you pass the CollectAppend (starts with empty collection for each group 
and then it adds geoms to the Collection as it walks over b). It works similar 
to aggr.sum operator.


diffs (truncated from 468 to 300 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -403,7 +403,7 @@ wkbTransform(wkb **transformedWKB, wkb *
(void) srid_dst;
(void) proj4_src_str;
(void) proj4_dst_str;
-   throw(MAL, "geom.Transform", "Function Not Implemented");
+   throw(MAL, "geom.Transform", "Function Not Implemented because proj4 is 
not available.");
 #else
projPJ proj4_src, proj4_dst;
GEOSGeom geosGeometry, transformedGeosGeometry;
@@ -4885,6 +4885,387 @@ wkbCollectCascade(wkb **outWKB, bat *inB
return MAL_SUCCEED;
 }
 
+static str wkbCollectAppend(wkb **out, wkb **geom1WKB, wkb **geom2WKB);
+
+static str
+BATgroupWKBWKBtoWKB(bat *outBAT_id, BAT *b, BAT *g, BAT *e, int skip_nils, oid 
min, oid max, BUN ngrp, BUN start, BUN end, wkb **empty_geoms, str (*func) (wkb 
**, wkb **, wkb**), const char* name)
+{
+BAT *outBAT = NULL;
+BATiter bBAT_iter;
+BUN nils = 0;
+str err, msg;
+int nonil, i = 0, j = 0;
+wkb **aWKBs = NULL, **outWKBs = NULL, **grpWKBs = NULL;
+   const oid *restrict gids;
+wkb *bWKB = NULL;
+int gid;
+
+if (g == NULL) {
+throw(MAL, "BATgroup%s: b and g must be aligned\n", name);
+}
+
+if (BATcount(b) == 0 || ngrp == 0) {
+/* trivial: no collects, so return bat aligned with g with
+ *  * nil in the tail */
+outBAT = BATconstant(ngrp == 0 ? 0 : min, ATOMindex("wkb"), 
ATOMnilptr(ATOMindex("wkb")), ngrp, TRANSIENT);
+*outBAT_id = outBAT->batCacheid;
+return MAL_SUCCEED;
+}
+
+outBAT = COLnew(min, ATOMindex("wkb"), ngrp, TRANSIENT);
+if (outBAT == NULL) {
+*outBAT_id = bat_nil;
+throw(MAL, "geom.", name, MAL_MALLOC_FAIL);
+}
+
+if (BATtdense(g))
+gids = NULL;
+else
+gids = (const oid *) Tloc(g, BUNfirst(g) + start);
+
+/*Allocate structures*/
+if ((aWKBs = (wkb **) GDKzalloc(sizeof(wkb*)*ngrp)) == NULL) {
+BBPunfix(outBAT->batCacheid);
+*outBAT_id = bat_nil;
+throw(MAL, "geom.", name, MAL_MALLOC_FAIL);
+}
+if ((outWKBs = (wkb **) GDKzalloc(sizeof(wkb*)*ngrp)) == NULL) {
+GDKfree(aWKBs);
+BBPunfix(outBAT->batCacheid);
+*outBAT_id = bat_nil;
+throw(MAL, "geom.", name, MAL_MALLOC_FAIL);
+}
+if ((grpWKBs = (wkb **) GDKzalloc(sizeof(wkb*)*ngrp)) == NULL) {
+GDKfree(aWKBs);
+GDKfree(outWKBs);
+BBPunfix(outBAT->batCacheid);
+*outBAT_id = bat_nil;
+throw(MAL, "geom.", name, MAL_MALLOC_FAIL);
+}
+
+bBAT_iter = bat_iterator(b);
+nonil = b->tnonil;
+if (ngrp == 1) {
+/* single group, no candidate list */
+ALGODEBUG fprintf(stderr,
+"#%s: no candidates, no groups; "
+"start " BUNFMT ", end " BUNFMT
+", nonil = %d\n",
+name, start, end, nonil);
+if (nonil) {
+aWKBs[0] = empty_geoms[0];
+
+// add one more segment for each following row
+for (i = start; i < end; i++) {
+bWKB = (wkb *) BUNtail(bBAT_iter, i);
+outWKBs[0] = NULL;
+
+if ( (err = (*func)(&outWKBs[0], &aWKBs[0], &bWKB)) != 
MAL_SUCCEED )
+break;
+else
+*aWKBs[0] = *outWKBs[0];
+}
+} else {
+nils = 1;
+aWKBs[0] = empty_geoms[0];
+
+for (i = start; i < end && nils == 0; i++) {
+bWKB = (wkb *) BUNtail(bBAT_iter, i);
+
+if (wkb_isnil(bWKB)) {
+if (!skip_nils) {
+if ((outWKBs[0] = wkbNULLcopy()) == NULL) {
+GDKfree(aWKBs);
+GDKfree(outWKBs);
+GDKfree(grpWKBs);
+BBPunfix(outBAT->batCacheid);
+outBAT = NULL;
+throw(MAL, "geom.", name, MAL_MALLOC_FAIL);
+}
+nils = 1;
+}
+} else {
+if ( (err = (*func) (&outWKBs[0], &aWKBs[0], &bWKB)) != 
MAL_SUCCEED )
+break;
+else
+aWKBs[0] =

MonetDB: sfcgal - Add WKBWKBtoWKB_bat function which be used by ...

2016-07-13 Thread Romulo Goncalves
Changeset: ee4c035cf1a7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ee4c035cf1a7
Modified Files:
geom/monetdb5/geomBulk.c
Branch: sfcgal
Log Message:

Add WKBWKBtoWKB_bat function which be used by wkbMakeLine_bat, wkbUnion_bat and 
wkbCollect_bat without code redundancy


diffs (122 lines):

diff --git a/geom/monetdb5/geomBulk.c b/geom/monetdb5/geomBulk.c
--- a/geom/monetdb5/geomBulk.c
+++ b/geom/monetdb5/geomBulk.c
@@ -783,6 +783,102 @@ wkbIntersects_bat(bat *outBAT_id, bat *a
return WKBWKBtoBIT_bat(outBAT_id, aBAT_id, bBAT_id, wkbIntersects, 
"batgeom.wkbIntersects");
 }
 
+/***/
+/ IN: wkb wkb - OUT: wkb ***/
+/***/
+
+static str
+WKBWKBtoWKB_bat(bat *outBAT_id, bat *aBAT_id, bat *bBAT_id, str (*func) (wkb 
**, wkb **, wkb **), const char *name)
+{
+   BAT *outBAT = NULL, *aBAT = NULL, *bBAT = NULL;
+   BUN p = 0, q = 0;
+   BATiter aBAT_iter, bBAT_iter;
+   str msg = MAL_SUCCEED;
+#ifdef GEOMBULK_DEBUG
+static struct timeval start, stop;
+unsigned long long t;
+#endif
+bit *outs = NULL;
+
+   //get the descriptor of the BAT
+   if ((aBAT = BATdescriptor(*aBAT_id)) == NULL) {
+   throw(MAL, name, RUNTIME_OBJECT_MISSING);
+   }
+   if ((bBAT = BATdescriptor(*bBAT_id)) == NULL) {
+   BBPunfix(aBAT->batCacheid);
+   throw(MAL, name, RUNTIME_OBJECT_MISSING);
+   }
+
+   //create a new for the output BAT
+   if ((outBAT = COLnew(aBAT->hseqbase, ATOMindex("wkb"), BATcount(aBAT), 
TRANSIENT)) == NULL) {
+   BBPunfix(aBAT->batCacheid);
+   BBPunfix(bBAT->batCacheid);
+   throw(MAL, name, MAL_MALLOC_FAIL);
+   }
+
+   //iterator over the input BAT
+   aBAT_iter = bat_iterator(aBAT);
+   bBAT_iter = bat_iterator(bBAT);
+
+omp_set_dynamic(OPENCL_DYNAMIC); // Explicitly disable dynamic teams
+omp_set_num_threads(OPENCL_THREADS);
+
+q = BUNlast(aBAT);
+#ifdef GEOMBULK_DEBUG
+fprintf(stdout, "%s %d %d\n", name, p, q);
+gettimeofday(&start, NULL);
+#endif
+   outs = (bit *) Tloc(outBAT, 0);
+#pragma omp parallel for
+for (p = 0; p < q; p++) {
+wkb *aWKB = NULL, *bWKB = NULL, *outWKB = NULL;
+str err = NULL;
+
+aWKB = (wkb *) BUNtail(aBAT_iter, p);
+bWKB = (wkb *) BUNtail(bBAT_iter, p);
+if ((err = (*func) (&outWKB, &aWKB, &bWKB)) != MAL_SUCCEED) {
+msg = err;
+#pragma omp cancelregion
+}
+BUNappend(outBAT, &outWKB, TRUE);  //add the result to the new BAT
+}
+#ifdef GEOMBULK_DEBUG
+gettimeofday(&stop, NULL);
+t = 1000 * (stop.tv_sec - start.tv_sec) + (stop.tv_usec - start.tv_usec) / 
1000;
+fprintf(stdout, "%s %llu ms\n", name, t);
+#endif
+
+BBPunfix(aBAT->batCacheid);
+BBPunfix(bBAT->batCacheid);
+
+if (msg != MAL_SUCCEED) {
+BBPunfix(outBAT->batCacheid);
+return msg;
+}
+
+   BBPkeepref(*outBAT_id = outBAT->batCacheid);
+
+   return MAL_SUCCEED;
+}
+
+str
+wkbMakeLine_bat(bat *outBAT_id, bat *aBAT_id, bat *bBAT_id)
+{
+   return WKBWKBtoWKB_bat(outBAT_id, aBAT_id, bBAT_id, wkbMakeLine, 
"batgeom.wkbMakeLine");
+}
+
+str
+wkbUnion_bat(bat *outBAT_id, bat *aBAT_id, bat *bBAT_id)
+{
+   return WKBWKBtoWKB_bat(outBAT_id, aBAT_id, bBAT_id, wkbUnion, 
"batgeom.wkbUnion");
+}
+
+str
+wkbCollect_bat(bat *outBAT_id, bat *aBAT_id, bat *bBAT_id)
+{
+   return WKBWKBtoWKB_bat(outBAT_id, aBAT_id, bBAT_id, wkbCollect, 
"batgeom.wkbCollect");
+}
+
 
/**/
 /* IN: wkb dbl dbl dbl - OUT: bit - SRID 
**/
 
/**/
@@ -2135,6 +2231,7 @@ wkbCoordinateFromWKB_bat(bat *outBAT_id,
return wkbCoordinateFromMBR_bat(outBAT_id, &inBAT_mbr_id, 
coordinateIdx);
 }
 
+/*
 str
 wkbMakeLine_bat(bat *outBAT_id, bat *aBAT_id, bat *bBAT_id)
 {
@@ -2248,6 +2345,7 @@ wkbUnion_bat(bat *outBAT_id, bat *aBAT_i
 
return MAL_SUCCEED;
 }
+*/
 
 /* sets the srid of the geometry - BULK version*/
 str
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - approved output

2016-07-13 Thread Niels Nes
Changeset: 94e3b1a21a8d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=94e3b1a21a8d
Modified Files:
monetdb5/optimizer/opt_mergetable.c

sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
sql/test/bugs/Tests/select_select_bug.stable.out
sql/test/mergetables/Tests/part-elim.stable.out
Branch: default
Log Message:

approved output


diffs (113 lines):

diff --git a/monetdb5/optimizer/opt_mergetable.c 
b/monetdb5/optimizer/opt_mergetable.c
--- a/monetdb5/optimizer/opt_mergetable.c
+++ b/monetdb5/optimizer/opt_mergetable.c
@@ -1859,7 +1859,8 @@ cleanup:
 }
 /* keep all actions taken as a post block comment */
 snprintf(buf,256,"%-20s actions=%2d time=" LLFMT " 
usec","mergetable",actions,GDKusec() - usec);
-newComment(mb,buf);
+if ( mb->errors == 0) 
+newComment(mb,buf);
 
return actions;
 }
diff --git 
a/sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
 
b/sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
--- 
a/sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
+++ 
b/sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
@@ -22,7 +22,7 @@ Ready.
 
 #debug select * from tables;
 mdb>#X_1=0@0:void := user.s1_1();
-mdb>#X_159=0@0:void := querylog.define("debug select * from 
tables;","default_pipe",631);
+mdb>#X_159=0@0:void := querylog.define("debug select * from 
tables;","default_pipe",375);
 
 # 16:24:01 >  
 # 16:24:01 >  "Done."
diff --git a/sql/test/bugs/Tests/select_select_bug.stable.out 
b/sql/test/bugs/Tests/select_select_bug.stable.out
--- a/sql/test/bugs/Tests/select_select_bug.stable.out
+++ b/sql/test/bugs/Tests/select_select_bug.stable.out
@@ -29,7 +29,7 @@ Ready.
 #SELECT (SELECT current_timestamp), count(DISTINCT mmsi) FROM vessels;
 % .L1, sys.L2 # table_name
 % L1,  L2 # name
-% tinyint, wrd # type
+% tinyint, bigint # type
 % 1,   1 # length
 [ 1,   0   ]
 #drop table vessels;
diff --git a/sql/test/mergetables/Tests/part-elim.stable.out 
b/sql/test/mergetables/Tests/part-elim.stable.out
--- a/sql/test/mergetables/Tests/part-elim.stable.out
+++ b/sql/test/mergetables/Tests/part-elim.stable.out
@@ -79,6 +79,72 @@ project (
 | | table(sys.mt2) [ test.id, test.posx, test.%TID% NOT NULL ] COUNT 
 | ) [ bigint "1" <= test.id <= bigint "1000" ]
 ) [ test.id, test.posx ]
+#declare l integer;
+#set l = 1;
+#declare h integer;
+#set h = 1;
+#plan select * from test where id between l and h;
+% .plan # table_name
+% rel # name
+% clob # type
+% 106 # length
+union (
+| project (
+| | select (
+| | | table(sys.mt1) [ mt1.id as test.id, mt1.posx as test.posx, mt1.%TID% NOT 
NULL as test.%TID% ] COUNT 
+| | ) [ bigint[l] <= test.id <= bigint[h] ]
+| ) [ test.id, test.posx ],
+| project (
+| | select (
+| | | table(sys.mt2) [ mt2.id as test.id, mt2.posx as test.posx, mt2.%TID% NOT 
NULL as test.%TID% ] COUNT 
+| | ) [ bigint[l] <= test.id <= bigint[h] ]
+| ) [ test.id, test.posx ]
+) [ test.id, test.posx ]
+#set h = 1000;
+#plan select * from test where id between l and h;
+% .plan # table_name
+% rel # name
+% clob # type
+% 69 # length
+project (
+| select (
+| | table(sys.mt2) [ test.id, test.posx, test.%TID% NOT NULL ] COUNT 
+| ) [ bigint[l] <= test.id <= bigint[h] ]
+) [ test.id, test.posx ]
+#plan select * from test where id between 1 and 1000*10;
+% .plan # table_name
+% rel # name
+% clob # type
+% 106 # length
+union (
+| project (
+| | select (
+| | | table(sys.mt1) [ mt1.id as test.id, mt1.posx as test.posx, mt1.%TID% NOT 
NULL as test.%TID% ] COUNT 
+| | ) [ bigint "1" <= test.id <= bigint[sys.sql_mul(smallint "1000", tinyint 
"10")] ]
+| ) [ test.id, test.posx ],
+| project (
+| | select (
+| | | table(sys.mt2) [ mt2.id as test.id, mt2.posx as test.posx, mt2.%TID% NOT 
NULL as test.%TID% ] COUNT 
+| | ) [ bigint "1" <= test.id <= bigint[sys.sql_mul(smallint "1000", tinyint 
"10")] ]
+| ) [ test.id, test.posx ]
+) [ test.id, test.posx ]
+#plan select * from test where id between 1 and 100*10;
+% .plan # table_name
+% rel # name
+% clob # type
+% 106 # length
+union (
+| project (
+| | select (
+| | | table(sys.mt1) [ mt1.id as test.id, mt1.posx as test.posx, mt1.%TID% NOT 
NULL as test.%TID% ] COUNT 
+| | ) [ bigint "1" <= test.id <= bigint[sys.sql_mul(smallint "100", tinyint 
"10")] ]
+| ) [ test.id, test.posx ],
+| project (
+| | select (
+| | | table(sys.mt2) [ mt2.id as test.id, mt2.posx as test.posx, mt2.%TID% NOT 
NULL as test.%TID% ] COUNT 
+| | ) [ bigint "1" <= test.id <= bigint[sys.sql_mul(smallint "100", tinyint 
"10")] ]
+| ) [ test.id, test.posx ]
+) [ test.id, test.posx ]
 #drop table test;
 #drop table mt1;
 #drop table mt2;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - push a topn under a union

2016-07-13 Thread Niels Nes
Changeset: e4a0efd1b334 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e4a0efd1b334
Modified Files:
sql/server/rel_optimizer.c
Branch: default
Log Message:

push a topn under a union


diffs (36 lines):

diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -1847,6 +1847,32 @@ rel_push_topn_down(int *changes, mvc *sq
 
if (r && r->op == op_project && need_distinct(r)) 
return rel;
+   /* duplicate topn direct under union */
+
+   if (r && r->exps && r->op == op_union && !(rel_is_ref(r)) && 
r->l) {
+   sql_rel *u = r, *x;
+   sql_rel *ul = u->l;
+   sql_rel *ur = u->r;
+
+   /* only push topn once */
+   x = ul;
+   while(x->op == op_project && x->l)
+   x = x->l;
+   if (x && x->op == op_topn)
+   return rel;
+   x = ur;
+   while(x->op == op_project && x->l)
+   x = x->l;
+   if (x && x->op == op_topn)
+   return rel;
+
+   ul = rel_topn(sql->sa, ul, sum_limit_offset(sql, 
rel->exps));
+   ur = rel_topn(sql->sa, ur, sum_limit_offset(sql, 
rel->exps));
+   u->l = ul;
+   u->r = ur;
+   (*changes)++;
+   return rel;
+   }
/* duplicate topn + [ project-order ] under union */
if (r)
rp = r->l;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: jit - Merge default

2016-07-13 Thread Martin Kersten
Changeset: 52e99902451a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=52e99902451a
Added Files:
sql/test/BugTracker-2016/Tests/nested-mal-with-multiplex.Bug-4035.sql

sql/test/BugTracker-2016/Tests/nested-mal-with-multiplex.Bug-4035.stable.err

sql/test/BugTracker-2016/Tests/nested-mal-with-multiplex.Bug-4035.stable.out
Modified Files:
monetdb5/mal/mal_builder.c
monetdb5/mal/mal_resolve.c
monetdb5/modules/atoms/batxml.c
monetdb5/modules/atoms/blob.c
monetdb5/modules/atoms/blob.h
monetdb5/modules/atoms/color.h
monetdb5/modules/atoms/identifier.c
monetdb5/modules/atoms/inet.c
monetdb5/modules/atoms/json.h
monetdb5/modules/atoms/mcurl.c
monetdb5/modules/atoms/mtime.h
monetdb5/modules/atoms/str.h
monetdb5/modules/atoms/streams.h
monetdb5/modules/atoms/url.c
monetdb5/modules/atoms/url.h
monetdb5/modules/atoms/uuid.c
monetdb5/modules/atoms/xml.h
monetdb5/modules/kernel/aggr.c
monetdb5/modules/kernel/alarm.c
monetdb5/modules/kernel/algebra.h
monetdb5/modules/kernel/bat5.h
monetdb5/modules/kernel/batcolor.h
monetdb5/modules/kernel/batmmath.h
monetdb5/modules/kernel/batstr.c
monetdb5/modules/kernel/group.h
monetdb5/modules/kernel/logger.c
monetdb5/modules/kernel/microbenchmark.h
monetdb5/modules/kernel/mmath.h
monetdb5/modules/kernel/status.h
monetdb5/modules/mal/batExtensions.h
monetdb5/modules/mal/batcalc.c
monetdb5/modules/mal/bbp.h
monetdb5/modules/mal/calc.c
monetdb5/modules/mal/clients.h
monetdb5/modules/mal/factories.h
monetdb5/modules/mal/groupby.h
monetdb5/modules/mal/inspect.h
monetdb5/modules/mal/iterator.h
monetdb5/modules/mal/json_util.h
monetdb5/modules/mal/language.h
monetdb5/modules/mal/mal_io.h
monetdb5/modules/mal/mal_mapi.h
monetdb5/modules/mal/manifold.h
monetdb5/modules/mal/manual.h
monetdb5/modules/mal/mat.h
monetdb5/modules/mal/mdb.h
monetdb5/modules/mal/mkey.h
monetdb5/modules/mal/pcre.c
monetdb5/modules/mal/profiler.h
monetdb5/modules/mal/projectionpath.h
monetdb5/modules/mal/querylog.h
monetdb5/modules/mal/recycle.h
monetdb5/modules/mal/remote.h
monetdb5/modules/mal/sabaoth.h
monetdb5/modules/mal/sample.h
monetdb5/modules/mal/sysmon.h
monetdb5/modules/mal/tablet.h
monetdb5/modules/mal/tokenizer.h
monetdb5/modules/mal/transaction.c
monetdb5/modules/mal/txtsim.h
monetdb5/modules/mal/zorder.h
monetdb5/optimizer/opt_aliases.h
monetdb5/optimizer/opt_candidates.h
monetdb5/optimizer/opt_coercion.h
monetdb5/optimizer/opt_commonTerms.h
monetdb5/optimizer/opt_constants.h
monetdb5/optimizer/opt_costModel.h
monetdb5/optimizer/opt_dataflow.h
monetdb5/optimizer/opt_deadcode.h
monetdb5/optimizer/opt_emptycolumn.h
monetdb5/optimizer/opt_evaluate.h
monetdb5/optimizer/opt_factorize.h
monetdb5/optimizer/opt_garbageCollector.h
monetdb5/optimizer/opt_generator.h
monetdb5/optimizer/opt_inline.h
monetdb5/optimizer/opt_json.h
monetdb5/optimizer/opt_macro.h
monetdb5/optimizer/opt_matpack.h
monetdb5/optimizer/opt_mergetable.c
monetdb5/optimizer/opt_mergetable.h
monetdb5/optimizer/opt_mitosis.h
monetdb5/optimizer/opt_multiplex.h
monetdb5/optimizer/opt_pipes.h
monetdb5/optimizer/opt_prelude.h
monetdb5/optimizer/opt_profiler.h
monetdb5/optimizer/opt_projectionpath.h
monetdb5/optimizer/opt_pushselect.c
monetdb5/optimizer/opt_pushselect.h
monetdb5/optimizer/opt_querylog.h
monetdb5/optimizer/opt_recycler.h
monetdb5/optimizer/opt_reduce.h
monetdb5/optimizer/opt_remap.h
monetdb5/optimizer/opt_remoteQueries.h
monetdb5/optimizer/opt_reorder.h
monetdb5/optimizer/opt_statistics.h
monetdb5/optimizer/opt_support.h
monetdb5/optimizer/opt_volcano.h
monetdb5/optimizer/opt_wrapper.c
monetdb5/optimizer/optimizer.h
monetdb5/scheduler/run_adder.h
monetdb5/scheduler/run_isolate.h
monetdb5/scheduler/run_memo.h
monetdb5/scheduler/run_pipeline.h
monetdb5/scheduler/srvpool.h
sql/backends/monet5/sql_execute.c
sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128
sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.py
sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out
sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single
sql/test/BugTracker-2016/Tests/All
sql/test/bug

MonetDB: default - merged with jun2016

2016-07-13 Thread Niels Nes
Changeset: 39ca098a4c1c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=39ca098a4c1c
Modified Files:
monetdb5/mal/mal_builder.c
monetdb5/optimizer/opt_mergetable.c
monetdb5/optimizer/opt_pushselect.c
sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128
sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.py
sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out
sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single
sql/test/bugs/Tests/select_select_bug.stable.out
Branch: default
Log Message:

merged with jun2016


diffs (196 lines):

diff --git a/monetdb5/mal/mal_builder.c b/monetdb5/mal/mal_builder.c
--- a/monetdb5/mal/mal_builder.c
+++ b/monetdb5/mal/mal_builder.c
@@ -96,7 +96,7 @@ newFcnCall(MalBlkPtr mb, char *mod, char
 InstrPtr
 newComment(MalBlkPtr mb, const char *val)
 {
-   InstrPtr q = newInstruction(NULL,REMsymbol);
+   InstrPtr q = newInstruction(mb, REMsymbol);
ValRecord cst;
 
if (q == NULL)
diff --git a/monetdb5/optimizer/opt_mergetable.c 
b/monetdb5/optimizer/opt_mergetable.c
--- a/monetdb5/optimizer/opt_mergetable.c
+++ b/monetdb5/optimizer/opt_mergetable.c
@@ -238,8 +238,9 @@ mat_set_prop(matlist_t *ml, MalBlkPtr mb
 static InstrPtr
 mat_delta(matlist_t *ml, MalBlkPtr mb, InstrPtr p, mat_t *mat, int m, int n, 
int o, int e, int mvar, int nvar, int ovar, int evar)
 {
-   int tpe, k, j, is_subdelta = (getFunctionId(p) == subdeltaRef);
+   int tpe, k, j, is_subdelta = (getFunctionId(p) == subdeltaRef), 
is_projectdelta = (getFunctionId(p) == projectdeltaRef);
InstrPtr r = NULL;
+   int pushed = 0;
 
//printf("# %s.%s(%d,%d,%d,%d)", getModuleId(p), getFunctionId(p), m, 
n, o, e);
 
@@ -303,7 +304,24 @@ mat_delta(matlist_t *ml, MalBlkPtr mb, I
setPartnr(ml, is_subdelta?getArg(mat[m].mi, k):-1, 
getArg(q,0), k);
r = pushArgument(mb, r, getArg(q, 0));
}
+   if (evar == 1 && e >= 0 && mat[e].type == mat_slc && 
is_projectdelta) {
+   InstrPtr q = newInstruction(mb, ASSIGNsymbol);
+
+   setModuleId(q, algebraRef);
+   setFunctionId(q, projectionRef);
+   getArg(q, 0) = getArg(r, 0);
+   q = pushArgument(mb, q, getArg(mat[e].mi, 0));
+   getArg(r, 0) = newTmpVariable(mb, tpe);
+   q = pushArgument(mb, q, getArg(r, 0));
+   pushInstruction(mb, r);
+   pushInstruction(mb, q);
+   pushed = 1;
+   r = q;
+   }
}
+   mat_add_var(ml, r, NULL, getArg(r, 0), mat_type(mat, m),  -1, -1, 
pushed);
+   if (pushed)
+   mat[ml->top-1].packed = 1;
return r;
 }
 
@@ -1426,6 +1444,7 @@ mat_topn(MalBlkPtr mb, InstrPtr p, matli
pushInstruction(mb,r);
 
q = copyInstruction(p);
+   setFunctionId(q, subsliceRef);
if (ml->v[m].type != mat_tpn || is_slice) 
getArg(q,1) = getArg(r,0);
pushInstruction(mb,q);
@@ -1731,8 +1750,8 @@ OPTmergetableImplementation(Client cntxt
   (n=is_a_mat(getArg(p,fn), &ml)) >= 0 &&
   (o=is_a_mat(getArg(p,fo), &ml)) >= 0){
if ((r = mat_delta(&ml, mb, p, ml.v, m, n, o, -1, fm, 
fn, fo, 0)) != NULL)
-   mat_add(&ml, r, mat_type(ml.v, m), 
getFunctionId(p));
-   actions++;
+   actions++;
+
continue;
}
if (match == 4 && bats == 5 && isDelta(p) && 
@@ -1741,8 +1760,7 @@ OPTmergetableImplementation(Client cntxt
   (o=is_a_mat(getArg(p,fo), &ml)) >= 0 &&
   (e=is_a_mat(getArg(p,fe), &ml)) >= 0){
if ((r = mat_delta(&ml, mb, p, ml.v, m, n, o, e, fm, 
fn, fo, fe)) != NULL)
-   mat_add(&ml, r, mat_type(ml.v, m), 
getFunctionId(p));
-   actions++;
+   actions++;
continue;
}
 
diff --git a/monetdb5/optimizer/opt_pushselect.c 
b/monetdb5/optimizer/opt_pushselect.c
--- a/monetdb5/optimizer/opt_pushselect.c
+++ b/monetdb5/optimizer/opt_pushselect.c
@@ -131,7 +131,8 @@ no_updates(InstrPtr *old, int *vars, int
 int
 OPTpushselectImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci)
 {
-   int i, j, limit, slimit, actions=0, *vars, push_down_delta = 0, nr_topn 
= 0, nr_likes = 0;
+   int i, j, limit, slimit, actions=0, *vars, *slices = NULL, 
push_down_delta = 0, nr_topn = 0, nr_likes = 0;
+   char *rslices = NULL;
InstrPtr p, *old;
subselect

MonetDB: mosaic - Compilation issues

2016-07-13 Thread Martin Kersten
Changeset: e51b41503153 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e51b41503153
Modified Files:
monetdb5/modules/mosaic/mosaic_linear.c
monetdb5/modules/mosaic/mosaic_prefix.c
Branch: mosaic
Log Message:

Compilation issues


diffs (24 lines):

diff --git a/monetdb5/modules/mosaic/mosaic_linear.c 
b/monetdb5/modules/mosaic/mosaic_linear.c
--- a/monetdb5/modules/mosaic/mosaic_linear.c
+++ b/monetdb5/modules/mosaic/mosaic_linear.c
@@ -334,7 +334,7 @@ MOSdecompress_linear(Client cntxt, MOSta
int step = *(int*) linear_step(task,blk);
BUN lim= MOSgetCnt(blk);
for(i = 0; i < lim; i++){
-   ((int*)task->src)[i] = val + i * step;
+   ((int*)task->src)[i] = val + (int)(i * step);
hdr->checksum2.sumint += ((int*)task->src)[i];
}
task->src += i * sizeof(int);
diff --git a/monetdb5/modules/mosaic/mosaic_prefix.c 
b/monetdb5/modules/mosaic/mosaic_prefix.c
--- a/monetdb5/modules/mosaic/mosaic_prefix.c
+++ b/monetdb5/modules/mosaic/mosaic_prefix.c
@@ -963,7 +963,7 @@ MOSsubjoin_prefix(Client cntxt,  MOStask
case TYPE_sht: join_prefix(sht,unsigned short); break;
case TYPE_int: join_prefix(int,unsigned short); break;
case TYPE_lng: join_prefix(lng,ulng); break;
-   case TYPE_oid: join_prefix(oid,ulng); break;
+   case TYPE_oid: join_prefix(oid,BUN); break;
case TYPE_flt: join_prefix(flt,unsigned int); break;
case TYPE_dbl: join_prefix(dbl,unsigned int); break;
 #ifdef HAVE_HGE
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2016 - approved output

2016-07-13 Thread Niels Nes
Changeset: 3ad9584e3864 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3ad9584e3864
Modified Files:
sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out
sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128
Branch: Jun2016
Log Message:

approved output


diffs (210 lines):

diff --git a/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out 
b/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out
--- a/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out
+++ b/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out
@@ -31,14 +31,12 @@ Ready.
 % .plan # table_name
 % rel # name
 % clob # type
-% 84 # length
+% 97 # length
 project (
 | group by (
-| | project (
-| | | table(sys.dbg) [ dbg.a, dbg.b ] COUNT 
-| | ) [ dbg.a, dbg.b, tinyint "2" as L3.L3 ]
-| ) [ dbg.a as d ] [ dbg.d, sys.sum no nil (dbg.b) as L1.L1, L1.L1 as L2.L2, 
L3.L3 ]
-) [ dbg.d, L1 as L1.L1, sys.sql_mul(sys.sql_div(L2, L3.L3), tinyint "2") as 
L3.f ]
+| | table(sys.dbg) [ dbg.a, dbg.b ] COUNT 
+| ) [ dbg.a as d ] [ dbg.d, sys.sum no nil (dbg.b) as L1.L1, L1.L1 as L2.L2 ]
+) [ dbg.d, L1 as L1.L1, sys.sql_mul(sys.sql_div(L2, tinyint "2" as L3.L3), 
tinyint "2") as L3.f ]
 #set optimizer = 'sequential_pipe';
 #explain SELECT a as d, SUM(b), (2 * (SUM(b) / (SELECT 2))) as f FROM dbg 
GROUP BY d;
 % .explain # table_name
@@ -99,14 +97,12 @@ end user.s4_1;
 % .plan # table_name
 % rel # name
 % clob # type
-% 84 # length
+% 96 # length
 project (
 | group by (
-| | project (
-| | | table(sys.dbg) [ dbg.a, dbg.b ] COUNT 
-| | ) [ dbg.a, dbg.b, tinyint "2" as L3.L3 ]
-| ) [ dbg.a as d ] [ dbg.d, sys.sum no nil (dbg.b) as L1.L1, L1.L1 as L2.L2, 
L3.L3 ]
-) [ dbg.d, L1 as L1.e, sys.sql_mul(sys.sql_div(L2, L3.L3), tinyint "2") as 
L3.f ]
+| | table(sys.dbg) [ dbg.a, dbg.b ] COUNT 
+| ) [ dbg.a as d ] [ dbg.d, sys.sum no nil (dbg.b) as L1.L1, L1.L1 as L2.L2 ]
+) [ dbg.d, L1 as L1.e, sys.sql_mul(sys.sql_div(L2, tinyint "2" as L3.L3), 
tinyint "2") as L3.f ]
 #set optimizer = 'sequential_pipe';
 #explain SELECT a as d, SUM(b) as e, (2 * (SUM(b) / (SELECT 2))) as f FROM dbg 
GROUP BY d;
 % .explain # table_name
diff --git 
a/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128 
b/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128
--- a/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128
+++ b/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128
@@ -31,14 +31,12 @@ Ready.
 % .plan # table_name
 % rel # name
 % clob # type
-% 84 # length
+% 97 # length
 project (
 | group by (
-| | project (
-| | | table(sys.dbg) [ dbg.a, dbg.b ] COUNT 
-| | ) [ dbg.a, dbg.b, tinyint "2" as L3.L3 ]
-| ) [ dbg.a as d ] [ dbg.d, sys.sum no nil (dbg.b) as L1.L1, L1.L1 as L2.L2, 
L3.L3 ]
-) [ dbg.d, L1 as L1.L1, sys.sql_mul(sys.sql_div(L2, L3.L3), tinyint "2") as 
L3.f ]
+| | table(sys.dbg) [ dbg.a, dbg.b ] COUNT 
+| ) [ dbg.a as d ] [ dbg.d, sys.sum no nil (dbg.b) as L1.L1, L1.L1 as L2.L2 ]
+) [ dbg.d, L1 as L1.L1, sys.sql_mul(sys.sql_div(L2, tinyint "2" as L3.L3), 
tinyint "2") as L3.f ]
 #set optimizer = 'sequential_pipe';
 #explain SELECT a as d, SUM(b), (2 * (SUM(b) / (SELECT 2))) as f FROM dbg 
GROUP BY d;
 % .explain # table_name
@@ -46,27 +44,27 @@ project (
 % clob # type
 % 142 # length
 function user.s4_1(A0:bte,A1:bte):void;
-X_59:void := querylog.define("explain select a as d, sum(b), (2 * (sum(b) 
/ (select 2))) as f from dbg group by d;","sequential_pipe",38);
-X_26 := bat.new(nil:oid,nil:str);
-X_34 := bat.append(X_26,"sys.dbg");
-X_43 := bat.append(X_34,"sys.L1");
-X_52 := bat.append(X_43,"sys.L3");
-X_29 := bat.new(nil:oid,nil:str);
-X_36 := bat.append(X_29,"d");
-X_45 := bat.append(X_36,"L1");
-X_54 := bat.append(X_45,"f");
-X_30 := bat.new(nil:oid,nil:str);
-X_38 := bat.append(X_30,"int");
-X_47 := bat.append(X_38,"hugeint");
-X_56 := bat.append(X_47,"hugeint");
+X_57:void := querylog.define("explain select a as d, sum(b), (2 * (sum(b) 
/ (select 2))) as f from dbg group by d;","sequential_pipe",36);
+X_24 := bat.new(nil:oid,nil:str);
+X_32 := bat.append(X_24,"sys.dbg");
+X_41 := bat.append(X_32,"sys.L1");
+X_50 := bat.append(X_41,"sys.L3");
+X_27 := bat.new(nil:oid,nil:str);
+X_34 := bat.append(X_27,"d");
+X_43 := bat.append(X_34,"L1");
+X_52 := bat.append(X_43,"f");
+X_28 := bat.new(nil:oid,nil:str);
+X_36 := bat.append(X_28,"int");
+X_45 := bat.append(X_36,"hugeint");
+X_54 := bat.append(X_45,"hugeint");
+X_29 := bat.new(nil:oid,nil:int);
+X_38 := bat.append(X_29,32);
+X_47 := bat.append(X_38,128);
+X_55 := bat.append(X_47,128);
 X_31 := bat.new(nil:oid,nil:int);
-X_40 := bat.append(X_31,32);
-X_49 := bat.append(X_40,128);
-X_57 := bat.append(X_49,128);
-X_33 := bat.new(nil:oid,nil:int);
-X_42 := bat.append(X_33,0)

MonetDB: Jun2016 - approved output

2016-07-13 Thread Niels Nes
Changeset: 937b7d98ba63 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=937b7d98ba63
Modified Files:
sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out
sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single
Branch: Jun2016
Log Message:

approved output


diffs (76 lines):

diff --git a/sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out 
b/sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out
--- a/sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out
+++ b/sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out
@@ -45,7 +45,7 @@ Ready.
 % clob # type
 % 206 # length
 function user.s5_1(A0:timestamp,A1:timestamp,A2:void):void;
-X_67:void := querylog.define("explain select (t-(select timestamp 
\\'1970-1-1\\')),v from foo_nil_2dec union all select (t-(select timestamp 
\\'1970-1-1\\')),null from foo_nil_2dec;","default_pipe",44);
+X_67:void := querylog.define("explain select (t-(select timestamp 
\\'1970-1-1\\')),v from foo_nil_2dec union all select (t-(select timestamp 
\\'1970-1-1\\')),null from foo_nil_2dec;","default_pipe",42);
 X_45 := bat.new(nil:oid,nil:str);
 X_52 := bat.append(X_45,".L5");
 X_61 := bat.append(X_52,".L5");
@@ -70,18 +70,16 @@ function user.s5_1(A0:timestamp,A1:times
 X_19 := sql.delta(X_11,C_14,r1_14,X_17);
 X_20 := algebra.projection(C_8,X_19);
 X_21 := calc.timestamp(A0,7);
-X_23 := algebra.project(X_20,X_21);
-X_24:bat[:lng] := batmtime.diff(X_20,X_23);
-X_25 := bat.append(X_5,X_24,true);
-X_27 := calc.timestamp(A1,7);
-X_28 := algebra.project(X_20,X_27);
-X_29:bat[:lng] := batmtime.diff(X_20,X_28);
-X_30 := bat.append(X_25,X_29,true);
+X_23:bat[:lng] := mal.manifold("mtime","diff",X_20,X_21);
+X_26 := bat.append(X_5,X_23,true);
+X_28 := calc.timestamp(A1,7);
+X_29:bat[:lng] := mal.manifold("mtime","diff",X_20,X_28);
+X_30 := bat.append(X_26,X_29,true);
 X_31:bat[:lng] := bat.new(nil:oid,nil:lng);
 X_32:bat[:lng] := sql.bind(X_4,"sys","foo_nil_2dec","v",0);
-(C_34,r1_47) := sql.bind(X_4,"sys","foo_nil_2dec","v",2);
+(C_34,r1_45) := sql.bind(X_4,"sys","foo_nil_2dec","v",2);
 X_36:bat[:lng] := sql.bind(X_4,"sys","foo_nil_2dec","v",1);
-X_37 := sql.delta(X_32,C_34,r1_47,X_36);
+X_37 := sql.delta(X_32,C_34,r1_45,X_36);
 X_38 := algebra.projection(C_8,X_37);
 X_39 := bat.append(X_31,X_38,true);
 X_42 := algebra.project(X_29,nil:lng);
diff --git 
a/sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single 
b/sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single
--- a/sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single
+++ b/sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single
@@ -45,7 +45,7 @@ Ready.
 % clob # type
 % 206 # length
 function user.s5_1(A0:timestamp,A1:timestamp,A2:void):void;
-X_67:void := querylog.define("explain select (t-(select timestamp 
\\'1970-1-1\\')),v from foo_nil_2dec union all select (t-(select timestamp 
\\'1970-1-1\\')),null from foo_nil_2dec;","default_pipe",44);
+X_67:void := querylog.define("explain select (t-(select timestamp 
\\'1970-1-1\\')),v from foo_nil_2dec union all select (t-(select timestamp 
\\'1970-1-1\\')),null from foo_nil_2dec;","default_pipe",42);
 X_45 := bat.new(nil:oid,nil:str);
 X_52 := bat.append(X_45,".L5");
 X_61 := bat.append(X_52,".L5");
@@ -70,18 +70,16 @@ function user.s5_1(A0:timestamp,A1:times
 X_19 := sql.delta(X_11,C_14,r1_14,X_17);
 X_20 := algebra.projection(C_8,X_19);
 X_21 := calc.timestamp(A0,7);
-X_23 := algebra.project(X_20,X_21);
-X_24:bat[:lng] := batmtime.diff(X_20,X_23);
-X_25 := bat.append(X_5,X_24,true);
-X_27 := calc.timestamp(A1,7);
-X_28 := algebra.project(X_20,X_27);
-X_29:bat[:lng] := batmtime.diff(X_20,X_28);
-X_30 := bat.append(X_25,X_29,true);
+X_23:bat[:lng] := mal.manifold("mtime","diff",X_20,X_21);
+X_26 := bat.append(X_5,X_23,true);
+X_28 := calc.timestamp(A1,7);
+X_29:bat[:lng] := mal.manifold("mtime","diff",X_20,X_28);
+X_30 := bat.append(X_26,X_29,true);
 X_31:bat[:lng] := bat.new(nil:oid,nil:lng);
 X_32:bat[:lng] := sql.bind(X_4,"sys","foo_nil_2dec","v",0);
-(C_34,r1_47) := sql.bind(X_4,"sys","foo_nil_2dec","v",2);
+(C_34,r1_45) := sql.bind(X_4,"sys","foo_nil_2dec","v",2);
 X_36:bat[:lng] := sql.bind(X_4,"sys","foo_nil_2dec","v",1);
-X_37 := sql.delta(X_32,C_34,r1_47,X_36);
+X_37 := sql.delta(X_32,C_34,r1_45,X_36);
 X_38 := algebra.projection(C_8,X_37);
 X_39 := bat.append(X_31,X_38,true);
 X_42 := algebra.project(X_29,nil:lng);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2016 - approved output

2016-07-13 Thread Niels Nes
Changeset: e97305d10547 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e97305d10547
Modified Files:
sql/test/bugs/Tests/select_select_bug.stable.out
Branch: Jun2016
Log Message:

approved output


diffs (12 lines):

diff --git a/sql/test/bugs/Tests/select_select_bug.stable.out 
b/sql/test/bugs/Tests/select_select_bug.stable.out
--- a/sql/test/bugs/Tests/select_select_bug.stable.out
+++ b/sql/test/bugs/Tests/select_select_bug.stable.out
@@ -29,7 +29,7 @@ Ready.
 #SELECT (SELECT current_timestamp), count(DISTINCT mmsi) FROM vessels;
 % .L1, sys.L2 # table_name
 % L1,  L2 # name
-% tinyint, bigint # type
+% tinyint, wrd # type
 % 1,   1 # length
 [ 1,   0   ]
 #drop table vessels;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2016 - fixed problems with push down of (sub)slice

2016-07-13 Thread Niels Nes
Changeset: 5bf70c350bf3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5bf70c350bf3
Modified Files:
monetdb5/mal/mal_builder.c
monetdb5/optimizer/opt_mergetable.c
monetdb5/optimizer/opt_pushselect.c
sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.py
sql/test/bugs/Tests/select_select_bug.stable.out
Branch: Jun2016
Log Message:

fixed problems with push down of (sub)slice


diffs (208 lines):

diff --git a/monetdb5/mal/mal_builder.c b/monetdb5/mal/mal_builder.c
--- a/monetdb5/mal/mal_builder.c
+++ b/monetdb5/mal/mal_builder.c
@@ -96,7 +96,7 @@ newFcnCall(MalBlkPtr mb, char *mod, char
 InstrPtr
 newComment(MalBlkPtr mb, const char *val)
 {
-   InstrPtr q = newInstruction(NULL,REMsymbol);
+   InstrPtr q = newInstruction(mb, REMsymbol);
ValRecord cst;
 
if (q == NULL)
diff --git a/monetdb5/optimizer/opt_mergetable.c 
b/monetdb5/optimizer/opt_mergetable.c
--- a/monetdb5/optimizer/opt_mergetable.c
+++ b/monetdb5/optimizer/opt_mergetable.c
@@ -238,8 +238,9 @@ mat_set_prop(matlist_t *ml, MalBlkPtr mb
 static InstrPtr
 mat_delta(matlist_t *ml, MalBlkPtr mb, InstrPtr p, mat_t *mat, int m, int n, 
int o, int e, int mvar, int nvar, int ovar, int evar)
 {
-   int tpe, k, j, is_subdelta = (getFunctionId(p) == subdeltaRef);
+   int tpe, k, j, is_subdelta = (getFunctionId(p) == subdeltaRef), 
is_projectdelta = (getFunctionId(p) == projectdeltaRef);
InstrPtr r = NULL;
+   int pushed = 0;
 
//printf("# %s.%s(%d,%d,%d,%d)", getModuleId(p), getFunctionId(p), m, 
n, o, e);
 
@@ -303,7 +304,24 @@ mat_delta(matlist_t *ml, MalBlkPtr mb, I
setPartnr(ml, is_subdelta?getArg(mat[m].mi, k):-1, 
getArg(q,0), k);
r = pushArgument(mb, r, getArg(q, 0));
}
+   if (evar == 1 && e >= 0 && mat[e].type == mat_slc && 
is_projectdelta) {
+   InstrPtr q = newInstruction(mb, ASSIGNsymbol);
+
+   setModuleId(q, algebraRef);
+   setFunctionId(q, projectionRef);
+   getArg(q, 0) = getArg(r, 0);
+   q = pushArgument(mb, q, getArg(mat[e].mi, 0));
+   getArg(r, 0) = newTmpVariable(mb, tpe);
+   q = pushArgument(mb, q, getArg(r, 0));
+   pushInstruction(mb, r);
+   pushInstruction(mb, q);
+   pushed = 1;
+   r = q;
+   }
}
+   mat_add_var(ml, r, NULL, getArg(r, 0), mat_type(mat, m),  -1, -1, 
pushed);
+   if (pushed)
+   mat[ml->top-1].packed = 1;
return r;
 }
 
@@ -1426,6 +1444,7 @@ mat_topn(MalBlkPtr mb, InstrPtr p, matli
pushInstruction(mb,r);
 
q = copyInstruction(p);
+   setFunctionId(q, subsliceRef);
if (ml->v[m].type != mat_tpn || is_slice) 
getArg(q,1) = getArg(r,0);
pushInstruction(mb,q);
@@ -1729,8 +1748,8 @@ OPTmergetableImplementation(Client cntxt
   (n=is_a_mat(getArg(p,fn), &ml)) >= 0 &&
   (o=is_a_mat(getArg(p,fo), &ml)) >= 0){
if ((r = mat_delta(&ml, mb, p, ml.v, m, n, o, -1, fm, 
fn, fo, 0)) != NULL)
-   mat_add(&ml, r, mat_type(ml.v, m), 
getFunctionId(p));
-   actions++;
+   actions++;
+
continue;
}
if (match == 4 && bats == 5 && isDelta(p) && 
@@ -1739,8 +1758,7 @@ OPTmergetableImplementation(Client cntxt
   (o=is_a_mat(getArg(p,fo), &ml)) >= 0 &&
   (e=is_a_mat(getArg(p,fe), &ml)) >= 0){
if ((r = mat_delta(&ml, mb, p, ml.v, m, n, o, e, fm, 
fn, fo, fe)) != NULL)
-   mat_add(&ml, r, mat_type(ml.v, m), 
getFunctionId(p));
-   actions++;
+   actions++;
continue;
}
 
diff --git a/monetdb5/optimizer/opt_pushselect.c 
b/monetdb5/optimizer/opt_pushselect.c
--- a/monetdb5/optimizer/opt_pushselect.c
+++ b/monetdb5/optimizer/opt_pushselect.c
@@ -131,7 +131,8 @@ no_updates(InstrPtr *old, int *vars, int
 int
 OPTpushselectImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci)
 {
-   int i, j, limit, slimit, actions=0, *vars, push_down_delta = 0, nr_topn 
= 0, nr_likes = 0;
+   int i, j, limit, slimit, actions=0, *vars, *slices = NULL, 
push_down_delta = 0, nr_topn = 0, nr_likes = 0;
+   char *rslices = NULL;
InstrPtr p, *old;
subselect_t subselects;
 
@@ -454,9 +455,13 @@ OPTpushselectImplementation(Client cntxt
slimit= mb->ssize;
old = mb->stmt;
 
-   if (newMalBlkStmt(mb, mb->stop+(5*push_down_delta)) <0 ) {
+   s

MonetDB: Jul2015 - Closing branch. Again.

2016-07-13 Thread Sjoerd Mullender
Changeset: 6373db2d4af5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6373db2d4af5
Branch: Jul2015
Log Message:

Closing branch.  Again.

___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Jun2016 branch.

2016-07-13 Thread Sjoerd Mullender
Changeset: 938cec0c246d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=938cec0c246d
Modified Files:
sql/backends/monet5/sql_execute.c
Branch: default
Log Message:

Merge with Jun2016 branch.


diffs (20 lines):

diff --git a/sql/backends/monet5/sql_execute.c 
b/sql/backends/monet5/sql_execute.c
--- a/sql/backends/monet5/sql_execute.c
+++ b/sql/backends/monet5/sql_execute.c
@@ -415,13 +415,9 @@ SQLstatementIntern(Client c, str *expr, 
if (result) { /* return all results sets */
*result = m->results;
} else {
-   int i;
-   for (i = 0; i < m->results->nr_cols; i++) {
-   GDKfree(m->results->cols[i].tn);
-   GDKfree(m->results->cols[i].name);
-   }
-   GDKfree(m->results->cols);
-   GDKfree(m->results);
+   if (m->results == o->results)
+   o->results = NULL;
+   res_tables_destroy(m->results);
}
m->results = NULL;
}
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2016 - Fix memory leak fix: use proper function, and...

2016-07-13 Thread Sjoerd Mullender
Changeset: efb8ba6c1e8a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=efb8ba6c1e8a
Modified Files:
sql/backends/monet5/sql_execute.c
Branch: Jun2016
Log Message:

Fix memory leak fix: use proper function, and don't restore backed up pointer.


diffs (20 lines):

diff --git a/sql/backends/monet5/sql_execute.c 
b/sql/backends/monet5/sql_execute.c
--- a/sql/backends/monet5/sql_execute.c
+++ b/sql/backends/monet5/sql_execute.c
@@ -260,13 +260,9 @@ SQLstatementIntern(Client c, str *expr, 
if (result) { /* return all results sets */
*result = m->results;
} else {
-   int i;
-   for (i = 0; i < m->results->nr_cols; i++) {
-   GDKfree(m->results->cols[i].tn);
-   GDKfree(m->results->cols[i].name);
-   }
-   GDKfree(m->results->cols);
-   GDKfree(m->results);
+   if (m->results == o->results)
+   o->results = NULL;
+   res_tables_destroy(m->results);
}
m->results = NULL;
}
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jul2015 - small patch against crash in sql users functions

2016-07-13 Thread Niels Nes
Changeset: 09a9a40dd733 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=09a9a40dd733
Modified Files:
sql/backends/monet5/sql_user.c
Branch: Jul2015
Log Message:

small patch against crash in sql users functions


diffs (19 lines):

diff --git a/sql/backends/monet5/sql_user.c b/sql/backends/monet5/sql_user.c
--- a/sql/backends/monet5/sql_user.c
+++ b/sql/backends/monet5/sql_user.c
@@ -153,10 +153,13 @@ str
 db_users_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
bat *r = getArgReference_bat(stk, pci, 0);
-   BAT *b = db_users(cntxt);
-   BAT *bm = BATmirror(BATmark(BATmirror(b), 0));
+   BAT *b, *bm;
+   str err;
 
(void) mb;
+   if ((err = AUTHgetUsers(&b, &cntxt)) != MAL_SUCCEED) 
+   return err;
+   bm = BATmirror(BATmark(BATmirror(b), 0));
BBPunfix(b->batCacheid);
*r = bm->batCacheid;
BBPkeepref(*r);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: iot - A few more smaller fixes

2016-07-13 Thread Martin Kersten
Changeset: 3062e95bbfc5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3062e95bbfc5
Added Files:
sql/backends/monet5/iot/Tests/iot03.stable.err
sql/backends/monet5/iot/Tests/iot03.stable.out
sql/backends/monet5/iot/Tests/iot04.stable.err
sql/backends/monet5/iot/Tests/iot04.stable.out
sql/backends/monet5/iot/Tests/iot12.stable.err
sql/backends/monet5/iot/Tests/iot12.stable.out
sql/backends/monet5/iot/Tests/iot14.stable.err
sql/backends/monet5/iot/Tests/iot14.stable.out
Modified Files:
sql/backends/monet5/iot/Tests/bug02.stable.err
sql/backends/monet5/iot/Tests/bug02.stable.out
sql/backends/monet5/iot/Tests/iot04.sql
sql/backends/monet5/iot/Tests/iot12.sql
sql/backends/monet5/iot/Tests/iot14.sql
sql/backends/monet5/iot/Tests/iot16.sql
sql/backends/monet5/iot/Tests/iot16.stable.out
sql/backends/monet5/iot/petrinet.c
Branch: iot
Log Message:

A few more smaller fixes


diffs (truncated from 752 to 300 lines):

diff --git a/sql/backends/monet5/iot/Tests/bug02.stable.err 
b/sql/backends/monet5/iot/Tests/bug02.stable.err
--- a/sql/backends/monet5/iot/Tests/bug02.stable.err
+++ b/sql/backends/monet5/iot/Tests/bug02.stable.err
@@ -1,9 +1,9 @@
 stderr of test 'bug02` in directory 'sql/backends/monet5/iot` itself:
 
 
-# 16:06:35 >  
-# 16:06:35 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=36465" "--set" 
"mapi_usock=/var/tmp/mtest-21122/.s.monetdb.36465" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch1/mk/iot//Linux/var/MonetDB/mTests_sql_backends_monet5_iot"
-# 16:06:35 >  
+# 09:56:30 >  
+# 09:56:30 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31933" "--set" 
"mapi_usock=/var/tmp/mtest-28297/.s.monetdb.31933" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch1/mk/iot//Linux/var/MonetDB/mTests_sql_backends_monet5_iot"
+# 09:56:30 >  
 
 # builtin opt  gdk_dbpath = 
/export/scratch1/mk/iot//Linux/var/monetdb5/dbfarm/demo
 # builtin opt  gdk_debug = 0
@@ -17,22 +17,22 @@ stderr of test 'bug02` in directory 'sql
 # builtin opt  sql_debug = 0
 # cmdline opt  gdk_nr_threads = 0
 # cmdline opt  mapi_open = true
-# cmdline opt  mapi_port = 36465
-# cmdline opt  mapi_usock = /var/tmp/mtest-21122/.s.monetdb.36465
+# cmdline opt  mapi_port = 31933
+# cmdline opt  mapi_usock = /var/tmp/mtest-28297/.s.monetdb.31933
 # cmdline opt  monet_prompt = 
 # cmdline opt  gdk_dbpath = 
/export/scratch1/mk/iot//Linux/var/MonetDB/mTests_sql_backends_monet5_iot
 # cmdline opt  gdk_debug = 536870922
 
-# 16:06:35 >  
-# 16:06:35 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-21122" "--port=36465"
-# 16:06:35 >  
+# 09:56:30 >  
+# 09:56:30 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-28297" "--port=31933"
+# 09:56:30 >  
 
-MAPI  = (monetdb) /var/tmp/mtest-21122/.s.monetdb.36465
+MAPI  = (monetdb) /var/tmp/mtest-28297/.s.monetdb.31933
 QUERY = call iot.show('sys','test');
+ERROR = !Continous query sys.test not accessible
 
 
+# 09:56:30 >  
+# 09:56:30 >  "Done."
+# 09:56:30 >  
 
-# 16:06:35 >  
-# 16:06:35 >  "Done."
-# 16:06:35 >  
-
diff --git a/sql/backends/monet5/iot/Tests/bug02.stable.out 
b/sql/backends/monet5/iot/Tests/bug02.stable.out
--- a/sql/backends/monet5/iot/Tests/bug02.stable.out
+++ b/sql/backends/monet5/iot/Tests/bug02.stable.out
@@ -1,9 +1,9 @@
 stdout of test 'bug02` in directory 'sql/backends/monet5/iot` itself:
 
 
-# 16:06:35 >  
-# 16:06:35 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=36465" "--set" 
"mapi_usock=/var/tmp/mtest-21122/.s.monetdb.36465" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch1/mk/iot//Linux/var/MonetDB/mTests_sql_backends_monet5_iot"
-# 16:06:35 >  
+# 09:56:30 >  
+# 09:56:30 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31933" "--set" 
"mapi_usock=/var/tmp/mtest-28297/.s.monetdb.31933" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch1/mk/iot//Linux/var/MonetDB/mTests_sql_backends_monet5_iot"
+# 09:56:30 >  
 
 # MonetDB 5 server v11.24.0
 # This is an unreleased version
@@ -13,20 +13,22 @@ stdout of test 'bug02` in directory 'sql
 # Copyright (c) 1993-July 2008 CWI.
 # Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved
 # Visit http://www.monetdb.org/ for further information
-# Listening for connection requests on mapi:monetdb://vienna.da.cwi.nl:36465/
-# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-21122/.s.monetdb.36465
+# Listening for connection requests on mapi:monetdb://vienna.da.cwi.nl:31933/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-28297/.s.monetdb.31933
 # MonetDB/GIS module loaded
 # MonetDB/SQL module loaded
 #