MonetDB: Jul2017 - Allocate correct amount of memory.
Changeset: 92ff72de6f81 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=92ff72de6f81 Modified Files: gdk/gdk_aggr.c Branch: Jul2017 Log Message: Allocate correct amount of memory. diffs (12 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -299,7 +299,7 @@ dofsum(const void *restrict values, oid * for the final step below */ double *temp; pergroup[grp].maxpartials += pergroup[grp].maxpartials; - temp = GDKrealloc(pergroup[grp].partials, pergroup[grp].maxpartials); + temp = GDKrealloc(pergroup[grp].partials, pergroup[grp].maxpartials * sizeof(double)); if (temp == NULL) goto bailout; pergroup[grp].partials = temp; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Fix up some types.
Changeset: a7852d948fc1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a7852d948fc1 Modified Files: gdk/gdk_aggr.c Branch: Jul2017 Log Message: Fix up some types. diffs (23 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -197,14 +197,14 @@ dofsum(const void *restrict values, oid int nil_if_empty, const char *func) { struct pergroup { - size_t npartials; - size_t maxpartials; + int npartials; + int maxpartials; double *partials; int valseen; } *pergroup; - size_t listi; - size_t parti; - size_t i; + BUN listi; + int parti; + int i; BUN grp; double x, y; volatile double lo, hi; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Be less resource hungry during floating point...
Changeset: 4d0e87f34f62 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4d0e87f34f62 Modified Files: gdk/gdk_aggr.c Branch: Jul2017 Log Message: Be less resource hungry during floating point summation. We use smaller types where we can, especially when we need lots of them. Also preallocate fewer spaces for partial results. This should fix bug 6458. diffs (154 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -199,8 +199,13 @@ dofsum(const void *restrict values, oid struct pergroup { int npartials; int maxpartials; + int valseen; +#ifdef INFINITES_ALLOWED + float infs; +#else + int infs; +#endif double *partials; - int valseen; } *pergroup; BUN listi; int parti; @@ -228,9 +233,10 @@ dofsum(const void *restrict values, oid if (pergroup == NULL) return BUN_NONE; for (grp = 0; grp < ngrp; grp++) { - pergroup[grp].npartials = 1; + pergroup[grp].npartials = 0; pergroup[grp].valseen = 0; - pergroup[grp].maxpartials = 32; + pergroup[grp].maxpartials = 2; + pergroup[grp].infs = 0; pergroup[grp].partials = GDKmalloc(pergroup[grp].maxpartials * sizeof(double)); if (pergroup[grp].partials == NULL) { while (grp > 0) @@ -238,7 +244,6 @@ dofsum(const void *restrict values, oid GDKfree(pergroup); return BUN_NONE; } - pergroup[grp].partials[0] = 0; } for (;;) { if (cand) { @@ -274,8 +279,14 @@ dofsum(const void *restrict values, oid continue; } pergroup[grp].valseen = 1; - i = 1; - for (parti = 1; parti < pergroup[grp].npartials; parti++) { +#ifdef INFINITES_ALLOWED + if (isinf(x)) { + pergroup[grp].infs += x; + continue; + } +#endif + i = 0; + for (parti = 0; parti < pergroup[grp].npartials; parti++) { y = pergroup[grp].partials[parti]; if (fabs(x) < fabs(y)) exchange(&x, &y); @@ -284,7 +295,7 @@ dofsum(const void *restrict values, oid int sign = hi > 0 ? 1 : -1; hi = x - twopow * sign; x = hi - twopow * sign; - pergroup[grp].partials[0] += sign; + pergroup[grp].infs += sign; if (fabs(x) < fabs(y)) exchange(&x, &y); twosum(&hi, &lo, x, y); @@ -294,9 +305,7 @@ dofsum(const void *restrict values, oid x = hi; } if (x != 0) { - if (i == pergroup[grp].maxpartials - 1) { - /* -1 to make sure we have one spare - * for the final step below */ + if (i == pergroup[grp].maxpartials) { double *temp; pergroup[grp].maxpartials += pergroup[grp].maxpartials; temp = GDKrealloc(pergroup[grp].partials, pergroup[grp].maxpartials * sizeof(double)); @@ -322,10 +331,8 @@ dofsum(const void *restrict values, oid pergroup[grp].partials = NULL; continue; } - if (isinf(pergroup[grp].partials[0]) || - isnan(pergroup[grp].partials[0])) { - /* isnan: cannot happen: infinities of both -* signs in summands */ +#ifdef INFINITES_ALLOWED + if (isinf(pergroup[grp].infs) || isnan(pergroup[grp].infs)) { if (abort_on_error) { goto overflow; } @@ -338,17 +345,18 @@ dofsum(const void *restrict values, oid pergroup[grp].partials = NULL; continue; } +#endif - if (fabs(pergroup[grp].partials[0]) == 1.0 && - pergroup[grp].npartials > 1 && - !samesign(pergroup[grp].partials[0], pergroup[grp].partials[pergroup[grp].npartials - 1])) { - twosum(&hi, &lo, pergroup[grp].partials[0] * twopow, pergroup[grp].partials[pergroup[grp].npartials - 1] / 2); + if ((pergroup[grp].infs == 1 || pergroup[grp].infs == -1) && + pergroup[grp].npartials > 0 && + !samesign(pergroup[grp].infs, pergrou
MonetDB: Jul2017 - Fix up directory name in "linked" stable output.
Changeset: 021b3dcd8cd0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=021b3dcd8cd0 Modified Files: testing/Mtest.py.in Branch: Jul2017 Log Message: Fix up directory name in "linked" stable output. diffs (12 lines): diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -2049,7 +2049,7 @@ def RunTest(env, TST, BusyPorts, COND, o f1 = open(TSTSRC, "r") f2 = open(ff[:-4], "w") line = f1.readline() -f2.write("%s of test '%s` in directory '%s` itself:\n" % (line[:6], TST, TSTDIR)) +f2.write("%s of test '%s` in directory '%s` itself:\n" % (line[:6], TST, TSTDIR.replace('\\', '/'))) f2.write(f1.read()) f1.close() f2.close() ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - No need for different outputs anymore.
Changeset: 1d60d5668098 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d60d5668098 Removed Files: sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out.int128 Modified Files: sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out Branch: Jul2017 Log Message: No need for different outputs anymore. diffs (76 lines): diff --git a/sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out b/sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out --- a/sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out +++ b/sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out @@ -47,8 +47,8 @@ Ready. #select bit_and(1, power(2, 1)); % .L2 # table_name % L2 # name -% decimal # type -% 19 # length +% tinyint # type +% 1 # length [ 0] # 14:12:27 > diff --git a/sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out.int128 b/sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out.int128 deleted file mode 100644 --- a/sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out.int128 +++ /dev/null @@ -1,57 +0,0 @@ -stdout of test 'and-power.Bug-3013` in directory 'sql/test/BugTracker-2011` itself: - - -# 14:12:27 > -# 14:12:27 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "gdk_dbfarm=/ufs/sjoerd/Monet-stable/var/MonetDB" "--set" "mapi_open=true" "--set" "mapi_port=30422" "--set" "monet_prompt=" "--trace" "--forcemito" "--set" "mal_listing=2" "--dbname=mTests_test_BugTracker-2011" "--set" "mal_listing=0" -# 14:12:27 > - -# MonetDB 5 server v11.7.6 (hg id: fc936b0e04ac+) -# This is an unreleased version -# Serving database 'mTests_test_BugTracker-2011', using 8 threads -# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked -# Found 15.629 GiB available main-memory. -# Copyright (c) 1993-July 2008 CWI. -# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved -# Visit http://www.monetdb.org/ for further information -# Listening for connection requests on mapi:monetdb://madrid.ins.cwi.nl:30422/ -# 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_history.sql -# loading sql script: 16_tracelog.sql -# loading sql script: 17_compress.sql -# loading sql script: 18_dictionary.sql -# loading sql script: 19_cluster.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: 40_geom.sql -# loading sql script: 80_udf.sql -# loading sql script: 99_system.sql - -# 14:12:27 > -# 14:12:27 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=madrid" "--port=30422" -# 14:12:27 > - -#select bit_and(1, power(2, 1)); -% .L2 # table_name -% L2 # name -% tinyint # type -% 1 # length -[ 0] - -# 14:12:27 > -# 14:12:27 > "Done." -# 14:12:27 > - ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Add test conditions.
Changeset: b3d9b0d197e0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b3d9b0d197e0 Modified Files: sql/test/BugTracker-2017/Tests/All Branch: Jul2017 Log Message: Add test conditions. diffs (25 lines): diff --git a/sql/test/BugTracker-2017/Tests/All b/sql/test/BugTracker-2017/Tests/All --- a/sql/test/BugTracker-2017/Tests/All +++ b/sql/test/BugTracker-2017/Tests/All @@ -73,11 +73,11 @@ sqlitelogictest-having-with-not-in.Bug-6 sqlitelogictest-having-with-in.Bug-6410 sqlitelogictest-aggregation-distinct.Bug-6411 sqlitelogictest-aggregation-not-in.Bug-6416 -sqlsmith-semijoin-constant.bug-6417 +HAVE_NETCDF?sqlsmith-semijoin-constant.bug-6417 sqlsmith.Bug-6418 -sqlsmith.Bug-6423 -sqlsmith.Bug-6424 -sqlsmith.Bug-6425 +HAVE_SAMTOOLS?sqlsmith.Bug-6423 +HAVE_SAMTOOLS?sqlsmith.Bug-6424 +HAVE_NETCDF?sqlsmith.Bug-6425 double-groupby-column.Bug-6207 sqlitelogictest-aggregation-having-avg.Bug-6428 sqlitelogictest-aggregation-distinct-coalesce.Bug-6431 @@ -87,4 +87,4 @@ sqlitelogictest-select-not-in.Bug-6435 sqlitelogictest-cast-decimal.Bug-6445 HAVE_LIBPY?table_returning_with.Bug-6444 insert_into_multiple_subqueries.Bug-6448 -sqlsmith.Bug-6449 +HAVE_SAMTOOLS?sqlsmith.Bug-6449 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - Add test conditions.
Changeset: 56117c10e083 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=56117c10e083 Modified Files: sql/test/mergetables/Tests/All Branch: Jul2017 Log Message: Add test conditions. diffs (18 lines): diff --git a/sql/test/mergetables/Tests/All b/sql/test/mergetables/Tests/All --- a/sql/test/mergetables/Tests/All +++ b/sql/test/mergetables/Tests/All @@ -21,9 +21,9 @@ mergedropcascade addtable mergedb_create -mergedb.Bug-6820 -sqlsmith.Bug-6426 -sqlsmith.Bug-6451 -sqlsmith.Bug-6453 -sqlsmith.Bug-6455 +HAVE_NETCDF&HAVE_SAMTOOLS?mergedb.Bug-6820 +HAVE_NETCDF?sqlsmith.Bug-6426 +HAVE_NETCDF?sqlsmith.Bug-6451 +HAVE_NETCDF?sqlsmith.Bug-6453 +HAVE_NETCDF?sqlsmith.Bug-6455 mergedb_drop ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jul2017 branch.
Changeset: fcbc964389f8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fcbc964389f8 Removed Files: sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out.int128 Modified Files: NT/monetdb_config.h.in configure.ag gdk/gdk_aggr.c gdk/gdk_atoms.c gdk/gdk_calc.c monetdb5/modules/kernel/mmath.h sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out sql/test/BugTracker-2017/Tests/All sql/test/mergetables/Tests/All testing/Mtest.py.in Branch: default Log Message: Merge with Jul2017 branch. diffs (truncated from 497 to 300 lines): diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in --- a/NT/monetdb_config.h.in +++ b/NT/monetdb_config.h.in @@ -160,14 +160,6 @@ /* Define if the fits module is to be enabled */ /* #undef HAVE_FITS */ -/* Define to 1 if you have the `fpclass' function. */ -#define HAVE_FPCLASS 1 /* uses _fpclass, see mmath.c */ - -/* Define to 1 if you have the `fpclassify' function. */ -#if defined(_MSC_VER) && _MSC_VER > 1600 -#define HAVE_FPCLASSIFY 1 -#endif - /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ /* #undef HAVE_FSEEKO */ diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -2722,8 +2722,6 @@ AC_CHECK_FUNCS([\ fabsf \ fallocate \ fcntl \ - fpclass \ - fpclassify \ fsync \ ftime \ getexecname \ diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -10,7 +10,7 @@ #include "gdk.h" #include "gdk_private.h" #include "gdk_calc_private.h" -#ifdef __INTEL_COMPILER +#if defined(_MSC_VER) && defined(__INTEL_COMPILER) #include #else #include @@ -151,13 +151,11 @@ BATgroupaggrinit(BAT *b, BAT *g, BAT *e, /* -- */ /* sum */ -#if defined(_MSC_VER) && _MSC_VER < 1800 -#ifndef isnan +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && _MSC_VER < 1800 +#include #define isnan(x) _isnan(x) -#endif -#ifndef isinf #define isinf(x) (_fpclass(x) & (_FPCLASS_NINF | _FPCLASS_PINF)) -#endif +#define isfinite(x)_finite(x) #endif static inline int @@ -199,14 +197,19 @@ dofsum(const void *restrict values, oid int nil_if_empty, const char *func) { struct pergroup { - size_t npartials; - size_t maxpartials; - double *partials; + int npartials; + int maxpartials; int valseen; +#ifdef INFINITES_ALLOWED + float infs; +#else + int infs; +#endif + double *partials; } *pergroup; - size_t listi; - size_t parti; - size_t i; + BUN listi; + int parti; + int i; BUN grp; double x, y; volatile double lo, hi; @@ -230,9 +233,10 @@ dofsum(const void *restrict values, oid if (pergroup == NULL) return BUN_NONE; for (grp = 0; grp < ngrp; grp++) { - pergroup[grp].npartials = 1; + pergroup[grp].npartials = 0; pergroup[grp].valseen = 0; - pergroup[grp].maxpartials = 32; + pergroup[grp].maxpartials = 2; + pergroup[grp].infs = 0; pergroup[grp].partials = GDKmalloc(pergroup[grp].maxpartials * sizeof(double)); if (pergroup[grp].partials == NULL) { while (grp > 0) @@ -240,7 +244,6 @@ dofsum(const void *restrict values, oid GDKfree(pergroup); return BUN_NONE; } - pergroup[grp].partials[0] = 0; } for (;;) { if (cand) { @@ -276,8 +279,14 @@ dofsum(const void *restrict values, oid continue; } pergroup[grp].valseen = 1; - i = 1; - for (parti = 1; parti < pergroup[grp].npartials; parti++) { +#ifdef INFINITES_ALLOWED + if (isinf(x)) { + pergroup[grp].infs += x; + continue; + } +#endif + i = 0; + for (parti = 0; parti < pergroup[grp].npartials; parti++) { y = pergroup[grp].partials[parti]; if (fabs(x) < fabs(y)) exchange(&x, &y); @@ -286,7 +295,7 @@ dofsum(const void *restrict values, oid int sign = hi > 0 ? 1 : -1; hi = x - twopow * sign; x = hi - twopow * sign; - pergroup[grp].partials[0] += sign; + pergroup[grp].infs += sign; if (fabs(x) < fabs(y)) exchange(&x, &y);
MonetDB: data-vaults - Add missing file and new condition
Changeset: 4a003b505442 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a003b505442 Added Files: sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in Modified Files: sql/backends/monet5/vaults/lidar/Tests/All Branch: data-vaults Log Message: Add missing file and new condition Do not try to run the tests if we don't have the lidar vault diffs (19 lines): diff --git a/sql/backends/monet5/vaults/lidar/Tests/All b/sql/backends/monet5/vaults/lidar/Tests/All --- a/sql/backends/monet5/vaults/lidar/Tests/All +++ b/sql/backends/monet5/vaults/lidar/Tests/All @@ -1,2 +1,2 @@ -HAVE_DATA_PATH?lidar-single-file -HAVE_DATA_PATH?lidar-directory +HAVE_LIDAR&HAVE_DATA_PATH?lidar-single-file +HAVE_LIDAR&HAVE_DATA_PATH?lidar-directory diff --git a/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in @@ -0,0 +1,6 @@ +call lidarattach('$TSTDATAPATH/lidar/directory_loading/', 'tbl1', 'XYZainrcpedM'); +select column_id, type, width, "sample", count, "unique", nils, minval, maxval, sorted, revsorted from sys.statistics; +select * from vault_journal; +call lidarload('tbl1'); +select * from tbl1; +select count(*) from tbl1; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jul2017 - GEOSCoordSeq_getOrdinate returns a NaN for mi...
Changeset: d7946b4f3a04 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d7946b4f3a04 Modified Files: geom/monetdb5/geom.c geom/monetdb5/geom.h Branch: Jul2017 Log Message: GEOSCoordSeq_getOrdinate returns a NaN for missing coordinate. diffs (38 lines): diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c --- a/geom/monetdb5/geom.c +++ b/geom/monetdb5/geom.c @@ -14,6 +14,10 @@ #include "geom.h" #include "mal_exception.h" +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && _MSC_VER < 1800 +#define isnan(x) _isnan(x) +#endif + int TYPE_mbr; static wkb *geos2wkb(const GEOSGeometry *geosGeometry); @@ -2964,6 +2968,8 @@ wkbGetCoordinate(dbl *out, wkb **geom, i err = createException(MAL, "geom.GetCoordinate", "GEOSGeom_getCoordSeq failed"); } else if (!GEOSCoordSeq_getOrdinate(gcs, 0, *dimNum, out)) err = createException(MAL, "geom.GetCoordinate", "GEOSCoordSeq_getOrdinate failed"); + else if (isnan(*out)) + *out = dbl_nil; GEOSGeom_destroy(geosGeometry); return err; diff --git a/geom/monetdb5/geom.h b/geom/monetdb5/geom.h --- a/geom/monetdb5/geom.h +++ b/geom/monetdb5/geom.h @@ -22,7 +22,11 @@ #include #include #include +#if defined(_MSC_VER) && defined(__INTEL_COMPILER) +#include +#else #include +#endif #include #include ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Specify time zone in test so that it also wor...
Changeset: b955fd138170 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b955fd138170 Modified Files: sql/test/BugTracker-2017/Tests/extract_quarter_week_from_date.Bug-3831.sql Branch: default Log Message: Specify time zone in test so that it also works when winter time is in effect. diffs (9 lines): diff --git a/sql/test/BugTracker-2017/Tests/extract_quarter_week_from_date.Bug-3831.sql b/sql/test/BugTracker-2017/Tests/extract_quarter_week_from_date.Bug-3831.sql --- a/sql/test/BugTracker-2017/Tests/extract_quarter_week_from_date.Bug-3831.sql +++ b/sql/test/BugTracker-2017/Tests/extract_quarter_week_from_date.Bug-3831.sql @@ -1,3 +1,5 @@ +set time zone interval '+02:00' hour to minute; + create table my_dates(dt date, ts timestamp, tstz timestamp with time zone); insert into my_dates values (date '2017-06-14', timestamp '2017-06-14 12:12:12.12', timestamp with time zone '2017-06-14 12:12:12.12 CET+1'); insert into my_dates values (date '2016-07-14', timestamp '2016-07-14 12:12:12.12', timestamp with time zone '2016-07-14 12:12:12.12 CET+1'); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Approve error code.
Changeset: 3496afde33df for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3496afde33df Modified Files: sql/test/BugTracker-2015/Tests/string_split.Bug-3564.stable.err Branch: default Log Message: Approve error code. diffs (11 lines): diff --git a/sql/test/BugTracker-2015/Tests/string_split.Bug-3564.stable.err b/sql/test/BugTracker-2015/Tests/string_split.Bug-3564.stable.err --- a/sql/test/BugTracker-2015/Tests/string_split.Bug-3564.stable.err +++ b/sql/test/BugTracker-2015/Tests/string_split.Bug-3564.stable.err @@ -33,6 +33,7 @@ stderr of test 'string_split.Bug-3564` i MAPI = (monetdb) /var/tmp/mtest-61161/.s.monetdb.38988 QUERY = select split_part('joeuser@mydatabase','@',0) AS "an error"; ERROR = !field position must be greater than zero +CODE = 42000 # 15:17:36 > # 15:17:36 > "Done." ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: trails - Clean factory parameters after each call, gene...
Changeset: b6e77ef8a714 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b6e77ef8a714 Added Files: sql/backends/monet5/Tests/cfunction02.sql sql/backends/monet5/Tests/cfunction02.stable.err sql/backends/monet5/Tests/cfunction02.stable.out Removed Files: sql/backends/monet5/Tests/cfunction03.sql Modified Files: monetdb5/mal/mal_factory.c monetdb5/optimizer/opt_wrapper.c sql/backends/monet5/Tests/All sql/backends/monet5/sql_gencode.c Branch: trails Log Message: Clean factory parameters after each call, generate proper "fake" returns in the last statements in factories created from SQL. diffs (267 lines): diff --git a/monetdb5/mal/mal_factory.c b/monetdb5/mal/mal_factory.c --- a/monetdb5/mal/mal_factory.c +++ b/monetdb5/mal/mal_factory.c @@ -143,9 +143,22 @@ runFactory(Client cntxt, MalBlkPtr mb, M } pl->stk->stkbot= mb->vtop; /* stack already initialized */ msg = runMAL(cntxt, mb, 0, pl->stk); -} else { + } else { msg = reenterMAL(cntxt, mb, pl->pc, -1, pl->stk); } + if(pl->stk) { + i = psig->retc; + for (k = pci->retc; i < pci->argc; i++, k++) { //for subsequent calls, the previous arguments must be freed + lhs = &pl->stk->stk[psig->argv[k]]; + /* variable arguments ? */ + if (k == psig->argc - 1) + k--; + if (lhs->vtype == TYPE_str) { + GDKfree(lhs->val.sval); + lhs->val.sval = NULL; + } + } + } /* propagate change in debugging status */ if (cmd && pl->stk && pl->stk->cmd != cmd && cmd != 'x') for (; stk; stk = stk->up) @@ -341,10 +354,6 @@ shutdownFactory(Client cntxt, MalBlkPtr pl->caller = NULL; pl->pci = NULL; pl->env = NULL; - pl->client = NULL; - pl->caller = NULL; - pl->env= NULL; - pl->pci = NULL; } return MAL_SUCCEED; } @@ -400,10 +409,6 @@ void mal_factory_reset(void) pl->caller = NULL; pl->pci = NULL; pl->env = NULL; - pl->client = NULL; - pl->caller = NULL; - pl->env= NULL; - pl->pci = NULL; } plantId = 1; lastPlant = 0; diff --git a/monetdb5/optimizer/opt_wrapper.c b/monetdb5/optimizer/opt_wrapper.c --- a/monetdb5/optimizer/opt_wrapper.c +++ b/monetdb5/optimizer/opt_wrapper.c @@ -26,6 +26,7 @@ #include "opt_candidates.h" #include "opt_constants.h" #include "opt_costModel.h" +#include "opt_cquery.h" #include "opt_dataflow.h" #include "opt_deadcode.h" #include "opt_emptybind.h" @@ -48,7 +49,6 @@ #include "opt_remap.h" #include "opt_remoteQueries.h" #include "opt_reorder.h" -#include "opt_cquery.h" #include "opt_volcano.h" #include "opt_wlc.h" @@ -64,6 +64,7 @@ struct{ {"commonTerms", &OPTcommonTermsImplementation,0,0}, {"constants", &OPTconstantsImplementation,0,0}, {"costModel", &OPTcostModelImplementation,0,0}, + {"cquery", &OPTcqueryImplementation,0,0}, {"dataflow", &OPTdataflowImplementation,0,0}, {"deadcode", &OPTdeadcodeImplementation,0,0}, {"emptybind", &OPTemptybindImplementation,0,0}, @@ -71,7 +72,6 @@ struct{ {"garbageCollector", &OPTgarbageCollectorImplementation,0,0}, {"generator", &OPTgeneratorImplementation,0,0}, {"inline", &OPTinlineImplementation,0,0}, - {"cquery", &OPTcqueryImplementation,0,0}, {"jit", &OPTjitImplementation,0,0}, {"json", &OPTjsonImplementation,0,0}, {"matpack", &OPTmatpackImplementation,0,0}, diff --git a/sql/backends/monet5/Tests/All b/sql/backends/monet5/Tests/All --- a/sql/backends/monet5/Tests/All +++ b/sql/backends/monet5/Tests/All @@ -114,6 +114,7 @@ cqstream03 cfunction00 cfunction01 +cfunction02 factory00 factory01 diff --git a/sql/backends/monet5/Tests/cfunction03.sql b/sql/backends/monet5/Tests/cfunction02.sql rename from sql/backends/monet5/Tests/cfunction03.sql rename to sql/backends/monet5/Tests/cfunction02.sql diff --git a/sql/backends/monet5/Tests/cfunction02.stable.err b/sql/backends/monet5/Tests/cfunction02.stable.err new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/Tests/cfunction02.stable.err @@ -0,0 +1,34 @@ +stderr of test 'cfunction02` in directory 'sql/backends/monet5` itself: + + +# 17:04:52 > +# 17:04:52 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=39818" "--set" "mapi_usock=/var/tmp/mtest-27977/.s.monetdb.39818" "--s