Changeset: 29567970a214 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=29567970a214
Modified Files:
        geom/monetdb5/geom.c
        geom/monetdb5/geomBulk.c
        monetdb5/modules/atoms/mtime.c
        sql/backends/monet5/LSST/lsst.c
        sql/backends/monet5/UDF/cudf/udf.c
        sql/backends/monet5/UDF/pyapi/convert_loops.h
        sql/backends/monet5/generator/generator.c
        sql/backends/monet5/sql.c
        sql/backends/monet5/sql_bat2time.c
        sql/backends/monet5/sql_cast.c
        sql/backends/monet5/sql_cast_impl_down_from_flt.h
        sql/backends/monet5/sql_cast_impl_int.h
        sql/backends/monet5/sql_cast_impl_up_to_flt.h
        sql/backends/monet5/sql_fround_impl.h
        sql/backends/monet5/sql_rank.c
        sql/backends/monet5/sql_round_impl.h
        sql/backends/monet5/sql_scenario.c
        sql/backends/monet5/vaults/bam/bam_export.c
        sql/backends/monet5/vaults/bam/bam_lib.c
        sql/backends/monet5/vaults/shp/shp.c
        sql/backends/monet5/wlr.c
Branch: malerrors
Log Message:

Another round of SQLSTATE errors


