Changeset: 1e91bd533663 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/1e91bd533663
Modified Files:
        clients/Tests/MAL-signatures-hge.test
        clients/Tests/MAL-signatures.test
        clients/odbc/driver/SQLExecute.c
        geom/monetdb5/geom.c
        sql/storage/bat/bat_storage.c
Branch: default
Log Message:

Merge with Sep2022 branch.


diffs (148 lines):

diff --git a/clients/Tests/MAL-signatures-hge.test 
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -44832,7 +44832,7 @@ geom
 Length
 command geom.Length(X_0:wkb):dbl 
 wkbLength;
-Returns the cartesian 2D length of the geometry if it is a linestrin or 
multilinestring
+Returns the cartesian 2D length of the geometry if it is a linestring or 
multilinestring
 geom
 LineFromText
 command geom.LineFromText(X_0:str):wkb 
diff --git a/clients/Tests/MAL-signatures.test 
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -33282,7 +33282,7 @@ geom
 Length
 command geom.Length(X_0:wkb):dbl 
 wkbLength;
-Returns the cartesian 2D length of the geometry if it is a linestrin or 
multilinestring
+Returns the cartesian 2D length of the geometry if it is a linestring or 
multilinestring
 geom
 LineFromText
 command geom.LineFromText(X_0:str):wkb 
diff --git a/clients/odbc/driver/SQLExecute.c b/clients/odbc/driver/SQLExecute.c
--- a/clients/odbc/driver/SQLExecute.c
+++ b/clients/odbc/driver/SQLExecute.c
@@ -492,7 +492,7 @@ MNDBExecute(ODBCStmt *stmt)
                /* we're the only Stmt handle, and we're only going forward */
                if (stmt->Dbc->cachelimit != 10000)
                        mapi_cache_limit(stmt->Dbc->mid, 10000);
