MonetDB: sfcgal - Fix a leak. Bulk version for MakePolyong

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

Fix a leak. Bulk version for MakePolyong


diffs (113 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -3574,7 +3574,7 @@ wkbEnvelopeFromCoordinates(wkb **out, db
 }
 
 str
-wkbMakePolygon(wkb **out, wkb **external, int *srid)
+wkbMakePolygon(wkb **out, wkb **external, const int *srid)
 {
GEOSGeom geosGeometry, externalGeometry, linearRingGeometry;
bit closed = 0;
@@ -5089,9 +5089,13 @@ wkbUnaryCollect(wkb **out, wkb **geoms, 
 }
 
GEOSSetSRID(geomCollection, srid);
-   *out = geos2wkb(geomCollection);
-GDKfree(geomGeometries);
-
+*out = geos2wkb(geomCollection);
+if (geomGeometries) {
+for (i = 0; i < num_geoms; i++) {
+GEOSGeom_destroy(geomGeometries[i]);
+}
+GDKfree(geomGeometries);
+}
return MAL_SUCCEED;
 }
 
@@ -5101,8 +5105,7 @@ wkbCollectCascade(wkb **outWKB, bat *inB
 {
BAT *inBAT = NULL;
BATiter inBAT_iter;
-   BUN i;
-int j = 0;
+   BUN i = 0;
 wkb *geomWKB = wkbNULL(), **geoms = NULL;
str err;
 
@@ -5115,7 +5118,6 @@ wkbCollectCascade(wkb **outWKB, bat *inB
 if (!BATcount(inBAT)) {
BBPunfix(inBAT->batCacheid);
if ((err = wkbCollect(outWKB,, )) != 
MAL_SUCCEED) {
-   BBPunfix(inBAT->batCacheid);
return err;
}
 return MAL_SUCCEED;
@@ -5129,11 +5131,11 @@ wkbCollectCascade(wkb **outWKB, bat *inB
throw(MAL, "geom.Collect", "GDKmalloc failed");
 }
 
-   for (j = 0, i = 0; i < BATcount(inBAT); i++, j++) {
-geoms[j] = (wkb *) BUNtail(inBAT_iter, i);
+   for (i = 0; i < BATcount(inBAT); i++) {
+geoms[i] = (wkb *) BUNtail(inBAT_iter, i);
 }
 
-if ((err = wkbUnaryCollect(outWKB, geoms, j)) != MAL_SUCCEED) {
+if ((err = wkbUnaryCollect(outWKB, geoms, BATcount(inBAT))) != 
MAL_SUCCEED) {
 BBPunfix(inBAT->batCacheid);
 if (geoms)
 GDKfree(geoms);
diff --git a/geom/monetdb5/geom.h b/geom/monetdb5/geom.h
--- a/geom/monetdb5/geom.h
+++ b/geom/monetdb5/geom.h
@@ -187,7 +187,8 @@ geom_export str numPointsGeometry(unsign
 geom_export str wkbPointN(wkb **out, wkb **geom, int *n);
 geom_export str wkbEnvelope(wkb **out, wkb **geom);
 geom_export str wkbEnvelopeFromCoordinates(wkb** out, dbl* xmin, dbl* ymin, 
dbl* xmax, dbl* ymax, int* srid);
-geom_export str wkbMakePolygon(wkb** out, wkb** external, int* srid); /*Only 
Polygons without holes*/
+geom_export str wkbMakePolygon(wkb** out, wkb** external, const int* srid); 
/*Only Polygons without holes*/
+geom_export str wkbMakePolygon_bat(bat *outBAT_id, bat *inBAT_id, const int* 
srid); /*Only Polygons without holes*/
 geom_export str wkbMakeLine(wkb**, wkb**, wkb**);
 geom_export str wkbMakeLineAggr(wkb** outWKB, bat* inBAT_id);
 geom_export str wkbsubMakeLine(bat *outBAT_id, bat* bBAT_id, bat *gBAT_id, bat 
*eBAT_id, bit* fla);
diff --git a/geom/monetdb5/geom.mal b/geom/monetdb5/geom.mal
--- a/geom/monetdb5/geom.mal
+++ b/geom/monetdb5/geom.mal
@@ -680,6 +680,18 @@ function NPoints(w:bat[:wkb]) :bat[:int]
return x;
 end NPoints;
 
+command Polygon_bat(w:bat[:wkb], srid:int) :bat[:wkb] address 
wkbMakePolygon_bat
+comment "Returns a Polygon created from the provided LineStrings";
+
+function MakePolygon(w:bat[:wkb]) :bat[:wkb];
+   x := Polygon_bat(w, 0);
+   return x;
+end MakePolygon;
+function MakePolygon(w:bat[:wkb], srid:int) :bat[:wkb];
+   x := Polygon_bat(w, srid);
+   return x;
+end MakePolygon;
+
 command GetCoordinate(w:bat[:wkb], idx:int) :bat[:dbl] address 
wkbGetCoordinate_bat
 comment "Returns the coordinate at position idx of a point, or NULL if not 
available. idx=0 -> X, idx=1 -> Y, idx=2 -> Z. Input must be point";
 function X(w:bat[:wkb]) :bat[:dbl];
diff --git a/geom/monetdb5/geomBulk.c b/geom/monetdb5/geomBulk.c
--- a/geom/monetdb5/geomBulk.c
+++ b/geom/monetdb5/geomBulk.c
@@ -587,6 +587,12 @@ wkbForceDim_bat(bat *outBAT_id, bat *inB
 {
 return WKBtoWKBflagINT_bat(outBAT_id, inBAT_id, flag, wkbForceDim, 
"batgeom.wkbForceDim");
 }
+
+str
+wkbMakePolygon_bat(bat *outBAT_id, bat *inBAT_id, const int *srid)
+{
+return WKBtoWKBflagINT_bat(outBAT_id, inBAT_id, srid, wkbMakePolygon, 
"batgeom.wkbMakePolygon");
+}
 /***/
 /*** IN: wkb - OUT: bit /
 /***/
___
checkin-list mailing list
checkin-list@monetdb.org

MonetDB: sfcgal - The mal operators signature should only accept...

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

The mal operators signature should only accept the new headless columns


diffs (11 lines):

diff --git a/geom/monetdb5/sfcgal.mal b/geom/monetdb5/sfcgal.mal
--- a/geom/monetdb5/sfcgal.mal
+++ b/geom/monetdb5/sfcgal.mal
@@ -28,6 +28,6 @@ comment "Triangulates a geometry collect
 
 module batgeom;
 
-command triangulate2DZ(geo:bat[:oid,:wkb], flag:int) :bat[ :oid, :wkb]
+command triangulate2DZ(geo:bat[:wkb], flag:int) :bat[:wkb]
 address geom_sfcgal_triangulate2DZ_bat
 comment "Triangulates a geometry collection";
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: sfcgal - The mal operators signature should only accept...

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

The mal operators signature should only accept the new headless columns


diffs (254 lines):

diff --git a/geom/monetdb5/geom.mal b/geom/monetdb5/geom.mal
--- a/geom/monetdb5/geom.mal
+++ b/geom/monetdb5/geom.mal
@@ -287,16 +287,16 @@ comment "Returns a geometry that represe
 
 command Union(a:wkb, b:wkb) :wkb address wkbUnion
 comment "Returns a geometry that represents the point set union of the 
Geometries a, b";
-command Union(a:bat[:oid,:wkb]) :wkb address wkbUnionCascade
+command Union(a:bat[:wkb]) :wkb address wkbUnionCascade
 comment "Gets a BAT with geometries and returns their union"; 
 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
 comment "Returns a geometry that represents the point set union of the 
Geometries a, b";
-command Collect(a:bat[:oid,:wkb]) :wkb address wkbCollectCascade
+command Collect(a:bat[:wkb]) :wkb address wkbCollectCascade
 comment "Gets a BAT with geometries and returns their union"; 
-command subCollect(a:bat[:oid,:wkb], g:bat[:oid], e:bat[:oid], :bit) 
:bat[:wkb] address wkbsubCollect
+command subCollect(a:bat[:wkb], g:bat[:oid], e:bat[:oid], :bit) :bat[:wkb] 
address wkbsubCollect
 comment "Gets a BAT with geometries, candidate group list and returns a 
collection per each group element."; 
 
 
@@ -348,11 +348,11 @@ command DelaunayTriangles(a:wkb, toleran
 comment "Returns a Delaunay triangulation, flag=0 => collection of polygons, 
flag=1 => multilinestring";
 command Dump(a:wkb) (id:bat[ :str], geom:bat[ :wkb]) address wkbDump
 comment "Gets a MultiPolygon and returns the Polygons in it";
-command DumpP(a:wkb, p:int) (parent:bat[:oid, :int], id:bat[:oid, :str], 
geom:bat[:oid, :wkb]) address wkbDumpP
+command DumpP(a:wkb, p:int) (parent:bat[:int], id:bat[:str], geom:bat[:wkb]) 
address wkbDumpP
 comment "Gets a MultiPolygon and returns the Polygons in it";
-command DumpPoints(a:wkb) (id:bat[:oid, :str], geom:bat[:oid, :wkb]) address 
wkbDumpPoints
+command DumpPoints(a:wkb) (id:bat[:str], geom:bat[:wkb]) address wkbDumpPoints
 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
+command DumpPointsP(a:wkb, p:int) (parent:bat[:int], id:bat[:str], 
geom:bat[:wkb]) address wkbDumpPointsP
 comment "Gets a Geometry and returns the Points in it";
 
 command Polygonize(a:wkb) :wkb address wkbPolygonize
@@ -384,7 +384,7 @@ command Contains(a:wkb, x:dbl, y:dbl) :b
 address wkbContains_point
 comment "Returns true if the Geometry a 'spatially contains' Geometry b";
 
-command Contains(a:wkb, px:bat[:oid,:dbl], py:bat[:oid,:dbl]) :bat[:oid,:bit]
+command Contains(a:wkb, px:bat[:dbl], py:bat[:dbl]) :bat[:bit]
 address wkbContains_point_bat
 comment "Returns true if the Geometry-BAT a 'spatially contains' Geometry-B b";
 
@@ -441,7 +441,7 @@ end MakePolygon;
 #  x := Polygon(external, internal, 0);
 #  return x;
 #end MakePolygon;
-command subMakePolygon(a:bat[:oid,:wkb], g:bat[:oid], e:bat[:oid], :bit) 
:bat[:wkb] address wkbsubMakePolygon
+command subMakePolygon(a:bat[:wkb], g:bat[:oid], e:bat[:oid], :bit) :bat[:wkb] 
address wkbsubMakePolygon
 comment "Gets a BAT with linestring geometries, a candidate group list and 
returns a single polygon geometry per group."; 
 
 command MakeLine(a:wkb, b:wkb) :wkb address wkbMakeLine
@@ -652,7 +652,7 @@ end GeometryType2;
 command MakePointXYZM(x:bat[:dbl], y:bat[:dbl], z:bat[:dbl], m:bat[:dbl], 
zmFlag:int) :bat[:wkb] address wkbMakePoint_bat
 comment "creates a point using the coordinates";
 
-function MakePoint(x:bat[:oid,:dbl], y:bat[:oid,:dbl]) :bat[:oid,:wkb];
+function MakePoint(x:bat[:dbl], y:bat[:dbl]) :bat[:wkb];
p := MakePointXYZM(x, y, nil:bat, nil:bat, 0);
return p;
 end MakePoint;
@@ -695,58 +695,58 @@ function Z(w:bat[:wkb]) :bat[:dbl];
return c;
 end Z;
 
-command ForceDimensions(g:bat[:oid,:wkb], d:int) :bat[:oid,:wkb] address 
wkbForceDim_bat
+command ForceDimensions(g:bat[:wkb], d:int) :bat[:wkb] address wkbForceDim_bat
 comment "Removes or Adds additional coordinates in the geometry to make it d 
dimensions";
 
-function Force2D(g:bat[:oid,:wkb]) :bat[:oid,:wkb];
+function Force2D(g:bat[:wkb]) :bat[:wkb];
x := ForceDimensions(g, 2);
return x;
 end Force2D;
 
-function Force3D(g:bat[:oid,:wkb]) :bat[:oid,:wkb];
+function Force3D(g:bat[:wkb]) :bat[:wkb];
x := ForceDimensions(g, 3);
return x;
 end Force3D;
 
-command Translate3D(g:bat[:oid,:wkb], dxBAT:bat[:oid,:dbl], dx:dbl, 
dyBAT:bat[:oid,:dbl], dy:dbl, dzBAT:bat[:oid,:dbl], dz:dbl) 

MonetDB: sfcgal - Bunfirst is gone

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

Bunfirst is gone


diffs (70 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -4888,8 +4888,8 @@ wkbUnionCascade(wkb **outWKB, bat *inBAT
throw(MAL, "geom.Union", "GDKmalloc failed");
 }
 
-   for (j = 0, i = BUNfirst(inBAT); i < BATcount(inBAT); i++, j++) {
-geoms[j] = (wkb *) BUNtail(inBAT_iter, i + BUNfirst(inBAT));
+   for (j = 0, i = 0; i < BATcount(inBAT); i++, j++) {
+geoms[j] = (wkb *) BUNtail(inBAT_iter, i);
 }
 
 if ((err = wkbUnaryUnion(outWKB, geoms, j)) != MAL_SUCCEED) {
@@ -5129,8 +5129,8 @@ wkbCollectCascade(wkb **outWKB, bat *inB
throw(MAL, "geom.Collect", "GDKmalloc failed");
 }
 
-   for (j = 0, i = BUNfirst(inBAT); i < BATcount(inBAT); i++, j++) {
-geoms[j] = (wkb *) BUNtail(inBAT_iter, i + BUNfirst(inBAT));
+   for (j = 0, i = 0; i < BATcount(inBAT); i++, j++) {
+geoms[j] = (wkb *) BUNtail(inBAT_iter, i);
 }
 
 if ((err = wkbUnaryCollect(outWKB, geoms, j)) != MAL_SUCCEED) {
@@ -5183,7 +5183,7 @@ BATgroupWKBWKBtoWKB(bat *outBAT_id, BAT 
 if (BATtdense(g))
 gids = NULL;
 else
-gids = (const oid *) Tloc(g, BUNfirst(g) + start);
+gids = (const oid *) Tloc(g, start);
 
 /*Allocate structures*/
 if ((aWKBs = (wkb **) GDKzalloc(sizeof(wkb*)*ngrp)) == NULL) {
diff --git a/geom/monetdb5/geomBulk.c b/geom/monetdb5/geomBulk.c
--- a/geom/monetdb5/geomBulk.c
+++ b/geom/monetdb5/geomBulk.c
@@ -2427,12 +2427,12 @@ wkbIntersection_bat(bat *outBAT_id, bat 
aBAT_iter = bat_iterator(aBAT);
bBAT_iter = bat_iterator(bBAT);
 
-   for (i = BUNfirst(aBAT); i < BATcount(aBAT); i++) {
+   for (i = 0; i < BATcount(aBAT); i++) {
str err = NULL;
wkb *aWKB = NULL, *bWKB = NULL, *outWKB = NULL;
 
-   aWKB = (wkb *) BUNtail(aBAT_iter, i + BUNfirst(aBAT));
-   bWKB = (wkb *) BUNtail(bBAT_iter, i + BUNfirst(bBAT));
+   aWKB = (wkb *) BUNtail(aBAT_iter, i);
+   bWKB = (wkb *) BUNtail(bBAT_iter, i);
 
if ((err = wkbIntersection(, , )) != 
MAL_SUCCEED) {//set SRID
BBPunfix(aBAT->batCacheid);
@@ -2513,13 +2513,13 @@ wkbIntersection_bat_s(bat *outBAT_id, ba
saBAT_iter = bat_iterator(saBAT);
sbBAT_iter = bat_iterator(sbBAT);
 
-   for (i = BUNfirst(saBAT); i < BATcount(saBAT); i++) {
+   for (i = 0; i < BATcount(saBAT); i++) {
str err = NULL;
 oid aOID = 0, bOID = 0;
wkb *aWKB = NULL, *bWKB = NULL, *outWKB = NULL;
 
-   aOID = *(oid *) BUNtail(saBAT_iter, i + BUNfirst(saBAT));
-   bOID = *(oid *) BUNtail(sbBAT_iter, i + BUNfirst(sbBAT));
+   aOID = *(oid *) BUNtail(saBAT_iter, i);
+   bOID = *(oid *) BUNtail(sbBAT_iter, i);
 
aWKB = (wkb *) BUNtail(aBAT_iter, aOID);
bWKB = (wkb *) BUNtail(bBAT_iter, bOID);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: sfcgal - Merge with default

2016-07-19 Thread Romulo Goncalves
Changeset: 3520ee5d793a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3520ee5d793a
Added Files:
ChangeLog-Archive
sql/backends/monet5/UDF/cudf/80_udf.mal
sql/backends/monet5/UDF/cudf/80_udf.sql
sql/backends/monet5/UDF/cudf/80_udf_hge.mal
sql/backends/monet5/UDF/cudf/80_udf_hge.sql
sql/backends/monet5/UDF/cudf/Makefile.ag
sql/backends/monet5/UDF/cudf/README
sql/backends/monet5/UDF/cudf/Tests/All
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.sql
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.err
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.sql
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.err
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out
sql/backends/monet5/UDF/cudf/udf.c
sql/backends/monet5/UDF/cudf/udf.h
sql/backends/monet5/UDF/cudf/udf.mal
sql/backends/monet5/UDF/cudf/udf_hge.mal
sql/backends/monet5/UDF/cudf/udf_impl.h
sql/backends/monet5/UDF/pyapi/50_pyapi.mal
sql/backends/monet5/UDF/pyapi/Makefile.ag
sql/backends/monet5/UDF/pyapi/Tests/All
sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.malC

sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.stable.err

sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.stable.out
sql/backends/monet5/UDF/pyapi/connection.c
sql/backends/monet5/UDF/pyapi/connection.h
sql/backends/monet5/UDF/pyapi/formatinput.c
sql/backends/monet5/UDF/pyapi/formatinput.h
sql/backends/monet5/UDF/pyapi/pyapi.c
sql/backends/monet5/UDF/pyapi/pyapi.h
sql/backends/monet5/UDF/pyapi/pyapi.mal
sql/backends/monet5/UDF/pyapi/pyapi_locatepython.bat
sql/backends/monet5/UDF/pyapi/pytypes.c
sql/backends/monet5/UDF/pyapi/pytypes.h
sql/backends/monet5/UDF/pyapi/type_conversion.c
sql/backends/monet5/UDF/pyapi/type_conversion.h
sql/backends/monet5/UDF/pyapi/unicode.c
sql/backends/monet5/UDF/pyapi/unicode.h
sql/backends/monet5/UDF/pyapi/unspecified_evil.h
sql/test/BugTracker-2016/Tests/analyze-quotes-incorrectly.Bug-4021.sql

sql/test/BugTracker-2016/Tests/analyze-quotes-incorrectly.Bug-4021.stable.err

sql/test/BugTracker-2016/Tests/analyze-quotes-incorrectly.Bug-4021.stable.out
sql/test/BugTracker-2016/Tests/boolean-evaluation.Bug-4025.sql
sql/test/BugTracker-2016/Tests/boolean-evaluation.Bug-4025.stable.err
sql/test/BugTracker-2016/Tests/boolean-evaluation.Bug-4025.stable.out
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
sql/test/bugs/Tests/select_select_bug.sql
sql/test/bugs/Tests/select_select_bug.stable.err
sql/test/bugs/Tests/select_select_bug.stable.out
Removed Files:
monetdb5/extras/pyapi/50_pyapi.mal
monetdb5/extras/pyapi/Makefile.ag
monetdb5/extras/pyapi/Tests/All
monetdb5/extras/pyapi/Tests/pyapi_numpy_boolean.malC
monetdb5/extras/pyapi/Tests/pyapi_numpy_boolean.stable.err
monetdb5/extras/pyapi/Tests/pyapi_numpy_boolean.stable.out

MonetDB: default - memory leak indication.

2016-07-19 Thread Martin Kersten
Changeset: 3e6453e7136a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3e6453e7136a
Modified Files:
monetdb5/mal/mal_client.c
Branch: default
Log Message:

memory leak indication.
The module administration should be revamped to deal better
with dropping user-defined modules, retaining global ones.


diffs (14 lines):

diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c
--- a/monetdb5/mal/mal_client.c
+++ b/monetdb5/mal/mal_client.c
@@ -223,7 +223,9 @@ MCinitClientRecord(Client c, oid user, b
c->curprg = c->backup = 0;
c->glb = 0;
 
-   /* remove garbage from previous connection */
+   /* remove garbage from previous connection 
+* be aware, a user can introduce several modules 
+* that should be freed to avoid memory leaks */
if (c->nspace) {
freeModule(c->nspace);
c->nspace = 0;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - new tests

2016-07-19 Thread Hannes Muehleisen
Changeset: dc8dad5e60d3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dc8dad5e60d3
Added Files:
sql/test/malloc_fail/Tests/setmemorylimit-fail.sql
sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.err
sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.out
sql/test/malloc_fail/Tests/setmemorylimit-fail2.sql
Branch: default
Log Message:

new tests


diffs (98 lines):

diff --git a/sql/test/malloc_fail/Tests/setmemorylimit-fail.sql 
b/sql/test/malloc_fail/Tests/setmemorylimit-fail.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/malloc_fail/Tests/setmemorylimit-fail.sql
@@ -0,0 +1,3 @@
+create procedure setmemorylimit(nbytes BIGINT) external name 
"io"."setmemorylimit";
+call setmemorylimit(1000);
+select name from tables where 1=0;
diff --git a/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.err 
b/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.err
@@ -0,0 +1,40 @@
+stderr of test 'setmemorylimit-fail` in directory 'sql/test/malloc_fail` 
itself:
+
+
+# 15:41:50 >  
+# 15:41:50 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=38119" "--set" 
"mapi_usock=/var/tmp/mtest-56431/.s.monetdb.38119" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/Users/hannes/monetdb-install/var/MonetDB/mTests_sql_test_malloc_fail"
+# 15:41:50 >  
+
+# builtin opt  gdk_dbpath = 
/Users/hannes/monetdb-install/var/monetdb5/dbfarm/demo
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_vmtrim = no
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 5
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 38119
+# cmdline opt  mapi_usock = /var/tmp/mtest-56431/.s.monetdb.38119
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/Users/hannes/monetdb-install/var/MonetDB/mTests_sql_test_malloc_fail
+# cmdline opt  gdk_debug = 536870922
+
+# 15:41:50 >  
+# 15:41:50 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-56431" "--port=38119"
+# 15:41:50 >  
+
+MAPI  = (monetdb) /var/tmp/mtest-56431/.s.monetdb.38119
+QUERY = create procedure setmemorylimit(nbytes BIGINT) external name 
"io"."setmemorylimit";
+ERROR = !CREATE PROCEDURE: name 'setmemorylimit' (bigint(64)) already in use
+MAPI  = (monetdb) /var/tmp/mtest-56431/.s.monetdb.38119
+QUERY = select name from tables where 1=0;
+ERROR = !Could not create SQL allocator
+
+# 15:41:50 >  
+# 15:41:50 >  "Done."
+# 15:41:50 >  
+
diff --git a/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.out 
b/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.out
@@ -0,0 +1,32 @@
+stdout of test 'setmemorylimit-fail` in directory 'sql/test/malloc_fail` 
itself:
+
+
+# 15:41:50 >  
+# 15:41:50 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=38119" "--set" 
"mapi_usock=/var/tmp/mtest-56431/.s.monetdb.38119" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/Users/hannes/monetdb-install/var/MonetDB/mTests_sql_test_malloc_fail"
+# 15:41:50 >  
+
+# MonetDB 5 server v11.24.0
+# This is an unreleased version
+# Serving database 'mTests_sql_test_malloc_fail', using 4 threads
+# Compiled for x86_64-apple-darwin15.5.0/64bit with 128bit integers
+# Found 16.000 GiB available main-memory.
+# 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://dakar.da.cwi.nl:38119/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-56431/.s.monetdb.38119
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+!Memory allocation failed.
+
+# 15:41:50 >  
+# 15:41:50 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-56431" "--port=38119"
+# 15:41:50 >  
+
+
+# 15:41:50 >  
+# 15:41:50 >  "Done."
+# 15:41:50 >  
+
diff --git a/sql/test/malloc_fail/Tests/setmemorylimit-fail2.sql 
b/sql/test/malloc_fail/Tests/setmemorylimit-fail2.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/malloc_fail/Tests/setmemorylimit-fail2.sql
@@ -0,0 +1,3 @@
+create procedure setmemorylimit(nbytes BIGINT) external name 
"io"."setmemorylimit";
+call setmemorylimit(0);
+select name from tables where 1=0;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - changed semantics of memory limit to only fai...

2016-07-19 Thread Hannes Muehleisen
Changeset: 95fbd5f0b4a0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=95fbd5f0b4a0
Modified Files:
gdk/gdk_utils.c
gdk/gdk_utils.h
monetdb5/mal/mal_instruction.c
monetdb5/modules/mal/mal_mapi.c
sql/backends/monet5/sql_scenario.c
sql/common/sql_list.c
sql/common/sql_mem.c
sql/server/rel_semantic.c
sql/storage/sql_catalog.c
sql/test/malloc_fail/Tests/All
sql/test/malloc_fail/Tests/setmemorylimit.sql
Branch: default
Log Message:

changed semantics of memory limit to only fail allocations larger than limit


diffs (158 lines):

diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -310,7 +310,7 @@ int GDK_vm_trim = 1;
  * fall-back for other compilers. */
 #include "gdk_atomic.h"
 static volatile ATOMIC_TYPE GDK_mallocedbytes_estimate = 0;
-static volatile ATOMIC_TYPE GDK_mallocedbytes_limit = 0;
+static volatile lng GDK_mallocedbytes_limit = -1;
 static volatile ATOMIC_TYPE GDK_vm_cursize = 0;
 #ifdef GDK_VM_KEEPHISTO
 volatile ATOMIC_TYPE GDK_vm_nallocs[MAX_BIT] = { 0 };
@@ -1682,7 +1682,7 @@ GDKmalloc_prefixsize(size_t size)
return s;
 }
 
-gdk_export void GDKsetmemorylimit(size_t nbytes) {
+gdk_export void GDKsetmemorylimit(lng nbytes) {
GDK_mallocedbytes_limit = nbytes;
 }
 
@@ -1706,8 +1706,7 @@ GDKmallocmax(size_t size, size_t *maxsiz
}
 #ifndef NDEBUG
/* fail malloc for testing purposes depending on set limit */
-   if (GDK_mallocedbytes_limit > 0 &&
-   (GDK_mallocedbytes_estimate + size + 
MALLOC_EXTRA_SPACE) > GDK_mallocedbytes_limit) {
+   if (GDK_mallocedbytes_limit >= 0 && size >(size_t) 
GDK_mallocedbytes_limit) {
return NULL;
}
 #endif
diff --git a/gdk/gdk_utils.h b/gdk/gdk_utils.h
--- a/gdk/gdk_utils.h
+++ b/gdk/gdk_utils.h
@@ -81,7 +81,7 @@ gdk_export void MT_init(void);/*  init 
 gdk_export int GDKinit(opt *set, int setlen);
 
 /* used for testing only */
-gdk_export void GDKsetmemorylimit(size_t nbytes);
+gdk_export void GDKsetmemorylimit(lng nbytes);
 
 /*
  * Upon closing the session, all persistent BATs should be saved and
diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -1543,6 +1543,8 @@ pushEndInstruction(MalBlkPtr mb)
 
p = newInstruction(mb, ENDsymbol);
if (!p) {
+   mb->errors++;
+   showException(GDKout, MAL, "pushEndInstruction", "failed to 
create instruction (out of memory?)");
return;
}
p->argc = 0;
diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.c
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -367,8 +367,9 @@ SERVERlistenThread(SOCKET *Sock)
data = GDKmalloc(sizeof(*data));
if (!data) {
closesocket(msgsock);
-   msg = "memory allocation failed";
-   goto error;
+   showException(GDKstdout, MAL, "initClient",
+ "cannot allocate memory");
+   continue;
}
data->in = socket_rastream(msgsock, "Server read");
data->out = socket_wastream(msgsock, "Server write");
diff --git a/sql/backends/monet5/sql_scenario.c 
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -936,6 +936,12 @@ SQLparser(Client c)
 * this point if this is a recursive call. */
if (!m->sa)
m->sa = sa_create();
+   if (!m->sa) {
+   mnstr_printf(out, "!Could not create SQL allocator\n");
+   mnstr_flush(out);
+   c->mode = FINISHCLIENT;
+   throw(SQL, "SQLparser", "Could not create SQL allocator");
+   }
 
m->emode = m_normal;
m->emod = mod_none;
diff --git a/sql/common/sql_list.c b/sql/common/sql_list.c
--- a/sql/common/sql_list.c
+++ b/sql/common/sql_list.c
@@ -24,6 +24,9 @@ list *
 list_create(fdestroy destroy)
 {
list *l = MNEW(list);
+   if (!l) {
+   return NULL;
+   }
 
l->sa = NULL;
l->destroy = destroy;
diff --git a/sql/common/sql_mem.c b/sql/common/sql_mem.c
--- a/sql/common/sql_mem.c
+++ b/sql/common/sql_mem.c
@@ -44,7 +44,9 @@ sql_ref_dec(sql_ref *r)
 sql_allocator *sa_create(void)
 {
sql_allocator *sa = MNEW(sql_allocator);
-   
+   if (!sa) {
+   return NULL;
+   }
sa->size = 64;
sa->nr = 1;
sa->blks = NEW_ARRAY(char*,sa->size);
diff --git a/sql/server/rel_semantic.c b/sql/server/rel_semantic.c
--- a/sql/server/rel_semantic.c
+++ b/sql/server/rel_semantic.c
@@ -43,6 +43,9 @@ rel_parse(mvc *m, sql_schema *s, char *q
 
b = 

MonetDB: mosaic - Merge with default

2016-07-19 Thread Martin Kersten
Changeset: 1262f3e47412 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1262f3e47412
Added Files:
sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.sql

sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.stable.err

sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.stable.out
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.sql
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.err

sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.err.int128
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out

sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
sql/test/malloc_fail/Tests/All
sql/test/malloc_fail/Tests/setmemorylimit.sql
sql/test/malloc_fail/Tests/setmemorylimit.stable.err
sql/test/malloc_fail/Tests/setmemorylimit.stable.out
Removed Files:
monetdb5/mal/Tests/recycle00.malC
monetdb5/mal/Tests/recycle00.stable.err
monetdb5/mal/Tests/recycle00.stable.out
monetdb5/mal/Tests/recycle01.malC
monetdb5/mal/Tests/recycle01.stable.err
monetdb5/mal/Tests/recycle01.stable.out
monetdb5/mal/Tests/recycle02.malC
monetdb5/mal/Tests/recycle02.stable.err
monetdb5/mal/Tests/recycle02.stable.out
monetdb5/mal/Tests/recycle03.malC
monetdb5/mal/Tests/recycle03.stable.err
monetdb5/mal/Tests/recycle03.stable.out
monetdb5/mal/Tests/recycle04.malC
monetdb5/mal/Tests/recycle04.stable.err
monetdb5/mal/Tests/recycle04.stable.out
monetdb5/mal/Tests/recycle05.malC
monetdb5/mal/Tests/recycle05.stable.err
monetdb5/mal/Tests/recycle05.stable.out
monetdb5/mal/Tests/recycle07.malC
monetdb5/mal/Tests/recycle07.stable.err
monetdb5/mal/Tests/recycle07.stable.out
monetdb5/mal/Tests/recycle08.malC
monetdb5/mal/Tests/recycle08.stable.err
monetdb5/mal/Tests/recycle08.stable.out
monetdb5/mal/Tests/recycle10.malC
monetdb5/mal/Tests/recycle10.stable.err
monetdb5/mal/Tests/recycle10.stable.out
monetdb5/mal/Tests/recycle11.malC
monetdb5/mal/Tests/recycle11.stable.err
monetdb5/mal/Tests/recycle11.stable.out
monetdb5/mal/Tests/recycle12.malC
monetdb5/mal/Tests/recycle12.stable.err
monetdb5/mal/Tests/recycle12.stable.out
monetdb5/mal/mal_recycle.c
monetdb5/mal/mal_recycle.h
monetdb5/modules/mal/recycle.c
monetdb5/modules/mal/recycle.h
monetdb5/modules/mal/recycle.mal
monetdb5/optimizer/opt_recycler.c
monetdb5/optimizer/opt_recycler.h
sql/test/BugTracker-2009/Tests/table-leftovers.SF-2779462.sql
sql/test/BugTracker-2009/Tests/table-leftovers.SF-2779462.stable.err
sql/test/BugTracker-2009/Tests/table-leftovers.SF-2779462.stable.out

sql/test/BugTracker-2010/Tests/offset_limited_32bit.SF-2950579.stable.err.oid32

sql/test/BugTracker-2010/Tests/offset_limited_32bit.SF-2950579.stable.out.oid32
sql/test/pg_regress/Tests/oid.stable.err.64bit.oid32
sql/test/pg_regress/Tests/oid.stable.err.Windows.oid32
sql/test/pg_regress/Tests/oid.stable.err.oid32.int128
sql/test/pg_regress/Tests/oid.stable.out.oid32
sql/test/pg_regress/Tests/without_oid.stable.out.oid32
sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.oid32
sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.oid32
Modified Files:
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
buildtools/ChangeLog
clients/Tests/All
clients/Tests/exports.stable.out
configure.ag
gdk/gdk.h
gdk/gdk_utils.c
gdk/gdk_utils.h
java/tests/Test_CisValid.java
monetdb5/mal/Makefile.ag
monetdb5/mal/Tests/All
monetdb5/mal/mal.c
monetdb5/mal/mal.h
monetdb5/mal/mal_exception.c
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_instruction.h
monetdb5/mal/mal_interpreter.c
monetdb5/mal/mal_interpreter.h
monetdb5/mal/mal_runtime.c
monetdb5/modules/mal/Makefile.ag
monetdb5/modules/mal/mal_init.mal
monetdb5/modules/mal/mal_io.c
monetdb5/modules/mal/mal_io.h
monetdb5/modules/mal/mal_io.mal
monetdb5/modules/mal/mal_mapi.c
monetdb5/modules/mal/mdb.c
monetdb5/modules/mal/remote.c
monetdb5/optimizer/Makefile.ag
monetdb5/optimizer/opt_pipes.c
monetdb5/optimizer/opt_prelude.c
monetdb5/optimizer/opt_prelude.h
monetdb5/optimizer/opt_support.c
monetdb5/optimizer/opt_wrapper.c
sql/ChangeLog
sql/backends/monet5/sql.c
sql/backends/monet5/sql_optimizer.c

MonetDB: mosaic - Approve output

2016-07-19 Thread Martin Kersten
Changeset: 31198df95014 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=31198df95014
Modified Files:
clients/Tests/exports.stable.out

sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out
sql/test/BugTracker-2016/Tests/storagemodel.stable.out
sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit
Branch: mosaic
Log Message:

Approve output


diffs (truncated from 628 to 300 lines):

diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -262,6 +262,8 @@ gdk_return GDKreleasemmap(void *ptr, siz
 gdk_return GDKreleasesem(int sem_id, str *msg);
 void GDKreset(int status);
 void GDKsetenv(str name, str value);
+void GDKsetmemorylimit(size_t nbytes);
+void GDKsetmemorylimit(size_t nbytes){ GDK_mallocedbytes_limit = nbytes;
 ssize_t GDKstrFromStr(unsigned char *dst, const unsigned char *src, ssize_t 
len);
 str GDKstrdup(const char *s) __attribute__((__warn_unused_result__));
 str GDKstrndup(const char *s, size_t n) 
__attribute__((__warn_unused_result__));
@@ -1210,6 +1212,7 @@ str IOimport(void *ret, bat *bid, str *f
 str IOprint_val(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
 str IOprintf(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str IOprintfStream(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+str IOsetmemorylimit(void *res, lng *nbytes);
 str IOtable(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str ITRbunIterator(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str ITRbunNext(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
diff --git 
a/sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out
 
b/sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out
--- 
a/sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out
+++ 
b/sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out
@@ -31,37 +31,37 @@ Ready.
 % clob # type
 % 133 # length
 function user.s2_1(A0:str):void;
-X_46:void := querylog.define("explain select name,func from functions 
where name like \\'%optimizers%\\';","sequential_pipe",33);
-X_25 := bat.new(nil:str);
-X_32 := bat.append(X_25,"sys.functions");
-X_40 := bat.append(X_32,"sys.functions");
-X_27 := bat.new(nil:str);
-X_34 := bat.append(X_27,"name");
-X_41 := bat.append(X_34,"func");
-X_28 := bat.new(nil:str);
-X_35 := bat.append(X_28,"varchar");
-X_42 := bat.append(X_35,"varchar");
-X_29 := bat.new(nil:int);
-X_37 := bat.append(X_29,256);
-X_43 := bat.append(X_37,8196);
-X_31 := bat.new(nil:int);
-X_39 := bat.append(X_31,0);
-X_45 := bat.append(X_39,0);
-X_2 := sql.mvc();
-X_6:bat[:str] := sql.bind(X_2,"sys","functions","name",0);
-C_3:bat[:oid] := sql.tid(X_2,"sys","functions");
-C_63 := algebra.likesubselect(X_6,C_3,A0,"",false);
-(C_9,r1_9) := sql.bind(X_2,"sys","functions","name",2);
-C_64 := algebra.likesubselect(r1_9,nil:bat[:oid],A0,"",false);
-X_12:bat[:str] := sql.bind(X_2,"sys","functions","name",1);
-C_66 := algebra.likesubselect(X_12,C_3,A0,"",false);
-C_15 := sql.subdelta(C_63,C_3,C_9,C_64,C_66);
-X_17 := sql.projectdelta(C_15,X_6,C_9,r1_9,X_12);
-X_18:bat[:str] := sql.bind(X_2,"sys","functions","func",0);
-(C_20,r1_25) := sql.bind(X_2,"sys","functions","func",2);
-X_22:bat[:str] := sql.bind(X_2,"sys","functions","func",1);
-X_23 := sql.projectdelta(C_15,X_18,C_20,r1_25,X_22);
-sql.resultSet(X_40,X_41,X_42,X_43,X_45,X_17,X_23);
+X_53:void := querylog.define("explain select name,func from functions 
where name like \\'%optimizers%\\';","sequential_pipe",33);
+X_30 := bat.new(nil:str);
+X_37 := bat.append(X_30,"sys.functions");
+X_47 := bat.append(X_37,"sys.functions");
+X_32 := bat.new(nil:str);
+X_39 := bat.append(X_32,"name");
+X_48 := bat.append(X_39,"func");
+X_33 := bat.new(nil:str);
+X_41 := bat.append(X_33,"varchar");
+X_49 := bat.append(X_41,"varchar");
+X_34 := bat.new(nil:int);
+X_43 := bat.append(X_34,256);
+X_50 := bat.append(X_43,8196);
+X_36 := bat.new(nil:int);
+X_45 := bat.append(X_36,0);
+X_52 := bat.append(X_45,0);
+X_0 := sql.mvc();
+X_4:bat[:str] := sql.bind(X_0,"sys","functions","name",0);
+X_1:bat[:oid] := sql.tid(X_0,"sys","functions");
+X_64 := algebra.likesubselect(X_4,X_1,A0,"",false);
+(X_7,r1_9) := sql.bind(X_0,"sys","functions","name",2);
+X_65 := algebra.likesubselect(r1_9,nil:bat[:oid],A0,"",false);
+X_10:bat[:str] := sql.bind(X_0,"sys","functions","name",1);
+X_67 := algebra.likesubselect(X_10,X_1,A0,"",false);
+X_17 := sql.subdelta(X_64,X_1,X_7,X_65,X_67);
+X_20 := sql.projectdelta(X_17,X_4,X_7,r1_9,X_10);
+X_21:bat[:str] := 

MonetDB: mosaic - Merge with default

2016-07-19 Thread Martin Kersten
Changeset: 2ebc7396991d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ebc7396991d
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/Tests/exports.stable.out
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/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
monetdb5/mal/Tests/tst013.stable.err
monetdb5/mal/Tests/tst903.stable.out
monetdb5/mal/Tests/tst904.stable.out
monetdb5/mal/Tests/tst907.stable.out
monetdb5/mal/mal.h
monetdb5/mal/mal_builder.c
monetdb5/mal/mal_debugger.c
monetdb5/mal/mal_function.c
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_instruction.h
monetdb5/mal/mal_interpreter.c
monetdb5/mal/mal_listing.c
monetdb5/mal/mal_parser.c
monetdb5/mal/mal_session.c
monetdb5/mal/mal_type.c
monetdb5/mal/mal_type.h
monetdb5/modules/mal/Tests/inspect00.stable.out
monetdb5/modules/mal/Tests/inspect05.stable.out.int128
monetdb5/modules/mal/Tests/remote03.stable.err
monetdb5/modules/mal/Tests/remote03.stable.out
monetdb5/modules/mal/Tests/remote04.stable.out
monetdb5/optimizer/Tests/Mexample.stable.out
monetdb5/optimizer/Tests/dataflow.stable.out
monetdb5/optimizer/Tests/dataflow3.stable.out
monetdb5/optimizer/Tests/dataflow4.stable.out
monetdb5/optimizer/Tests/inline00.stable.out
monetdb5/optimizer/Tests/inline01.stable.out
monetdb5/optimizer/Tests/inline02.stable.out
monetdb5/optimizer/Tests/inline03.stable.out
monetdb5/optimizer/Tests/inline04.stable.out
monetdb5/optimizer/Tests/inline06.stable.out
monetdb5/optimizer/Tests/inline07.stable.out
monetdb5/optimizer/Tests/inline09.stable.out
monetdb5/optimizer/Tests/inline10.stable.out
monetdb5/optimizer/Tests/inline12.stable.out
monetdb5/optimizer/Tests/inlineCst.stable.out
monetdb5/optimizer/Tests/inlineFunction.stable.out
monetdb5/optimizer/Tests/inlineFunction1.stable.out
monetdb5/optimizer/Tests/inlineFunction2.stable.out
monetdb5/optimizer/Tests/inlineFunction3.stable.out
monetdb5/optimizer/Tests/inlineFunction4.stable.out
monetdb5/optimizer/Tests/manifold2.stable.out
monetdb5/optimizer/opt_dataflow.c
monetdb5/optimizer/opt_factorize.c
monetdb5/optimizer/opt_macro.c
monetdb5/optimizer/opt_mergetable.c
monetdb5/optimizer/opt_pushselect.c
monetdb5/optimizer/opt_querylog.c
monetdb5/optimizer/opt_remoteQueries.c
monetdb5/optimizer/opt_support.c
monetdb5/optimizer/opt_support.h
monetdb5/tools/libmonetdb5.rc
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out
sql/backends/monet5/UDF/pyapi/pyapi.c
sql/backends/monet5/sql_execute.c
sql/backends/monet5/sql_gencode.c
sql/backends/monet5/sql_optimizer.c
sql/benchmarks/ssbm/Tests/01-explain.stable.out
sql/benchmarks/ssbm/Tests/01-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/02-explain.stable.out
sql/benchmarks/ssbm/Tests/02-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/03-explain.stable.out
sql/benchmarks/ssbm/Tests/03-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/04-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/05-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/06-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/07-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/08-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/09-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/10-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/11-explain.stable.out
sql/benchmarks/ssbm/Tests/11-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/12-explain.stable.out
sql/benchmarks/ssbm/Tests/12-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/13-explain.stable.out

MonetDB: jit - merge default

2016-07-19 Thread Martin Kersten
Changeset: d717babc142a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d717babc142a
Added Files:
sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.sql

sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.stable.err

sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.stable.out
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.sql
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.err

sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.err.int128
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out

sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
sql/test/malloc_fail/Tests/All
sql/test/malloc_fail/Tests/setmemorylimit.sql
sql/test/malloc_fail/Tests/setmemorylimit.stable.err
sql/test/malloc_fail/Tests/setmemorylimit.stable.out
Removed Files:
monetdb5/mal/Tests/recycle00.malC
monetdb5/mal/Tests/recycle00.stable.err
monetdb5/mal/Tests/recycle00.stable.out
monetdb5/mal/Tests/recycle01.malC
monetdb5/mal/Tests/recycle01.stable.err
monetdb5/mal/Tests/recycle01.stable.out
monetdb5/mal/Tests/recycle02.malC
monetdb5/mal/Tests/recycle02.stable.err
monetdb5/mal/Tests/recycle02.stable.out
monetdb5/mal/Tests/recycle03.malC
monetdb5/mal/Tests/recycle03.stable.err
monetdb5/mal/Tests/recycle03.stable.out
monetdb5/mal/Tests/recycle04.malC
monetdb5/mal/Tests/recycle04.stable.err
monetdb5/mal/Tests/recycle04.stable.out
monetdb5/mal/Tests/recycle05.malC
monetdb5/mal/Tests/recycle05.stable.err
monetdb5/mal/Tests/recycle05.stable.out
monetdb5/mal/Tests/recycle07.malC
monetdb5/mal/Tests/recycle07.stable.err
monetdb5/mal/Tests/recycle07.stable.out
monetdb5/mal/Tests/recycle08.malC
monetdb5/mal/Tests/recycle08.stable.err
monetdb5/mal/Tests/recycle08.stable.out
monetdb5/mal/Tests/recycle10.malC
monetdb5/mal/Tests/recycle10.stable.err
monetdb5/mal/Tests/recycle10.stable.out
monetdb5/mal/Tests/recycle11.malC
monetdb5/mal/Tests/recycle11.stable.err
monetdb5/mal/Tests/recycle11.stable.out
monetdb5/mal/Tests/recycle12.malC
monetdb5/mal/Tests/recycle12.stable.err
monetdb5/mal/Tests/recycle12.stable.out
monetdb5/mal/mal_recycle.c
monetdb5/mal/mal_recycle.h
monetdb5/modules/mal/recycle.c
monetdb5/modules/mal/recycle.h
monetdb5/modules/mal/recycle.mal
monetdb5/optimizer/opt_recycler.c
monetdb5/optimizer/opt_recycler.h
sql/test/BugTracker-2009/Tests/table-leftovers.SF-2779462.sql
sql/test/BugTracker-2009/Tests/table-leftovers.SF-2779462.stable.err
sql/test/BugTracker-2009/Tests/table-leftovers.SF-2779462.stable.out

sql/test/BugTracker-2010/Tests/offset_limited_32bit.SF-2950579.stable.err.oid32

sql/test/BugTracker-2010/Tests/offset_limited_32bit.SF-2950579.stable.out.oid32
sql/test/pg_regress/Tests/oid.stable.err.64bit.oid32
sql/test/pg_regress/Tests/oid.stable.err.Windows.oid32
sql/test/pg_regress/Tests/oid.stable.err.oid32.int128
sql/test/pg_regress/Tests/oid.stable.out.oid32
sql/test/pg_regress/Tests/without_oid.stable.out.oid32
sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.oid32
sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.oid32
Modified Files:
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
buildtools/ChangeLog
clients/Tests/All
clients/Tests/exports.stable.out
configure.ag
gdk/gdk.h
gdk/gdk_utils.c
gdk/gdk_utils.h
java/tests/Test_CisValid.java
monetdb5/mal/Makefile.ag
monetdb5/mal/Tests/All
monetdb5/mal/mal.c
monetdb5/mal/mal.h
monetdb5/mal/mal_exception.c
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_instruction.h
monetdb5/mal/mal_interpreter.c
monetdb5/mal/mal_interpreter.h
monetdb5/mal/mal_runtime.c
monetdb5/modules/mal/Makefile.ag
monetdb5/modules/mal/mal_init.mal
monetdb5/modules/mal/mal_io.c
monetdb5/modules/mal/mal_io.h
monetdb5/modules/mal/mal_io.mal
monetdb5/modules/mal/mal_mapi.c
monetdb5/modules/mal/mdb.c
monetdb5/modules/mal/remote.c
monetdb5/optimizer/Makefile.ag
monetdb5/optimizer/opt_pipes.c
monetdb5/optimizer/opt_prelude.c
monetdb5/optimizer/opt_prelude.h
monetdb5/optimizer/opt_support.c
monetdb5/optimizer/opt_wrapper.c
sql/ChangeLog
sql/backends/monet5/sql.c
sql/backends/monet5/sql_optimizer.c

MonetDB: iot - Fix compilation on Windows

2016-07-19 Thread Martin Kersten
Changeset: c10daed3e4cb for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c10daed3e4cb
Modified Files:
sql/backends/monet5/Makefile.ag
sql/backends/monet5/iot/Makefile.ag
sql/backends/monet5/iot/Makefile.am
sql/backends/monet5/iot/basket.h
sql/backends/monet5/iot/iot.h
sql/backends/monet5/iot/petrinet.h
Branch: iot
Log Message:

Fix compilation on Windows


diffs (233 lines):

diff --git a/sql/backends/monet5/Makefile.ag b/sql/backends/monet5/Makefile.ag
--- a/sql/backends/monet5/Makefile.ag
+++ b/sql/backends/monet5/Makefile.ag
@@ -50,6 +50,7 @@ lib__sql = {
LIBS = ../../server/libsqlserver \
   ../../storage/libstore \
   ../../storage/bat/libbatstore \
+  ../../backends/monet5/iot/libiot \
   ../../common/libsqlcommon \
   ../../../monetdb5/tools/libmonetdb5 \
   ../../../gdk/libbat \
diff --git a/sql/backends/monet5/iot/Makefile.ag 
b/sql/backends/monet5/iot/Makefile.ag
--- a/sql/backends/monet5/iot/Makefile.ag
+++ b/sql/backends/monet5/iot/Makefile.ag
@@ -33,8 +33,8 @@ INCLUDES = .. \
../../../../common/utils \
../../../../gdk
 
-lib__iot = {
-   MODULE
+lib_iot = {
+   NOINST
DIR = libdir/monetdb5
SOURCES = iot.c iot.h \
basket.c basket.h \
diff --git a/sql/backends/monet5/iot/Makefile.am 
b/sql/backends/monet5/iot/Makefile.am
--- a/sql/backends/monet5/iot/Makefile.am
+++ b/sql/backends/monet5/iot/Makefile.am
@@ -49,26 +49,26 @@ install-exec-local-50_iot.sql: 50_iot.sq
 uninstall-local-50_iot.sql: 
$(RM) $(DESTDIR)$(libdir)/monetdb5/createdb/50_iot.sql
 
-lib_iot_la_CFLAGS=-DLIBIOT $(AM_CFLAGS)
-iotdir = $(libdir)/monetdb5
-lib_iot_la_LIBADD = ../../../../monetdb5/tools/libmonetdb5.la 
../../../../gdk/libbat.la
-$(do)install-iotLTLIBRARIES : 
-lib_iot_la-iot.lo: iot.c ../sql_optimizer.h ../sql_gencode.h 
../../../../monetdb5/optimizer/opt_prelude.h 
../../../../monetdb5/optimizer/opt_support.h 
../../../../monetdb5/optimizer/../mal/mal.h 
../../../../monetdb5/optimizer/../mal/mal_function.h 
../../../../monetdb5/optimizer/../mal/mal_scenario.h 
../../../../monetdb5/optimizer/../mal/mal_builder.h 
../../../../monetdb5/optimizer/opt_pipes.h 
../../../../monetdb5/optimizer/opt_iot.h basket.h 
../../../../monetdb5/mal/../../gdk/gdk.h ../../../../monetdb5/mal/mal.h 
../../../../monetdb5/mal/mal_interpreter.h ../sql.h iot.h 
../../../../monetdb5/mal/mal_resolve.h ../../../../monetdb5/mal/mal_profiler.h 
../../../../monetdb5/mal/mal_client.h ../sql_scenario.h petrinet.h
-   $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_iot_la_CFLAGS) $(CFLAGS) 
$(iot_CFLAGS) -c -o lib_iot_la-iot.lo `test -f 'iot.c' || echo 
'$(srcdir)/'`iot.c
-lib_iot_la-basket.lo: basket.c ../../../../gdk/gdk.h iot.h 
../../../../monetdb5/mal/../../gdk/gdk.h ../../../../monetdb5/mal/mal.h 
../../../../monetdb5/mal/mal_interpreter.h 
../../../../monetdb5/mal/mal_resolve.h ../../../../monetdb5/mal/mal_profiler.h 
../../../../monetdb5/mal/mal_client.h ../sql.h ../sql_scenario.h basket.h 
petrinet.h ../../../../monetdb5/mal/mal_instruction.h 
../../../../monetdb5/mal/mal_type.h ../../../../monetdb5/mal/mal_stack.h 
../../../../monetdb5/mal/mal_namespace.h ../../../../monetdb5/mal/mal_errors.h 
../../../../monetdb5/mal/mal_exception.h ../../../../monetdb5/mal/mal_builder.h 
../../../../monetdb5/optimizer/opt_support.h 
../../../../monetdb5/optimizer/../mal/mal.h 
../../../../monetdb5/optimizer/../mal/mal_function.h 
../../../../monetdb5/optimizer/../mal/mal_scenario.h 
../../../../monetdb5/optimizer/../mal/mal_builder.h 
../../../../monetdb5/optimizer/opt_prelude.h
-   $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_iot_la_CFLAGS) $(CFLAGS) 
$(basket_CFLAGS) -c -o lib_iot_la-basket.lo `test -f 'basket.c' || echo 
'$(srcdir)/'`basket.c
-lib_iot_la-petrinet.lo: petrinet.c iot.h 
../../../../monetdb5/mal/../../gdk/gdk.h ../../../../monetdb5/mal/mal.h 
../../../../monetdb5/mal/mal_interpreter.h 
../../../../monetdb5/mal/mal_resolve.h ../../../../monetdb5/mal/mal_profiler.h 
../../../../monetdb5/mal/mal_client.h ../sql.h ../sql_scenario.h petrinet.h 
basket.h ../../../../monetdb5/mal/mal_builder.h 
../../../../monetdb5/optimizer/opt_support.h 
../../../../monetdb5/optimizer/../mal/mal.h 
../../../../monetdb5/optimizer/../mal/mal_function.h 
../../../../monetdb5/optimizer/../mal/mal_scenario.h 
../../../../monetdb5/optimizer/../mal/mal_builder.h 
../../../../monetdb5/optimizer/opt_prelude.h
-   $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_iot_la_CFLAGS) $(CFLAGS) 
$(petrinet_CFLAGS) -c -o lib_iot_la-petrinet.lo `test -f 'petrinet.c' || echo 
'$(srcdir)/'`petrinet.c
-nodist_lib_iot_la_SOURCES =

MonetDB: default - Removed python-monetdb also from Debian/Ubunt...

2016-07-19 Thread Sjoerd Mullender
Changeset: be2816659598 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=be2816659598
Removed Files:
debian/python-monetdb.install
debian/python3-monetdb.install
Modified Files:
debian/control
debian/rules
Branch: default
Log Message:

Removed python-monetdb also from Debian/Ubuntu build config.
See also changeset 1f93f678faff.


diffs (113 lines):

diff --git a/debian/control b/debian/control
--- a/debian/control
+++ b/debian/control
@@ -8,11 +8,10 @@ Vcs-Hg: http://dev.monetdb.org/hg/MonetD
 Build-Depends: debhelper (>= 5), autotools-dev, bison, libatomic-ops-dev,
  libbam-dev, libbz2-dev, libcurl4-gnutls-dev, libgeos-dev (>= 3.4.0),
  libgsl0-dev, libpcre3-dev, libreadline-dev, liblzma-dev,
- libssl-dev, libxml2-dev, perl, pkg-config, python, python3,
+ libssl-dev, libxml2-dev, perl, pkg-config, python,
  unixodbc-dev, uuid-dev, zlib1g-dev, liblas-c-dev (>= 1.8.0), r-base
 Standards-Version: 3.8.0
 X-Python-Version: >= 2.6
-X-Python3-Version: >= 3.0
 
 Package: libmonetdb13
 Architecture: any
@@ -163,7 +162,7 @@ Depends: ${shlibs:Depends}, libmonetdb-c
  monetdb5-server (= ${source:Version}),
  perl-monetdb-client (= ${source:Version}),
  php5-monetdb-client (= ${source:Version}),
- python-monetdb (= ${source:Version}),
+ python-monetdb (>= 1.0),
  monetdb5-sql (= ${source:Version})
 Description: MonetDB client testing tools
  MonetDB is a database management system that is developed from a
@@ -344,32 +343,6 @@ Description: MonetDB testing Python prog
  you are a developer, but if you do want to test, this is the package
  you need.
 
-Package: python-monetdb
-Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}
-Description: Native MonetDB client Python API
- MonetDB is a database management system that is developed from a
- main-memory perspective with use of a fully decomposed storage model,
- automatic index management, extensibility of data types and search
- accelerators.  It also has an SQL frontend.
- .
- This package contains the files needed to use MonetDB from a Python
- program.  This package is for Python version 2.  If you want to use
- Python version 3, you need python3-monetdb.
-
-Package: python3-monetdb
-Architecture: all
-Depends: ${python3:Depends}, ${misc:Depends}
-Description: Native MonetDB client Python API
- MonetDB is a database management system that is developed from a
- main-memory perspective with use of a fully decomposed storage model,
- automatic index management, extensibility of data types and search
- accelerators.  It also has an SQL frontend.
- .
- This package contains the files needed to use MonetDB from a Python3
- program.  This package is for Python version 3.  If you want to use
- Python version 2, you need python-monetdb.
-
 Package: monetdb-dbg
 Architecture: any
 Section: debug
diff --git a/debian/python-monetdb.install b/debian/python-monetdb.install
deleted file mode 100644
--- a/debian/python-monetdb.install
+++ /dev/null
@@ -1,3 +0,0 @@
-# usr/lib/python2.*/*-packages/* EXCEPT: MonetDBtesting
-debian/tmp/usr/lib/python2.*/*-packages/monetdb/*
-debian/tmp/usr/lib/python2.*/*-packages/python_monetdb-*.egg-info
diff --git a/debian/python3-monetdb.install b/debian/python3-monetdb.install
deleted file mode 100644
--- a/debian/python3-monetdb.install
+++ /dev/null
@@ -1,3 +0,0 @@
-# usr/lib/python3.*/*-packages/* EXCEPT: MonetDBtesting
-debian/tmp/usr/lib/python3/*-packages/monetdb/*
-debian/tmp/usr/lib/python3/*-packages/python_monetdb-*.egg-info
diff --git a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,7 @@
 DH_VERBOSE=1
 
 %:
-   dh $@ --parallel --with python2,python3
+   dh $@ --parallel
 
 override_dh_auto_configure:
dh_auto_configure -- \
@@ -54,8 +54,7 @@ override_dh_auto_configure:
--with-perl-libdir=lib/perl5 \
--with-proj=no \
--with-pthread=yes \
-   --with-python2=yes \
-   --with-python3=yes \
+   --with-python=yes \
--with-readline=yes \
--with-samtools=yes \
--with-sphinxclient=no \
@@ -67,16 +66,5 @@ override_dh_auto_configure:
 # currently the test suite fails
 override_dh_auto_test:
 
-override_dh_clean:
-   dh_clean
-   cd clients/python2 && python setup.py clean
-   cd clients/python3 && python3 setup.py clean
-
-override_dh_python2:
-   dh_python2 clients/python2
-
-override_dh_python3:
-   dh_python3 clients/python3
-
 override_dh_strip:
dh_strip --dbg-package=monetdb-dbg
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Approve output

2016-07-19 Thread Martin Kersten
Changeset: fdd3562dc126 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fdd3562dc126
Modified Files:
clients/Tests/exports.stable.out
sql/test/BugTracker-2016/Tests/storagemodel.stable.out
sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit
Branch: default
Log Message:

Approve output


diffs (57 lines):

diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -260,6 +260,8 @@ gdk_return GDKreleasemmap(void *ptr, siz
 gdk_return GDKreleasesem(int sem_id, str *msg);
 void GDKreset(int status);
 void GDKsetenv(str name, str value);
+void GDKsetmemorylimit(size_t nbytes);
+void GDKsetmemorylimit(size_t nbytes){ GDK_mallocedbytes_limit = nbytes;
 ssize_t GDKstrFromStr(unsigned char *dst, const unsigned char *src, ssize_t 
len);
 str GDKstrdup(const char *s) __attribute__((__warn_unused_result__));
 str GDKstrndup(const char *s, size_t n) 
__attribute__((__warn_unused_result__));
@@ -1201,6 +1203,7 @@ str IOimport(void *ret, bat *bid, str *f
 str IOprint_val(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
 str IOprintf(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str IOprintfStream(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+str IOsetmemorylimit(void *res, lng *nbytes);
 str IOtable(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str ITRbunIterator(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str ITRbunNext(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out 
b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out
--- a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out
+++ b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out
@@ -74,7 +74,7 @@ Ready.
 [ "sys",   "_tables",  "id",   "int",  "writable", 4,  0,  
false,  0,  true]
 [ "sys",   "_tables",  "name", "varchar",  "writable", 8,  
0,  false,  0,  false   ]
 [ "sys",   "_tables",  "schema_id","int",  "writable", 4,  
0,  false,  0,  false   ]
-[ "sys",   "_tables",  "query","varchar",  "writable", 
45, 0,  false,  0,  false   ]
+[ "sys",   "_tables",  "query","varchar",  "writable", 
34, 0,  false,  0,  false   ]
 [ "sys",   "_tables",  "type", "smallint", "writable", 2,  
0,  false,  0,  false   ]
 [ "sys",   "_tables",  "system",   "boolean",  "writable", 
1,  0,  false,  0,  false   ]
 [ "sys",   "_tables",  "commit_action","smallint", 
"writable", 2,  0,  false,  0,  false   ]
@@ -96,10 +96,10 @@ Ready.
 % schema,  table,  column, type,   mode,   typewidth,  hashes, phash,  
imprints,   sorted # name
 % clob,clob,   clob,   clob,   clob,   int,bigint, boolean,
bigint, boolean # type
 % 3,   7,  13, 8,  8,  2,  4,  5,  1,  5 # 
length
-[ "sys",   "_tables",  "id",   "int",  "writable", 4,  2600,   
false,  0,  false   ]
+[ "sys",   "_tables",  "id",   "int",  "writable", 4,  1064,   
false,  0,  false   ]
 [ "sys",   "_tables",  "name", "varchar",  "writable", 8,  
0,  false,  0,  false   ]
 [ "sys",   "_tables",  "schema_id","int",  "writable", 4,  
0,  false,  0,  false   ]
-[ "sys",   "_tables",  "query","varchar",  "writable", 
45, 0,  false,  0,  false   ]
+[ "sys",   "_tables",  "query","varchar",  "writable", 
33, 0,  false,  0,  false   ]
 [ "sys",   "_tables",  "type", "smallint", "writable", 2,  
0,  false,  0,  false   ]
 [ "sys",   "_tables",  "system",   "boolean",  "writable", 
1,  0,  false,  0,  false   ]
 [ "sys",   "_tables",  "commit_action","smallint", 
"writable", 2,  0,  false,  0,  false   ]
diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit 
b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit
--- a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit
+++ b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit
@@ -74,7 +74,7 @@ Ready.
 [ "sys",   "_tables",  "id",   "int",  "writable", 4,  0,  
false,  0,  true]
 [ "sys",   "_tables",  "name", "varchar",  "writable", 8,  
0,  false,  0,  false   ]
 [ "sys",   "_tables",  "schema_id","int",  "writable", 4,  
0,  false,  0,  false   ]
-[ "sys",   "_tables",  "query","varchar",  "writable", 
45, 0,  false,  0,  false   ]
+[ "sys",   "_tables", 

MonetDB: default - newline

2016-07-19 Thread Hannes Muehleisen
Changeset: d23c1aef84ae for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d23c1aef84ae
Modified Files:
monetdb5/modules/mal/mal_io.mal
Branch: default
Log Message:

newline


diffs (10 lines):

diff --git a/monetdb5/modules/mal/mal_io.mal b/monetdb5/modules/mal/mal_io.mal
--- a/monetdb5/modules/mal/mal_io.mal
+++ b/monetdb5/modules/mal/mal_io.mal
@@ -64,4 +64,4 @@ comment "Import a BAT from an ASCII dump
 # used for testing malloc failures
 command setmemorylimit(nbytes:lng):void
 address IOsetmemorylimit
-comment "Set memory limit for testing";
\ No newline at end of file
+comment "Set memory limit for testing";
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - first test case using memory allocation limit...

2016-07-19 Thread Hannes Muehleisen
Changeset: 946681f654d8 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=946681f654d8
Added Files:
sql/test/malloc_fail/Tests/All
sql/test/malloc_fail/Tests/setmemorylimit.sql
sql/test/malloc_fail/Tests/setmemorylimit.stable.err
sql/test/malloc_fail/Tests/setmemorylimit.stable.out
Branch: default
Log Message:

first test case using memory allocation limit, for now all is well


diffs (137 lines):

diff --git a/sql/test/malloc_fail/Tests/All b/sql/test/malloc_fail/Tests/All
new file mode 100644
--- /dev/null
+++ b/sql/test/malloc_fail/Tests/All
@@ -0,0 +1,1 @@
+setmemorylimit
diff --git a/sql/test/malloc_fail/Tests/setmemorylimit.sql 
b/sql/test/malloc_fail/Tests/setmemorylimit.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/malloc_fail/Tests/setmemorylimit.sql
@@ -0,0 +1,7 @@
+create procedure setmemorylimit(nbytes BIGINT) external name 
"io"."setmemorylimit";
+call setmemorylimit(0);
+call setmemorylimit(1);
+-- this should work fine
+select name from tables where 1=0;
+call setmemorylimit(0);
+drop procedure setmemorylimit;
diff --git a/sql/test/malloc_fail/Tests/setmemorylimit.stable.err 
b/sql/test/malloc_fail/Tests/setmemorylimit.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/malloc_fail/Tests/setmemorylimit.stable.err
@@ -0,0 +1,34 @@
+stderr of test 'setmemorylimit` in directory 'sql/test/malloc_fail` itself:
+
+
+# 11:39:58 >  
+# 11:39:58 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=36345" "--set" 
"mapi_usock=/var/tmp/mtest-21164/.s.monetdb.36345" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/Users/hannes/monetdb-install/var/MonetDB/mTests_sql_test_malloc_fail"
+# 11:39:58 >  
+
+# builtin opt  gdk_dbpath = 
/Users/hannes/monetdb-install/var/monetdb5/dbfarm/demo
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_vmtrim = no
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 5
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 36345
+# cmdline opt  mapi_usock = /var/tmp/mtest-21164/.s.monetdb.36345
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/Users/hannes/monetdb-install/var/MonetDB/mTests_sql_test_malloc_fail
+# cmdline opt  gdk_debug = 536870922
+
+# 11:39:58 >  
+# 11:39:58 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-21164" "--port=36345"
+# 11:39:58 >  
+
+
+# 11:39:59 >  
+# 11:39:59 >  "Done."
+# 11:39:59 >  
+
diff --git a/sql/test/malloc_fail/Tests/setmemorylimit.stable.out 
b/sql/test/malloc_fail/Tests/setmemorylimit.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/malloc_fail/Tests/setmemorylimit.stable.out
@@ -0,0 +1,75 @@
+stdout of test 'setmemorylimit` in directory 'sql/test/malloc_fail` itself:
+
+
+# 11:39:58 >  
+# 11:39:58 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=36345" "--set" 
"mapi_usock=/var/tmp/mtest-21164/.s.monetdb.36345" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/Users/hannes/monetdb-install/var/MonetDB/mTests_sql_test_malloc_fail"
+# 11:39:58 >  
+
+# MonetDB 5 server v11.24.0
+# This is an unreleased version
+# Serving database 'mTests_sql_test_malloc_fail', using 4 threads
+# Compiled for x86_64-apple-darwin15.5.0/64bit with 128bit integers
+# Found 16.000 GiB available main-memory.
+# 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://dakar.da.cwi.nl:36345/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-21164/.s.monetdb.36345
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 10_math.sql
+# loading sql script: 11_times.sql
+# loading sql script: 12_url.sql
+# loading sql script: 13_date.sql
+# loading sql script: 14_inet.sql
+# loading sql script: 15_querylog.sql
+# loading sql script: 16_tracelog.sql
+# loading sql script: 17_temporal.sql
+# loading sql script: 18_index.sql
+# loading sql script: 20_vacuum.sql
+# loading sql script: 21_dependency_functions.sql
+# loading sql script: 22_clients.sql
+# loading sql script: 23_skyserver.sql
+# loading sql script: 24_zorder.sql
+# loading sql script: 25_debug.sql
+# loading sql script: 26_sysmon.sql
+# loading sql script: 27_rejects.sql
+# loading sql script: 39_analytics.sql
+# loading sql script: 39_analytics_hge.sql
+# loading sql script: 40_geom.sql
+# loading sql script: 40_json.sql
+# loading sql script: 40_json_hge.sql
+# loading sql script: 41_md5sum.sql
+# loading sql script: 45_uuid.sql
+# loading 

MonetDB: default - fixed crash on malloc failure

2016-07-19 Thread Hannes Muehleisen
Changeset: 9c5b7d0a3f58 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9c5b7d0a3f58
Modified Files:
monetdb5/mal/mal_exception.c
monetdb5/mal/mal_instruction.c
Branch: default
Log Message:

fixed crash on malloc failure


diffs (39 lines):

diff --git a/monetdb5/mal/mal_exception.c b/monetdb5/mal/mal_exception.c
--- a/monetdb5/mal/mal_exception.c
+++ b/monetdb5/mal/mal_exception.c
@@ -141,7 +141,9 @@ showException(stream *out, enum malexcep
va_end(ap);
 
dumpExceptionsToStream(out, msg);
-   GDKfree(msg);
+   if (msg && msg != M5OutOfMemory) {
+   GDKfree(msg);
+   }
 }
 
 /**
diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -410,8 +410,10 @@ newInstruction(MalBlkPtr mb, int kind)
}
if (p == NULL) {
p = GDKzalloc(MAXARG * sizeof(p->argv[0]) + 
offsetof(InstrRecord, argv));
-   if (p == NULL)
+   if (p == NULL) {
+   showException(GDKout, MAL, "pushEndInstruction", 
"memory allocation failure");
return NULL;
+   }
p->maxarg = MAXARG;
}
p->typechk = TYPE_UNKNOWN;
@@ -1540,6 +1542,9 @@ pushEndInstruction(MalBlkPtr mb)
InstrPtr p;
 
p = newInstruction(mb, ENDsymbol);
+   if (!p) {
+   return;
+   }
p->argc = 0;
p->retc = 0;
p->argv[0] = 0;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - fix compiler warning with clang

2016-07-19 Thread Hannes Muehleisen
Changeset: 9f7fbbf9727c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9f7fbbf9727c
Modified Files:
monetdb5/mal/mal_instruction.c
Branch: default
Log Message:

fix compiler warning with clang


diffs (12 lines):

diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -600,7 +600,7 @@ findVariableLength(MalBlkPtr mb, str nam
int j;
 
for (i = mb->vtop - 1; i >= 0; i--)
-   if (mb->var[i] && mb->var[i]->id) {
+   if (mb->var[i]) { /* mb->var[i]->id will always evaluate to 
true */
str s = mb->var[i]->id;
 
j = 0;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - method to set a memory limit after which mall...

2016-07-19 Thread Hannes Muehleisen
Changeset: 1f5a6fd13a28 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1f5a6fd13a28
Modified Files:
gdk/gdk_utils.c
gdk/gdk_utils.h
monetdb5/modules/mal/mal_io.c
monetdb5/modules/mal/mal_io.h
monetdb5/modules/mal/mal_io.mal
Branch: default
Log Message:

method to set a memory limit after which malloc fails for testing purposes


diffs (97 lines):

diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -310,6 +310,7 @@ int GDK_vm_trim = 1;
  * fall-back for other compilers. */
 #include "gdk_atomic.h"
 static volatile ATOMIC_TYPE GDK_mallocedbytes_estimate = 0;
+static volatile ATOMIC_TYPE GDK_mallocedbytes_limit = 0;
 static volatile ATOMIC_TYPE GDK_vm_cursize = 0;
 #ifdef GDK_VM_KEEPHISTO
 volatile ATOMIC_TYPE GDK_vm_nallocs[MAX_BIT] = { 0 };
@@ -1681,6 +1682,11 @@ GDKmalloc_prefixsize(size_t size)
return s;
 }
 
+gdk_export void GDKsetmemorylimit(size_t nbytes) {
+   GDK_mallocedbytes_limit = nbytes;
+}
+
+
 /*
  * The emergency flag can be set to force a fatal error if needed.
  * Otherwise, the caller is able to deal with the lack of memory.
@@ -1698,6 +1704,13 @@ GDKmallocmax(size_t size, size_t *maxsiz
GDKfatal("GDKmallocmax: called with size " SZFMT "", size);
 #endif
}
+#ifndef NDEBUG
+   /* fail malloc for testing purposes depending on set limit */
+   if (GDK_mallocedbytes_limit > 0 &&
+   (GDK_mallocedbytes_estimate + size + 
MALLOC_EXTRA_SPACE) > GDK_mallocedbytes_limit) {
+   return NULL;
+   }
+#endif
size = (size + 7) & ~7; /* round up to a multiple of eight */
s = GDKmalloc_prefixsize(size);
if (s == NULL) {
@@ -1710,6 +1723,7 @@ GDKmallocmax(size_t size, size_t *maxsiz
}
GDKfatal("GDKmallocmax: failed for " SZFMT " bytes", 
size);
} else {
+   /* TODO why are we printing this on stderr? */
fprintf(stderr, "#GDKmallocmax: recovery ok. 
Continuing..\n");
}
}
diff --git a/gdk/gdk_utils.h b/gdk/gdk_utils.h
--- a/gdk/gdk_utils.h
+++ b/gdk/gdk_utils.h
@@ -80,6 +80,9 @@ gdk_export size_t _MT_pagesize;
 gdk_export void MT_init(void); /*  init the package. */
 gdk_export int GDKinit(opt *set, int setlen);
 
+/* used for testing only */
+gdk_export void GDKsetmemorylimit(size_t nbytes);
+
 /*
  * Upon closing the session, all persistent BATs should be saved and
  * the transient BATs should be removed.  The buffer pool manager
diff --git a/monetdb5/modules/mal/mal_io.c b/monetdb5/modules/mal/mal_io.c
--- a/monetdb5/modules/mal/mal_io.c
+++ b/monetdb5/modules/mal/mal_io.c
@@ -776,3 +776,11 @@ IOimport(void *ret, bat *bid, str *fnme)
return MAL_SUCCEED;
 }
 
+
+
+str
+IOsetmemorylimit(void *res, lng *nbytes) {
+   (void) res;
+   GDKsetmemorylimit(*nbytes);
+   return MAL_SUCCEED;
+}
diff --git a/monetdb5/modules/mal/mal_io.h b/monetdb5/modules/mal/mal_io.h
--- a/monetdb5/modules/mal/mal_io.h
+++ b/monetdb5/modules/mal/mal_io.h
@@ -28,4 +28,7 @@ mal_export str IOimport(void *ret, bat *
 mal_export str io_stdin(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
 mal_export str io_stdout(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
 mal_export str io_stderr(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
+
+mal_export str IOsetmemorylimit(void *res, lng *nbytes);
+
 #endif /* _PRINT_H_ */
diff --git a/monetdb5/modules/mal/mal_io.mal b/monetdb5/modules/mal/mal_io.mal
--- a/monetdb5/modules/mal/mal_io.mal
+++ b/monetdb5/modules/mal/mal_io.mal
@@ -60,3 +60,8 @@ address IOimport
 comment "Import a BAT from an ASCII dump. The tuples are appended to the
  first argument. Its signature must match the dump,
  else parsing errors will occur as an exception.";
+
+# used for testing malloc failures
+command setmemorylimit(nbytes:lng):void
+address IOsetmemorylimit
+comment "Set memory limit for testing";
\ No newline at end of file
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - fixed crash in mapi code

2016-07-19 Thread Hannes Muehleisen
Changeset: 0c5dff585dd5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0c5dff585dd5
Modified Files:
monetdb5/modules/mal/mal_mapi.c
Branch: default
Log Message:

fixed crash in mapi code


diffs (15 lines):

diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.c
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -365,6 +365,11 @@ SERVERlistenThread(SOCKET *Sock)
fflush(stdout);
 #endif
data = GDKmalloc(sizeof(*data));
+   if (!data) {
+   closesocket(msgsock);
+   msg = "memory allocation failed";
+   goto error;
+   }
data->in = socket_rastream(msgsock, "Server read");
data->out = socket_wastream(msgsock, "Server write");
if (MT_create_thread(, doChallenge, data, MT_THR_JOINABLE)) 
{
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Jun2016 branch.

2016-07-19 Thread Stefan Manegold
Changeset: 14192af45225 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=14192af45225
Added Files:
sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.sql

sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.stable.err

sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.stable.out
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.sql
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.err

sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.err.int128
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out

sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
Modified Files:
java/tests/Test_CisValid.java
sql/jdbc/tests/Tests/Test_CisValid.stable.err
sql/test/BugTracker-2016/Tests/All
testing/Mtest.py.in
Branch: default
Log Message:

Merge with Jun2016 branch.


diffs (truncated from 23166 to 300 lines):

diff --git a/java/tests/Test_CisValid.java b/java/tests/Test_CisValid.java
--- a/java/tests/Test_CisValid.java
+++ b/java/tests/Test_CisValid.java
@@ -18,15 +18,23 @@ public class Test_CisValid {
Connection conn = DriverManager.getConnection(args[0]);
Statement stmt = conn.createStatement();
 
-   conn.setAutoCommit(false); // start a transaction
try {
+   conn.setAutoCommit(false); // start a transaction
stmt.execute("SELECT COUNT(*) FROM doesnotexist;"); // 
let's trigger an error
} catch (SQLException e) {
-   e.printStackTrace();
-   System.out.println("Validating connection: 
conn.isValid? " + conn.isValid(30)); // Can we rollback on this connection?
-   conn.rollback();
+   // e.printStackTrace();
+   System.err.println("Expected error: " + e);
+
+   try {
+   // test calling conn.isValid()
+   System.out.println("Validating connection: 
conn.isValid? " + conn.isValid(30));
+   // Can we rollback on this connection without 
causing an error?
+   conn.rollback();
+   } catch (SQLException e2) {
+   System.err.println("UnExpected error: " + e2);
+   }
}
-   
+
stmt.close();
conn.close();
}
diff --git a/sql/jdbc/tests/Tests/Test_CisValid.stable.err 
b/sql/jdbc/tests/Tests/Test_CisValid.stable.err
--- a/sql/jdbc/tests/Tests/Test_CisValid.stable.err
+++ b/sql/jdbc/tests/Tests/Test_CisValid.stable.err
@@ -35,12 +35,7 @@ stderr of test 'Test_CisValid` in direct
 # 23:03:08 >  java Test_CisValid 
"jdbc:monetdb://toulouse:36086/mTests_sql_jdbc_tests?user=monetdb=monetdb"
 # 23:03:08 >  
 
-java.sql.SQLException: SELECT: no such table 'doesnotexist'
-   at 
nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.executeQuery(MonetConnection.java:2602)
-   at 
nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.processQuery(MonetConnection.java:2350)
-   at 
nl.cwi.monetdb.jdbc.MonetStatement.internalExecute(MonetStatement.java:507)
-   at nl.cwi.monetdb.jdbc.MonetStatement.execute(MonetStatement.java:345)
-   at Test_CisValid.main(Test_CisValid.java:23)
+Expected error: java.sql.SQLException: SELECT: no such table 'doesnotexist'
 
 # 23:03:08 >  
 # 23:03:08 >  "Done."
diff --git a/sql/test/BugTracker-2016/Tests/All 
b/sql/test/BugTracker-2016/Tests/All
--- a/sql/test/BugTracker-2016/Tests/All
+++ b/sql/test/BugTracker-2016/Tests/All
@@ -1,3 +1,5 @@
+convert-function-test.Bug-3460
+HAVE_HGE?convert-function-test-hge.Bug-3460
 HAVE_GEOM?storagemodel
 LEFT-JOIN_with_OR_conditions_triggers_assertion.Bug-3908
 incorrect_column_name_in_OR_condition_of_LEFT-JOIN_crashes_mserver.Bug-3909
diff --git 
a/sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.sql 
b/sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.sql
@@ -0,0 +1,97 @@
+-- test SQL functions: convert(fromType, toType) and cast(fromType as toType) 
for all SQL data types and data values
+-- See also https://www.monetdb.org/bugzilla/show_bug.cgi?id=3460
+
+-- HUGEINT  (for int128 only)
+CREATE TABLE T_hugeint (v hugeint);
+INSERT into T_hugeint VALUES (1), (0), (-1), (-127), (127), (-32767), (32767), 
(-2147483647), (2147483647);
+INSERT into T_hugeint VALUES (null);
+SELECT v FROM T_hugeint ORDER BY v;
+
+-- test convert()
+SELECT v, convert(v, boolean) from T_hugeint;
+SELECT v, convert(v, bit) from T_hugeint; -- BIT not valid data type
+SELECT v, convert(v, tinyint) from 

MonetDB: default - Removed obsolete code associated with long go...

2016-07-19 Thread Stefan Manegold
Changeset: 000462218c3f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=000462218c3f
Modified Files:
buildtools/ChangeLog
testing/Mtest.py.in
tools/mserver/monet_version.c.in
tools/mserver/mserver5.c
Branch: default
Log Message:

Removed obsolete code associated with long gone static linking option.


diffs (259 lines):

diff --git a/buildtools/ChangeLog b/buildtools/ChangeLog
--- a/buildtools/ChangeLog
+++ b/buildtools/ChangeLog
@@ -1,6 +1,9 @@
 # ChangeLog file for buildtools
 # This file is updated with Maddlog
 
+* Tue Jul 19 2016 Stefan Manegold 
+- Removed obsolete code associated with long gone static linking option.
+
 * Mon Jul 18 2016 Sjoerd Mullender 
 - Removed configure option --enable-oid32 to compile with 32 bit OIDs
   on a 64 bit architecture.
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1525,7 +1525,7 @@ def returnCode(proc, f = None):
 return 'error'
 return None # no error
 
-def GetBitsAndOIDsAndModsAndStaticAndThreads(env) :
+def GetBitsAndOIDsAndModsAndThreads(env) :
 global setpgrp
 rtrn = 0
 cmd = splitcommand(env['exe']['Mserver'][1])
@@ -1536,7 +1536,7 @@ def GetBitsAndOIDsAndModsAndStaticAndThr
   ignore_errors = True)
 os.makedirs(os.path.join(env['GDK_DBFARM'], TSTPREF + '_transient'))
 if procdebug:
-print('GetBitsAndOIDsAndModsAndStaticAndThreads: starting process "%s" 
(inpipe, outpipe, errpipe)\n' % '" "'.join(cmd))
+print('GetBitsAndOIDsAndModsAndThreads: starting process "%s" (inpipe, 
outpipe, errpipe)\n' % '" "'.join(cmd))
 setpgrp = True
 proc = process.Popen(cmd, stdin = process.PIPE, stdout = process.PIPE,
  stderr = process.PIPE, universal_newlines = True)
@@ -1566,12 +1566,12 @@ def GetBitsAndOIDsAndModsAndStaticAndThr
 qOut, qErr = proc.communicate(input = input)
 t.cancel()
 if procdebug:
-print('GetBitsAndOIDsAndModsAndStaticAndThreads: process exited 
"%s" (%s)\n' % ('" "'.join(cmd), proc.returncode))
+print('GetBitsAndOIDsAndModsAndThreads: process exited "%s" 
(%s)\n' % ('" "'.join(cmd), proc.returncode))
 except KeyboardInterrupt:
 t.cancel()
 killProc(proc, proc.stderr, cmd)
 if procdebug:
-print('GetBitsAndOIDsAndModsAndStaticAndThreads: process killed 
"%s"\n' % '" "'.join(cmd))
+print('GetBitsAndOIDsAndModsAndThreads: process killed "%s"\n' % 
'" "'.join(cmd))
 raise
 returncode = returnCode(proc)
 if returncode is not None:
@@ -1586,18 +1586,16 @@ def GetBitsAndOIDsAndModsAndStaticAndThr
 STDERR.write(qErr)
 STDERR.write("\n")
 STDERR.flush()
-ErrExit('GetBitsAndOIDsAndModsAndStaticAndThreads: subcommand failed: 
%s' % returncode)
+ErrExit('GetBitsAndOIDsAndModsAndThreads: subcommand failed: %s' % 
returncode)
 env['TST_MODS'] = []
 env['TST_BITS'] = ""
 env['TST_INT128'] = ""
-env['TST_STATIC'] = ""
 env['TST_SINGLE'] = ""
 env['TST_THREADS'] = ""
 if qOut:
-tbos = re.compile("^# Compiled for .*/([63][42]bit) with ([63][42])bit 
OIDs;?(| and 128bit integers) ([^ ]*) linked", re.MULTILINE)
+tbos = re.compile("^# Compiled for .*/([63][42]bit) with ([63][42])bit 
OIDs;?( and 128bit integers|)", re.MULTILINE)
 tt = re.compile("^# Serving database .*, using ([0-9]+) threads?", 
re.MULTILINE)
 tm = re.compile("^Modules: (.+)$", re.MULTILINE)
-#ts = re.compile("^!ERROR: DL_open: library not found \(STATIC\).$", 
re.MULTILINE)
 for l in qOut.split('\n'):
 obs = tbos.match(l)
 if obs:
@@ -1606,9 +1604,6 @@ def GetBitsAndOIDsAndModsAndStaticAndThr
 if obs.group(3) == " and 128bit integers":
 env['TST_INT128'] = "int128"
 os.environ['TST_INT128'] = env['TST_INT128']
-if obs.group(4) == "statically":
-env['TST_STATIC'] = "STATIC"
-os.environ['TST_STATIC'] = env['TST_STATIC']
 t = tt.match(l)
 if t:
 if t.group(1) == "1":
@@ -1618,10 +1613,6 @@ def GetBitsAndOIDsAndModsAndStaticAndThr
 m = tm.match(l)
 if m:
 env['TST_MODS'] = eval(m.group(1))
-#s = ts.match(l)
-#if s:
-#   env['TST_STATIC'] = "1"
-#   os.environ['TST_STATIC'] = env['TST_STATIC']
 if not env['TST_BITS']:
 ErrMsg("Checking for Bits failed!")
 if not env['TST_MODS']:
@@ -1644,7 +1635,7 @@ def GetBitsAndOIDsAndModsAndStaticAndThr
 STDERR.flush()
 os.environ['TST_MODS'] = str(env['TST_MODS'])
 return rtrn
-### GetBitsAndOIDsAndModsAndStaticAndThreads(env) #
+### 

MonetDB: default - No more need to print OID size in merver5's w...

2016-07-19 Thread Stefan Manegold
Changeset: f2d7ee2375db for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f2d7ee2375db
Modified Files:
buildtools/ChangeLog
testing/Mtest.py.in
tools/mserver/monet_version.c.in
tools/mserver/mserver5.c
Branch: default
Log Message:

No more need to print OID size in merver5's welcome & version info;
OID size is now always equal to ABI/word size ("bits").


diffs (132 lines):

diff --git a/buildtools/ChangeLog b/buildtools/ChangeLog
--- a/buildtools/ChangeLog
+++ b/buildtools/ChangeLog
@@ -2,6 +2,8 @@
 # This file is updated with Maddlog
 
 * Tue Jul 19 2016 Stefan Manegold 
+- With OID size equal to ABI/word size, mserver5 does not need to print
+  the OID size, anymore.
 - Removed obsolete code associated with long gone static linking option.
 
 * Mon Jul 18 2016 Sjoerd Mullender 
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1525,7 +1525,7 @@ def returnCode(proc, f = None):
 return 'error'
 return None # no error
 
-def GetBitsAndOIDsAndModsAndThreads(env) :
+def GetBitsAndModsAndThreads(env) :
 global setpgrp
 rtrn = 0
 cmd = splitcommand(env['exe']['Mserver'][1])
@@ -1536,7 +1536,7 @@ def GetBitsAndOIDsAndModsAndThreads(env)
   ignore_errors = True)
 os.makedirs(os.path.join(env['GDK_DBFARM'], TSTPREF + '_transient'))
 if procdebug:
-print('GetBitsAndOIDsAndModsAndThreads: starting process "%s" (inpipe, 
outpipe, errpipe)\n' % '" "'.join(cmd))
+print('GetBitsAndModsAndThreads: starting process "%s" (inpipe, 
outpipe, errpipe)\n' % '" "'.join(cmd))
 setpgrp = True
 proc = process.Popen(cmd, stdin = process.PIPE, stdout = process.PIPE,
  stderr = process.PIPE, universal_newlines = True)
@@ -1566,12 +1566,12 @@ def GetBitsAndOIDsAndModsAndThreads(env)
 qOut, qErr = proc.communicate(input = input)
 t.cancel()
 if procdebug:
-print('GetBitsAndOIDsAndModsAndThreads: process exited "%s" 
(%s)\n' % ('" "'.join(cmd), proc.returncode))
+print('GetBitsAndModsAndThreads: process exited "%s" (%s)\n' % ('" 
"'.join(cmd), proc.returncode))
 except KeyboardInterrupt:
 t.cancel()
 killProc(proc, proc.stderr, cmd)
 if procdebug:
-print('GetBitsAndOIDsAndModsAndThreads: process killed "%s"\n' % 
'" "'.join(cmd))
+print('GetBitsAndModsAndThreads: process killed "%s"\n' % '" 
"'.join(cmd))
 raise
 returncode = returnCode(proc)
 if returncode is not None:
@@ -1586,14 +1586,14 @@ def GetBitsAndOIDsAndModsAndThreads(env)
 STDERR.write(qErr)
 STDERR.write("\n")
 STDERR.flush()
-ErrExit('GetBitsAndOIDsAndModsAndThreads: subcommand failed: %s' % 
returncode)
+ErrExit('GetBitsAndModsAndThreads: subcommand failed: %s' % returncode)
 env['TST_MODS'] = []
 env['TST_BITS'] = ""
 env['TST_INT128'] = ""
 env['TST_SINGLE'] = ""
 env['TST_THREADS'] = ""
 if qOut:
-tbos = re.compile("^# Compiled for .*/([63][42]bit) with ([63][42])bit 
OIDs;?( and 128bit integers|)", re.MULTILINE)
+tbos = re.compile("^# Compiled for .*/([63][42]bit)( with 128bit 
integers|)", re.MULTILINE)
 tt = re.compile("^# Serving database .*, using ([0-9]+) threads?", 
re.MULTILINE)
 tm = re.compile("^Modules: (.+)$", re.MULTILINE)
 for l in qOut.split('\n'):
@@ -1601,7 +1601,7 @@ def GetBitsAndOIDsAndModsAndThreads(env)
 if obs:
 env['TST_BITS'] = obs.group(1)
 os.environ['TST_BITS'] = env['TST_BITS']
-if obs.group(3) == " and 128bit integers":
+if obs.group(2) == " with 128bit integers":
 env['TST_INT128'] = "int128"
 os.environ['TST_INT128'] = env['TST_INT128']
 t = tt.match(l)
@@ -1635,7 +1635,7 @@ def GetBitsAndOIDsAndModsAndThreads(env)
 STDERR.flush()
 os.environ['TST_MODS'] = str(env['TST_MODS'])
 return rtrn
-### GetBitsAndOIDsAndModsAndThreads(env) #
+### GetBitsAndModsAndThreads(env) #
 
 def CheckMods(env, TST, SERVER, CALL) :
 missing = []
@@ -3516,7 +3516,7 @@ def main(argv) :
  "(default:  = 'out' & 'err')"),
 (None, 'S', 'sys', '',
  "approve specific output *.\n"
- "( = 
'[.([]|[])][.(32|64)bit][.oid(32|64)][.int128][.single]',\n"
+ "( = 
'[.([]|[])][.(32|64)bit][.int128][.single]',\n"
  "(default: longest match for  = '[.(%s[%s]|%s[%s])]%s%s%s')"
   % (v['SYST'], v['RELEASE'], v['DIST'], v['VERSION'], v['BITS'], 
v['INT128'], v['SINGLE'])),
 (None, 'f', 'force', None,
@@ -4097,7 +4097,7 @@ def main(argv) :
 os.makedirs(os.path.join(env['GDK_DBFARM'], TSTPREF + 
'_transient'))
 if