diffs (truncated from 3277 to 300 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -258,7 +258,7 @@ transformPolygon(GEOSGeometry **transfor
        if (transformedInteriorRingGeometries == NULL) {
                *transformedGeometry = NULL;
                GEOSGeom_destroy(transformedExteriorRingGeometry);
-               throw(MAL, "geom.Transform", "SQLSTATE ----- !"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.Transform", "SQLSTATE HY001 !"MAL_MALLOC_FAIL);
        }
        for (i = 0; i < numInteriorRings; i++) {
                ret = 
transformLinearRing(&transformedInteriorRingGeometries[i], 
GEOSGetInteriorRingN(geosGeometry, i), proj4_src, proj4_dst);
@@ -298,7 +298,7 @@ transformMultiGeometry(GEOSGeometry **tr
                throw(MAL, "geom.Transform", "SQLSTATE ----- 
!""GEOSGetNumGeometries failed");
        transformedMultiGeometries = GDKmalloc(geometriesNum * 
sizeof(GEOSGeometry *));
        if (transformedMultiGeometries == NULL)
-               throw(MAL, "geom.Transform", "SQLSTATE ----- !"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.Transform", "SQLSTATE HY001 !"MAL_MALLOC_FAIL);
 
        for (i = 0; i < geometriesNum; i++) {
                if ((multiGeometry = GEOSGetGeometryN(geosGeometry, i)) == NULL)
@@ -418,7 +418,7 @@ wkbTransform(wkb **transformedWKB, wkb *
            strcmp(*proj4_src_str, str_nil) == 0 ||
            strcmp(*proj4_dst_str, str_nil) == 0) {
                if ((*transformedWKB = wkbNULLcopy()) == NULL)
-                       throw(MAL, "geom.Transform", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.Transform", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                return MAL_SUCCEED;
        }
 
@@ -676,7 +676,7 @@ forceDimPolygon(GEOSGeometry **outGeomet
        if (transformedInteriorRingGeometries == NULL) {
                *outGeometry = NULL;
                GEOSGeom_destroy(transformedExteriorRingGeometry);
-               throw(MAL, "geom.ForceDim", "SQLSTATE ----- !"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.ForceDim", "SQLSTATE HY001 !"MAL_MALLOC_FAIL);
        }
        for (i = 0; i < numInteriorRings; i++) {
                if ((ret = 
forceDimLinearRing(&transformedInteriorRingGeometries[i], 
GEOSGetInteriorRingN(geosGeometry, i), dim)) != MAL_SUCCEED) {
@@ -712,7 +712,7 @@ forceDimMultiGeometry(GEOSGeometry **out
        geometriesNum = GEOSGetNumGeometries(geosGeometry);
        transformedMultiGeometries = GDKmalloc(geometriesNum * 
sizeof(GEOSGeometry *));
        if (transformedMultiGeometries == NULL)
-               throw(MAL, "geom.ForceDim", "SQLSTATE ----- !"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.ForceDim", "SQLSTATE HY001 !"MAL_MALLOC_FAIL);
 
        //In order to have the geometries in the output in the same order as in 
the input
        //we should read them and put them in the area in reverse order
@@ -772,7 +772,7 @@ wkbForceDim(wkb **outWKB, wkb **geomWKB,
 
        if (wkb_isnil(*geomWKB) || *dim == int_nil) {
                if ((*outWKB = wkbNULLcopy()) == NULL)
-                       throw(MAL, "geom.ForceDim", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.ForceDim", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                return MAL_SUCCEED;
        }
 
@@ -854,18 +854,18 @@ segmentizeLineString(GEOSGeometry **outG
        //store the points so that I do not have to read them multiple times 
using geos
        if ((xCoords_org = GDKmalloc(pointsNum * sizeof(double))) == NULL) {
                *outGeometry = NULL;
-               throw(MAL, "geom.Segmentize", "SQLSTATE ----- !"MAL_MALLOC_FAIL 
" for %d double values", pointsNum);
+               throw(MAL, "geom.Segmentize", "SQLSTATE HY001 !"MAL_MALLOC_FAIL 
" for %d double values", pointsNum);
        }
        if ((yCoords_org = GDKmalloc(pointsNum * sizeof(double))) == NULL) {
                GDKfree(xCoords_org);
                *outGeometry = NULL;
-               throw(MAL, "geom.Segmentize", "SQLSTATE ----- !"MAL_MALLOC_FAIL 
" for %d double values", pointsNum);
+               throw(MAL, "geom.Segmentize", "SQLSTATE HY001 !"MAL_MALLOC_FAIL 
" for %d double values", pointsNum);
        }
        if ((zCoords_org = GDKmalloc(pointsNum * sizeof(double))) == NULL) {
                GDKfree(xCoords_org);
                GDKfree(yCoords_org);
                *outGeometry = NULL;
-               throw(MAL, "geom.Segmentize", "SQLSTATE ----- !"MAL_MALLOC_FAIL 
" for %d double values", pointsNum);
+               throw(MAL, "geom.Segmentize", "SQLSTATE HY001 !"MAL_MALLOC_FAIL 
" for %d double values", pointsNum);
        }
 
        if (!GEOSCoordSeq_getX(gcs_old, 0, &xCoords_org[0])) {
@@ -1052,7 +1052,7 @@ segmentizePolygon(GEOSGeometry **outGeom
        if (transformedInteriorRingGeometries == NULL) {
                *outGeometry = NULL;
                GEOSGeom_destroy(transformedExteriorRingGeometry);
-               throw(MAL, "geom.Segmentize", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.Segmentize", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
        }
        for (i = 0; i < numInteriorRings; i++) {
                if ((err = 
segmentizeLineString(&transformedInteriorRingGeometries[i], 
GEOSGetInteriorRingN(geosGeometry, i), sz, 1)) != MAL_SUCCEED) {
@@ -1088,7 +1088,7 @@ segmentizeMultiGeometry(GEOSGeometry **o
        geometriesNum = GEOSGetNumGeometries(geosGeometry);
        transformedMultiGeometries = GDKmalloc(geometriesNum * 
sizeof(GEOSGeometry *));
        if (transformedMultiGeometries == NULL)
-               throw(MAL, "geom.Segmentize", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.Segmentize", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
 
        //In order to have the geometries in the output in the same order as in 
the input
        //we should read them and put them in the area in reverse order
@@ -1148,7 +1148,7 @@ wkbSegmentize(wkb **outWKB, wkb **geomWK
 
        if (wkb_isnil(*geomWKB) || *sz == dbl_nil) {
                if ((*outWKB = wkbNULLcopy()) == NULL)
-                       throw(MAL, "geom.Segmentize", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.Segmentize", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                return MAL_SUCCEED;
        }
 
@@ -1370,7 +1370,7 @@ translatePolygon(GEOSGeometry **outGeome
        if (transformedInteriorRingGeometries == NULL) {
                *outGeometry = NULL;
                GEOSGeom_destroy(transformedExteriorRingGeometry);
-               throw(MAL, "geom.Translate", "SQLSTATE ----- !"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.Translate", "SQLSTATE HY001 !"MAL_MALLOC_FAIL);
        }
        for (i = 0; i < numInteriorRings; i++) {
                if ((err = 
translateLinearRing(&transformedInteriorRingGeometries[i], 
GEOSGetInteriorRingN(geosGeometry, i), dx, dy, dz)) != MAL_SUCCEED) {
@@ -1406,7 +1406,7 @@ translateMultiGeometry(GEOSGeometry **ou
        geometriesNum = GEOSGetNumGeometries(geosGeometry);
        transformedMultiGeometries = GDKmalloc(geometriesNum * 
sizeof(GEOSGeometry *));
        if (transformedMultiGeometries == NULL)
-               throw(MAL, "geom.Translate", "SQLSTATE ----- !"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.Translate", "SQLSTATE HY001 !"MAL_MALLOC_FAIL);
 
        //In order to have the geometries in the output in the same order as in 
the input
        //we should read them and put them in the area in reverse order
@@ -1466,7 +1466,7 @@ wkbTranslate(wkb **outWKB, wkb **geomWKB
 
        if (wkb_isnil(*geomWKB) || *dx == dbl_nil || *dy == dbl_nil || *dz == 
dbl_nil) {
                if ((*outWKB = wkbNULLcopy()) == NULL)
-                       throw(MAL, "geom.Translate", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.Translate", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                return MAL_SUCCEED;
        }
 
@@ -1506,7 +1506,7 @@ wkbDelaunayTriangles(wkb **outWKB, wkb *
 
        if (wkb_isnil(*geomWKB) || *tolerance == dbl_nil || *flag == int_nil) {
                if ((*outWKB = wkbNULLcopy()) == NULL)
-                       throw(MAL, "geom.DelaunayTriangles", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.DelaunayTriangles", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                return MAL_SUCCEED;
        }
 
@@ -1534,7 +1534,7 @@ wkbPointOnSurface(wkb **resWKB, wkb **ge
 
        if (wkb_isnil(*geomWKB)) {
                if ((*resWKB = wkbNULLcopy()) == NULL)
-                       throw(MAL, "geom.PointOnSurface", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.PointOnSurface", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                return MAL_SUCCEED;
        }
 
@@ -1584,7 +1584,7 @@ dumpGeometriesSingle(BAT *idBAT, BAT *ge
                newPath = GDKmalloc(lvlDigitsNum + 1);
                if (newPath == NULL) {
                        GDKfree(singleWKB);
-                       throw(MAL, "geom.Dump", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.Dump", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                }
                snprintf(newPath, lvlDigitsNum + 1, "%u", *lvl);
        } else {
@@ -1593,7 +1593,7 @@ dumpGeometriesSingle(BAT *idBAT, BAT *ge
                newPath = GDKmalloc(pathLength + 1);
                if (newPath == NULL) {
                        GDKfree(singleWKB);
-                       throw(MAL, "geom.Dump", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.Dump", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                }
                strncpy(newPath, path, pathLength);
                newPath[pathLength] = '\0';
@@ -1624,7 +1624,7 @@ dumpGeometriesMulti(BAT *idBAT, BAT *geo
        pathLength += 10 + 1 + 1; /* 10 for lvl, 1 for ",", 1 for NULL byte */
        newPath = GDKmalloc(pathLength);
        if (newPath == NULL)
-               throw(MAL, "geom.Dump", "SQLSTATE ----- !"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.Dump", "SQLSTATE HY001 !"MAL_MALLOC_FAIL);
 
        for (i = 0; i < geometriesNum; i++) {
                multiGeometry = GEOSGetGeometryN(geosGeometry, i);
@@ -1746,13 +1746,13 @@ dumpPointsPoint(BAT *idBAT, BAT *geomBAT
        str err = MAL_SUCCEED;
 
        if (pointWKB == NULL)
-               throw(MAL, "geom.Dump", "SQLSTATE ----- !"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.Dump", "SQLSTATE HY001 !"MAL_MALLOC_FAIL);
 
        (*lvl)++;
        newPath = GDKmalloc(pathLength + lvlDigitsNum + 1);
        if (newPath == NULL) {
                GDKfree(pointWKB);
-               throw(MAL, "geom.Dump", "SQLSTATE ----- !"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.Dump", "SQLSTATE HY001 !"MAL_MALLOC_FAIL);
        }
        sprintf(newPath, "%s%u", path, *lvl);
 
@@ -1814,7 +1814,7 @@ dumpPointsPolygon(BAT *idBAT, BAT *geomB
        (*lvl)++;
        newPath = GDKmalloc(pathLength + lvlDigitsNum + extraLength + 1);
        if (newPath == NULL)
-               throw(MAL, "geom.DumpPoints", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.DumpPoints", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
        sprintf(newPath, "%s%u%s", path, *lvl, extraStr);
 
        //get the points in the exterior ring
@@ -1835,7 +1835,7 @@ dumpPointsPolygon(BAT *idBAT, BAT *geomB
 
                newPath = GDKmalloc(pathLength + lvlDigitsNum + extraLength + 
1);
                if (newPath == NULL)
-                       throw(MAL, "geom.DumpPoints", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.DumpPoints", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                sprintf(newPath, "%s%u%s", path, *lvl, extraStr);
 
                err = dumpPointsLineString(idBAT, geomBAT, 
GEOSGetInteriorRingN(geosGeometry, i), newPath);
@@ -1870,7 +1870,7 @@ dumpPointsMultiGeometry(BAT *idBAT, BAT 
 
                newPath = GDKmalloc(pathLength + lvlDigitsNum + extraLength + 
1);
                if (newPath == NULL)
-                       throw(MAL, "geom.DumpPoints", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.DumpPoints", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                sprintf(newPath, "%s%u%s", path, lvl, extraStr);
 
                //*secondLevel = 0;
@@ -1981,7 +1981,7 @@ geom_2_geom(wkb **resWKB, wkb **valueWKB
        if (wkb_isnil(*valueWKB) || *columnType == int_nil || *columnSRID == 
int_nil) {
                *resWKB = wkbNULLcopy();
                if (*resWKB == NULL)
-                       throw(MAL, "calc.wkb", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "calc.wkb", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                return MAL_SUCCEED;
        }
 
@@ -2049,11 +2049,11 @@ geoGetType(char **res, int *info, int *f
 {
        if (*info == int_nil || *flag == int_nil) {
                if ((*res = GDKstrdup(str_nil)) == NULL)
-                       throw(MAL, "geom.getType", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.getType", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                return MAL_SUCCEED;
        }
        if ((*res = GDKstrdup(geom_type2str(*info >> 2, *flag))) == NULL)
-               throw(MAL, "geom.getType", "SQLSTATE ----- !"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.getType", "SQLSTATE HY001 !"MAL_MALLOC_FAIL);
        return MAL_SUCCEED;
 }
 
@@ -2155,7 +2155,7 @@ wkbFROMSTR_withSRID(char *geomWKT, int *
        if (strcmp(geomWKT, str_nil) == 0) {
                *geomWKB = wkbNULLcopy();
                if (*geomWKB == NULL)
-                       throw(MAL, "wkb.FromText", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "wkb.FromText", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                *len = (int) sizeof(wkb_nil);
                return MAL_SUCCEED;
        }
@@ -2179,7 +2179,7 @@ wkbFROMSTR_withSRID(char *geomWKT, int *
                geomWKT_original = geomWKT;
                geomWKT = GDKmalloc(sizeOfInfo + strlen(multiPolygon) + 1);
                if (geomWKT == NULL)
-                       throw(MAL, "wkb.FromText", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "wkb.FromText", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                strcpy(geomWKT, multiPolygon);
                memcpy(geomWKT + strlen(multiPolygon), 
&geomWKT_original[strlen(polyhedralSurface)], sizeOfInfo);
                geomWKT[sizeOfInfo + strlen(multiPolygon)] = '\0';
@@ -2376,11 +2376,11 @@ wkbAsBinary(char **toStr, wkb **geomWKB)
 
        if (wkb_isnil(*geomWKB)) {
                if ((*toStr = GDKstrdup(str_nil)) == NULL)
-                       throw(MAL, "geom.AsBinary", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.AsBinary", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                return MAL_SUCCEED;
        }
        if ((*toStr = GDKmalloc(1 + (*geomWKB)->len * 2)) == NULL)
-               throw(MAL, "geom.AsBinary", "SQLSTATE ----- !"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.AsBinary", "SQLSTATE HY001 !"MAL_MALLOC_FAIL);
 
        s = *toStr;
        for (i = 0; i < (*geomWKB)->len; i++) {
@@ -2449,7 +2449,7 @@ wkbFromBinary(wkb **geomWKB, char **inSt
 
        if (strcmp(*inStr, str_nil) == 0) {
                if ((*geomWKB = wkbNULLcopy()) == NULL)
-                       throw(MAL, "geom.FromBinary", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+                       throw(MAL, "geom.FromBinary", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
                return MAL_SUCCEED;
        }
 
@@ -2462,7 +2462,7 @@ wkbFromBinary(wkb **geomWKB, char **inSt
 
        w = GDKmalloc(wkb_size(wkbLength));
        if (w == NULL)
-               throw(MAL, "geom.FromBinary", "SQLSTATE ----- 
!"MAL_MALLOC_FAIL);
+               throw(MAL, "geom.FromBinary", "SQLSTATE HY001 
!"MAL_MALLOC_FAIL);
 
        //compute the value for s
        for (i = 0; i < strLength; i += 2) {
@@ -2487,7 +2487,7 @@ mbrFromMBR(mbr **w, mbr **src)
 {
        *w = GDKmalloc(sizeof(mbr));
        if (*w == NULL)
-               throw(MAL, "calc.mbr", "SQLSTATE ----- !"MAL_MALLOC_FAIL);
+               throw(MAL, "calc.mbr", "SQLSTATE HY001 !"MAL_MALLOC_FAIL);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to