-               stmt->Dbc->cachelimit = 1000;
+               stmt->Dbc->cachelimit = 10000;
        } else {
                if (stmt->Dbc->cachelimit != 100)
                        mapi_cache_limit(stmt->Dbc->mid, 100);
diff --git a/clients/odbc/driver/SQLPrepare.c b/clients/odbc/driver/SQLPrepare.c
--- a/clients/odbc/driver/SQLPrepare.c
+++ b/clients/odbc/driver/SQLPrepare.c
@@ -97,6 +97,11 @@ MNDBPrepare(ODBCStmt *stmt,
 
        ODBCResetStmt(stmt);
 
+       if (stmt->Dbc->cachelimit != -1) {
+               mapi_cache_limit(stmt->Dbc->mid, -1);
+               stmt->Dbc->cachelimit = -1;
+       }
+
        ret = mapi_query_handle(hdl, s);
        free(s);
        s = NULL;
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -6566,7 +6566,7 @@ static mel_func geom_init_funcs[] = {
  command("geom", "Area", wkbArea, false, "Returns the area of the surface if 
it is a polygon or multi-polygon", args(1,2, arg("",dbl),arg("w",wkb))),
  command("geom", "Centroid", wkbCentroid, false, "Computes the geometric 
center of a geometry, or equivalently, the center of mass of the geometry as a 
POINT.", args(1,2, arg("",wkb),arg("w",wkb))),
  command("geom", "Distance", wkbDistance, false, "Returns the 2-dimensional 
minimum cartesian distance between the two geometries in projected units 
(spatial ref units.", args(1,3, arg("",dbl),arg("a",wkb),arg("b",wkb))),
- command("geom", "Length", wkbLength, false, "Returns the cartesian 2D length 
of the geometry if it is a linestrin or multilinestring", args(1,2, 
arg("",dbl),arg("w",wkb))),
+ command("geom", "Length", wkbLength, false, "Returns the cartesian 2D length 
of the geometry if it is a linestring or multilinestring", args(1,2, 
arg("",dbl),arg("w",wkb))),
  command("geom", "ConvexHull", wkbConvexHull, false, "Returns a geometry that 
represents the convex hull of this geometry. The convex hull of a geometry 
represents the minimum convex geometry that encloses all geometries within the 
set.", args(1,2, arg("",wkb),arg("w",wkb))),
  command("geom", "Intersection", wkbIntersection, false, "Returns a geometry 
that represents the point set intersection of the Geometries a, b", args(1,3, 
arg("",wkb),arg("a",wkb),arg("b",wkb))),
  command("geom", "Union", wkbUnion, false, "Returns a geometry that represents 
the point set union of the Geometries a, b", args(1,3, 
arg("",wkb),arg("a",wkb),arg("b",wkb))),
diff --git a/geom/sql/functions/Tests/All b/geom/sql/functions/Tests/All
--- a/geom/sql/functions/Tests/All
+++ b/geom/sql/functions/Tests/All
@@ -41,7 +41,7 @@ HAVE_GEOM?ST_Contains
 
 #HAVE_GEOM?equals
 
-HAVE_GEOM?ST_Boundary
+HAVE_GEOM&GEOS_VERSION>=3.11.1?ST_Boundary
 
 HAVE_GEOM?ST_Dimension
 HAVE_GEOM?ST_CoordDim
diff --git a/geom/sql/functions/Tests/ST_Boundary.test 
b/geom/sql/functions/Tests/ST_Boundary.test
--- a/geom/sql/functions/Tests/ST_Boundary.test
+++ b/geom/sql/functions/Tests/ST_Boundary.test
@@ -16,7 +16,7 @@ LINESTRING Z (1 1 1, 0 0 1, -1 1 1, 1 1 
 query T rowsort
 SELECT ST_Boundary(ST_GeomFromText('MULTILINESTRING((1 1 1,0 0 0.5, -1 1 1),(1 
1 0.5,0 0 0.5, -1 1 0.5, 1 1 0.5) )'))
 ----
-MULTIPOINT Z (-1 1 1, 1 1 0.75)
+MULTIPOINT Z (-1 1 1, 1 1 1)
 
 query TT rowsort
 SELECT geom AS "GEOMETRY", ST_Boundary(geom) AS "BOUNDARY" FROM geometries 
where id<>12 and id<>13 and id<>24 and id<>25
diff --git a/geom/sql/pg_regression/Tests/All b/geom/sql/pg_regression/Tests/All
--- a/geom/sql/pg_regression/Tests/All
+++ b/geom/sql/pg_regression/Tests/All
@@ -87,7 +87,7 @@ HAVE_GEOM&GEOS_VERSION>=3.10?dump #Unkno
 
 HAVE_GEOM?dumppoints #Uknown Types: TRIANGLE, TIN, CURVEPOLYGON (queries for 
these types commented out)
 
-HAVE_GEOM?boundary #Uknown Types: TRIANGLE (queries for these types commented 
out)
+HAVE_GEOM&GEOS_VERSION>=3.11.1?boundary #Uknown Types: TRIANGLE (queries for 
these types commented out)
 
 #HAVE_GEOM?wmsservers #Not applicable to MonetDB (?)
 
diff --git a/geom/sql/pg_regression/Tests/boundary.test 
b/geom/sql/pg_regression/Tests/boundary.test
--- a/geom/sql/pg_regression/Tests/boundary.test
+++ b/geom/sql/pg_regression/Tests/boundary.test
@@ -16,5 +16,5 @@ SRID:0;LINESTRING Z (1 1 1, 0 0 1, -1 1 
 query T rowsort
 SELECT ST_AsEWKT(ST_Boundary(ST_GeomFromText('MULTILINESTRING((1 1 1,0 0 0.5, 
-1 1 1),(1 1 0.5,0 0 0.5, -1 1 0.5, 1 1 0.5) )')))
 ----
-SRID:0;MULTIPOINT Z (-1 1 1, 1 1 0.75)
+SRID:0;MULTIPOINT Z (-1 1 1, 1 1 1)
 
diff --git a/sql/ChangeLog.Sep2022 b/sql/ChangeLog.Sep2022
--- a/sql/ChangeLog.Sep2022
+++ b/sql/ChangeLog.Sep2022
@@ -1,6 +1,10 @@
 # ChangeLog file for sql
 # This file is updated with Maddlog
 
+* Fri Dec 16 2022 Sjoerd Mullender <sjo...@acm.org>
+- Added some error checking to prevent crashes.  Errors would mainly
+  occur under memory pressure.
+
 * Wed Dec 14 2022 Sjoerd Mullender <sjo...@acm.org>
 - Fixed cleanup after a failed allocation where the data being cleaned
   up was unitialized but still used as pointers to memory that also had
diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c
--- a/sql/storage/bat/bat_storage.c
+++ b/sql/storage/bat/bat_storage.c
@@ -615,8 +615,8 @@ find_tmp_idx(sql_trans *tr, sql_idx *i)
 static sql_delta *
 temp_col_timestamp_delta( sql_trans *tr, sql_column *c)
 {
-       if (isGlobal(c->t))
-               c = find_tmp_column(tr, c);
+       if (isGlobal(c->t) && (c = find_tmp_column(tr, c)) == NULL)
+               return NULL;
        assert (!isGlobal(c->t));
        assert(isTempTable(c->t));
        sql_delta *d = temp_delta(ATOMIC_PTR_GET(&c->data), tr->tid);
@@ -676,8 +676,8 @@ timestamp_storage( sql_trans *tr, storag
 static storage *
 temp_tab_timestamp_storage( sql_trans *tr, sql_table *t)
 {
-       if (isGlobal(t))
-               t = find_tmp_table(tr, t);
+       if (isGlobal(t) && (t = find_tmp_table(tr, t)) == NULL)
+               return NULL;
        assert(!isGlobal(t));
        assert(isTempTable(t));
        storage *d = temp_storage(ATOMIC_PTR_GET(&t->data), tr->tid);
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to