MonetDB: default - Merge with Dec2016 branch.
Changeset: 54a8c9d99dc3 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=54a8c9d99dc3 Added Files: sql/test/BugTracker-2017/Tests/nestedoperators.Bug-6292.sql Modified Files: sql/test/BugTracker-2017/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (57 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 @@ -45,3 +45,4 @@ wrong_aggregation_count.Bug-6257 select.Bug-6259 function_and_mergetable.Bug-6288 crash_in_in_handling.Bug-6260 +nestedoperators.Bug-6292 diff --git a/sql/test/BugTracker-2017/Tests/nestedoperators.Bug-6292.sql b/sql/test/BugTracker-2017/Tests/nestedoperators.Bug-6292.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2017/Tests/nestedoperators.Bug-6292.sql @@ -0,0 +1,44 @@ +CREATE TABLE rooms( + time timestamp, + room string, + level integer, + temp double, + PRIMARY KEY(time, room,level) ); + +insert into rooms values +(timestamp '2017/01/01 09:00:00.000', 'L302', 3, 21.3), +(timestamp '2017/01/01 09:00:15.000', 'L302', 3, 21.3), +(timestamp '2017/01/01 09:00:30.000', 'L302', 3, 21.4), +(timestamp '2017/01/01 09:00:45.000', 'L302', 3, 21.5), +(timestamp '2017/01/01 10:00:00.000', 'L302', 3, 21.4), +(timestamp '2017/01/01 10:00:15.000', 'L302', 3, 21.4), +(timestamp '2017/01/01 10:00:30.000', 'L302', 3, 21.4), +(timestamp '2017/01/01 10:00:45.000', 'L302', 3, 21.5), +(timestamp '2017/01/01 11:00:00.000', 'L302', 3, 21.4), +(timestamp '2017/01/01 11:00:15.000', 'L302', 3, 21.4), +(timestamp '2017/01/01 11:00:30.000', 'L302', 3, 21.4), +(timestamp '2017/01/01 11:00:45.000', 'L302', 3, 21.5); + +--derivative +WITH bounds(first, last, period) +AS (SELECT min(time) AS mintime, max(time) as maxtime, epoch(time)/60 AS period FROM rooms GROUP BY period) +SELECT r2.time, r2.room, r2.level, (r2.temp - r1.temp)/ (epoch(bounds.last) - epoch(bounds.first)) FROM bounds, rooms r1, rooms r2 +WHERE r1.time = bounds.first and r2.time = bounds.last and r1.room = r2.room and r1.level = r2.level; + +--derivative function with hardcoded stride +--causes an infinite loop. +CREATE FUNCTION rooms_derivative( stride bigint) +RETURNS TABLE( +time timestamp, +room string, +level integer, +temp double) +BEGIN + RETURN + WITH bounds(first, last, period) + AS (SELECT min(time) AS mintime, max(time) as maxtime, epoch(time)/60 AS period FROM rooms GROUP BY period) + SELECT r2.time, r2.room, r2.level, (r2.temp - r1.temp)/ (epoch(bounds.last) - epoch(bounds.first)) FROM bounds, rooms r1, rooms r2 + WHERE r1.time = bounds.first and r2.time = bounds.last and r1.room = r2.room and r1.level = r2.level; +END; + +DROP TABLE rooms; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 5349ad317813 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5349ad317813 Removed Files: monetdb5/scheduler/srvpool.c monetdb5/scheduler/srvpool.h monetdb5/scheduler/srvpool.mal Modified Files: NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out geom/monetdb5/Makefile.ag monetdb5/extras/mal_optimizer_template/Makefile.ag monetdb5/mal/mal_linker.c monetdb5/modules/kernel/Makefile.ag monetdb5/modules/mal/Makefile.ag monetdb5/modules/mal/mal_init.mal monetdb5/scheduler/Makefile.ag sql/backends/monet5/LSST/Makefile.ag sql/backends/monet5/Makefile.ag sql/backends/monet5/UDF/pyapi/pyapi.c sql/backends/monet5/vaults/Makefile.ag sql/backends/monet5/vaults/fits/Makefile.ag sql/backends/monet5/vaults/netcdf/Makefile.ag Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 969 to 300 lines): diff --git a/NT/installer32/MonetDB5-SQL-Installer.vdproj b/NT/installer32/MonetDB5-SQL-Installer.vdproj --- a/NT/installer32/MonetDB5-SQL-Installer.vdproj +++ b/NT/installer32/MonetDB5-SQL-Installer.vdproj @@ -585,12 +585,6 @@ } "Entry" { -"MsmKey" = "8:_8F6BBCFB08084CD1AF561D7CF43D5BD5" -"OwnerKey" = "8:_UNDEFINED" -"MsmSig" = "8:_UNDEFINED" -} -"Entry" -{ "MsmKey" = "8:_90BC4B557F7942DD8DEAC13CD0EB6FE9" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -2912,26 +2906,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_8F6BBCFB08084CD1AF561D7CF43D5BD5" -{ -"SourcePath" = "8:lib\\monetdb5\\srvpool.mal" -"TargetName" = "8:srvpool.mal" -"Tag" = "8:" -"Folder" = "8:_B593DAA0787744D6A44D17884E0C3951" -"Condition" = "8:" -"Transitive" = "11:FALSE" -"Vital" = "11:TRUE" -"ReadOnly" = "11:FALSE" -"Hidden" = "11:FALSE" -"System" = "11:FALSE" -"Permanent" = "11:FALSE" -"SharedLegacy" = "11:FALSE" -"PackageAs" = "3:1" -"Register" = "3:1" -"Exclude" = "11:FALSE" -"IsDependency" = "11:FALSE" -"IsolateTo" = "8:" -} "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_90BC4B557F7942DD8DEAC13CD0EB6FE9" { "SourcePath" = "8:lib\\monetdb5\\createdb\\14_inet.sql" diff --git a/NT/installer64/MonetDB5-SQL-Installer.vdproj b/NT/installer64/MonetDB5-SQL-Installer.vdproj --- a/NT/installer64/MonetDB5-SQL-Installer.vdproj +++ b/NT/installer64/MonetDB5-SQL-Installer.vdproj @@ -585,12 +585,6 @@ } "Entry" { -"MsmKey" = "8:_8F6BBCFB08084CD1AF561D7CF43D5BD5" -"OwnerKey" = "8:_UNDEFINED" -"MsmSig" = "8:_UNDEFINED" -} -"Entry" -{ "MsmKey" = "8:_90BC4B557F7942DD8DEAC13CD0EB6FE9" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -2912,26 +2906,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_8F6BBCFB08084CD1AF561D7CF43D5BD5" -{ -"SourcePath" = "8:lib\\monetdb5\\srvpool.mal" -"TargetName" = "8:srvpool.mal" -"Tag" = "8:" -"Folder" = "8:_B593DAA0787744D6A44D17884E0C3951" -"Condition" = "8:" -"Transitive" = "11:FALSE" -"Vital" = "11:TRUE" -"ReadOnly" = "11:FALSE" -"Hidden" = "11:FALSE" -"System" = "11:FALSE" -"Permanent" = "11:FALSE" -"SharedLegacy" = "11:FALSE" -"PackageAs" = "3:1" -"Register" = "3:1" -"Exclude" = "11:FALSE" -"IsDependency" = "11:FALSE" -"IsolateTo" = "8:" -} "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_90BC4B557F7942DD8DEAC13CD0EB6FE9" { "SourcePath" = "8:lib\\monetdb5\\createdb\\14_inet.sql" diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -8270,7 +8270,6 @@ Ready. [ "sample","subuniform", "command sample.subuniform(b:bat[:any], p:dbl):bat[:oid] ", "SAMPLEuniform_dbl;", "Returns the oids of a uniform sample of size = (p x count(b)), where 0 <= p <= 1.0"] [ "scheduler", "pattern", "pattern scheduler.pattern(pat:str):void ", "SRVsetServers;", "Activate the peers matching the pat
MonetDB: default - Merge with Dec2016 branch.
Changeset: 15f6abfbff85 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=15f6abfbff85 Added Files: sql/test/BugTracker-2017/Tests/crash_in_in_handling.Bug-6260.sql sql/test/BugTracker-2017/Tests/crash_in_in_handling.Bug-6260.stable.err sql/test/BugTracker-2017/Tests/crash_in_in_handling.Bug-6260.stable.out sql/test/BugTracker-2017/Tests/function_and_mergetable.Bug-6288.sql sql/test/BugTracker-2017/Tests/function_and_mergetable.Bug-6288.stable.err sql/test/BugTracker-2017/Tests/function_and_mergetable.Bug-6288.stable.out sql/test/leaks/Tests/check1.reqtests sql/test/leaks/Tests/check1.sql sql/test/leaks/Tests/check2.reqtests sql/test/leaks/Tests/check3.reqtests sql/test/leaks/Tests/check4.reqtests sql/test/leaks/Tests/check5.reqtests sql/test/leaks/Tests/drop3.reqtests sql/test/leaks/Tests/initialize.sql sql/test/leaks/Tests/initialize.stable.err sql/test/leaks/Tests/initialize.stable.out sql/test/leaks/Tests/select1.reqtests sql/test/leaks/Tests/select2.reqtests sql/test/leaks/Tests/temp1.reqtests sql/test/leaks/Tests/temp2.reqtests sql/test/leaks/Tests/temp3.reqtests Removed Files: sql/test/leaks/Tests/check0.sql sql/test/leaks/Tests/check0.stable.err sql/test/leaks/Tests/check0.stable.out sql/test/leaks/Tests/check0.stable.out.int128 sql/test/leaks/Tests/check1.sql.src Modified Files: configure.ag monetdb5/ChangeLog.Dec2016 monetdb5/mal/mal_parser.c monetdb5/mal/mal_stack.c sql/backends/monet5/rel_bin.c sql/server/rel_optimizer.c sql/server/rel_select.c sql/server/sql_atom.c sql/test/BugTracker-2016/Tests/storagemodel.stable.out sql/test/BugTracker-2017/Tests/All sql/test/leaks/Tests/All sql/test/leaks/Tests/check1.stable.out sql/test/leaks/Tests/check2.sql.src sql/test/leaks/Tests/check2.stable.out sql/test/leaks/Tests/check3.sql.src sql/test/leaks/Tests/check3.stable.out sql/test/leaks/Tests/check4.sql.src sql/test/leaks/Tests/check4.stable.out sql/test/leaks/Tests/check5.sql.src sql/test/leaks/Tests/check5.stable.out sql/test/leaks/Tests/drop3.stable.out sql/test/leaks/Tests/drop3.stable.out.int128 sql/test/leaks/Tests/select1.stable.out sql/test/leaks/Tests/select2.stable.out sql/test/leaks/Tests/temp1.stable.out sql/test/leaks/Tests/temp1.stable.out.int128 testing/Mtest.py.in Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 1445 to 300 lines): diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -2382,6 +2382,21 @@ AS_CASE([$have_lidar], AS_VAR_IF([have_liblas], [no], [], [ LIBLAS_INCS=`$LIBLAS_CONFIG --includes` LIBLAS_LIBS=`$LIBLAS_CONFIG --libs`]) + # liblas-config and liblas/capi/liblas.h could be in different + # packages (think Ubuntu) so we need to test for them both + AS_VAR_IF([have_liblas], [no], [], [ + save_CPPFLAGS="$CPPFLAGS" + save_LDFLAGS="$LDFLAGS" + save_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $LIBLAS_INCS" + LDFLAGS="$LDFLAGS $LIBLAS_LIBS" + LIBS="" + AC_CHECK_HEADER([liblas/capi/liblas.h], [], + [have_liblas=no +why_have_liblas="(liblas/capi/liblas.h header file not found)"]) + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS"]) # if lidar is enabled and liblas was not found abort AS_VAR_IF([have_liblas], [no], [ AS_VAR_IF([have_lidar], [yes], @@ -2402,12 +2417,9 @@ AC_SUBST([LIBLAS_RPM]) AC_SUBST([LIBLAS_INCS]) AC_SUBST([LIBLAS_LIBS]) -AC_MSG_CHECKING([enable lidar: $have_lidar]) AM_CONDITIONAL([HAVE_LIDAR], [test "x$have_lidar" = xyes -o "x$have_lidar" = xauto]) -AC_MSG_CHECKING(['enable lidar: $have_lidar']) - # gdal org_have_gdal="auto" have_gdal=$org_have_gdal diff --git a/monetdb5/ChangeLog.Dec2016 b/monetdb5/ChangeLog.Dec2016 --- a/monetdb5/ChangeLog.Dec2016 +++ b/monetdb5/ChangeLog.Dec2016 @@ -1,3 +1,7 @@ # ChangeLog file for MonetDB5 # This file is updated with Maddlog +* Wed Apr 19 2017 Sjoerd Mullender +- Fixed a bug causing a crash during cleanup when mserver5 is stopped + with monetdb stop database. + diff --git a/monetdb5/mal/mal_parser.c b/monetdb5/mal/mal_parser.c --- a/monetdb5/mal/mal_parser.c +++ b/monetdb5/mal/mal_parser.c @@ -1129,6 +1129,7 @@ fcnHeader(Client cntxt, int kind) freeSymbol(cntxt->curprg); cntxt->curprg = cntxt->backup; cntxt->backup = 0; +
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 152e4a697a97 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=152e4a697a97 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: a5d26b279988 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a5d26b279988 Modified Files: .hgtags MonetDB.spec debian/changelog gdk/ChangeLog-Archive gdk/ChangeLog.Dec2016 libversions monetdb5/ChangeLog-Archive monetdb5/ChangeLog.Dec2016 sql/ChangeLog-Archive sql/ChangeLog.Dec2016 Branch: default Log Message: Merge with Dec2016 branch. diffs (161 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -664,3 +664,6 @@ 94a35822a8d9dfc6458a2353168e37a21b16ea29 8dcbdc30cd49d1d03e3a21b37671d567d84943ae Dec2016_SP3_release 07824a1c7beb75308b813378af33c243f1c2f511 Dec2016_17 07824a1c7beb75308b813378af33c243f1c2f511 Dec2016_SP4_release +c57454c6c6f6e77fbbdf70de32a7cc845b67d1dd Dec2016_19 +07824a1c7beb75308b813378af33c243f1c2f511 Dec2016_SP4_release +c57454c6c6f6e77fbbdf70de32a7cc845b67d1dd Dec2016_SP4_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -953,6 +953,21 @@ rm -f %{buildroot}%{_bindir}/Maddlog %postun -p /sbin/ldconfig %changelog +* Tue Apr 18 2017 Sjoerd Mullender - 11.25.19-20170418 +- Rebuilt. +- BZ#6259: crash on select query from sqlitelogictests + +* Tue Apr 18 2017 Sjoerd Mullender - 11.25.19-20170418 +- gdk: A potential deadlock was fixed in order index creation. +- gdk: A bug that could happen during recovery of the write-ahead log (WAL) + was fixed. See changeset 98ad79c555cc for details. + +* Tue Apr 18 2017 Sjoerd Mullender - 11.25.19-20170418 +- monetdb5: Some memory leaks were plugged. + +* Tue Apr 18 2017 Sjoerd Mullender - 11.25.19-20170418 +- sql: Some memory leaks were plugged. + * Tue Apr 11 2017 Sjoerd Mullender - 11.25.17-20170411 - Rebuilt. - BZ#6110: cast of a SQL boolean value to a string or clob or (var)char diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,30 @@ +monetdb (11.25.19) unstable; urgency=low + + * Rebuilt. + * BZ#6259: crash on select query from sqlitelogictests + + -- Sjoerd Mullender Tue, 18 Apr 2017 10:14:40 +0200 + +monetdb (11.25.19) unstable; urgency=low + + * gdk: A potential deadlock was fixed in order index creation. + * gdk: A bug that could happen during recovery of the write-ahead log (WAL) +was fixed. See changeset 98ad79c555cc for details. + + -- Sjoerd Mullender Tue, 18 Apr 2017 10:14:40 +0200 + +monetdb (11.25.19) unstable; urgency=low + + * monetdb5: Some memory leaks were plugged. + + -- Sjoerd Mullender Tue, 18 Apr 2017 10:14:40 +0200 + +monetdb (11.25.19) unstable; urgency=low + + * sql: Some memory leaks were plugged. + + -- Sjoerd Mullender Tue, 18 Apr 2017 10:14:40 +0200 + monetdb (11.25.17) unstable; urgency=low * Rebuilt. diff --git a/gdk/ChangeLog-Archive b/gdk/ChangeLog-Archive --- a/gdk/ChangeLog-Archive +++ b/gdk/ChangeLog-Archive @@ -1,6 +1,11 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past ChangeLog entries +* Tue Apr 18 2017 Sjoerd Mullender - 11.25.19-20170418 +- A potential deadlock was fixed in order index creation. +- A bug that could happen during recovery of the write-ahead log (WAL) + was fixed. See changeset 98ad79c555cc for details. + * Tue Feb 28 2017 Sjoerd Mullender - 11.25.11-20170313 - Fixed a bug when appending string bats that are fully duplicate eliminated. It could happend that the to-be-appended bat had an empty diff --git a/gdk/ChangeLog.Dec2016 b/gdk/ChangeLog.Dec2016 --- a/gdk/ChangeLog.Dec2016 +++ b/gdk/ChangeLog.Dec2016 @@ -1,8 +1,3 @@ # ChangeLog file for MonetDB # This file is updated with Maddlog -* Tue Apr 18 2017 Sjoerd Mullender -- A potential deadlock was fixed in order index creation. -- A bug that could happen during recovery of the write-ahead log (WAL) - was fixed. See changeset 98ad79c555cc for details. - diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -36,13 +36,13 @@ # version of the GDK library (subdirectory gdk; also includes # common/options and common/utils) -GDK_VERSION=14:5:1 +GDK_VERSION=14:6:1 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=8:1:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras) -MONETDB5_VERSION=22:4:1 +MONETDB5_VERSION=22:5:1 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=9:0:1 diff --git a/monetdb5/ChangeLog-Archive b/monetdb5/ChangeLog-Archive --- a/monetdb5/ChangeLog-Archive +++ b/monetdb5/ChangeLog-Archive @@ -1,6 +1,9 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past ChangeLog entries +* Tue Apr 18 2017 Sjoerd Mullender - 11.25.19-20170418 +- Some memory leaks were plugged. + * Wed Aug 3 2016 Sjoerd Mullender - 11.25.1-20161214 - Removed the zorder module with functions zorder.encode, zorder.decode_x and zorder.decode_y. diff --git a/monetdb5/ChangeLog.Dec2016 b/monetdb5/ChangeL
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 3f626456e044 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3f626456e044 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: c9d50fcfe108 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c9d50fcfe108 Modified Files: gdk/ChangeLog.Dec2016 monetdb5/ChangeLog.Dec2016 sql/ChangeLog.Dec2016 Branch: default Log Message: Merge with Dec2016 branch. diffs (32 lines): diff --git a/gdk/ChangeLog.Dec2016 b/gdk/ChangeLog.Dec2016 --- a/gdk/ChangeLog.Dec2016 +++ b/gdk/ChangeLog.Dec2016 @@ -1,3 +1,8 @@ # ChangeLog file for MonetDB # This file is updated with Maddlog +* Tue Apr 18 2017 Sjoerd Mullender +- A potential deadlock was fixed in order index creation. +- A bug that could happen during recovery of the write-ahead log (WAL) + was fixed. See changeset 98ad79c555cc for details. + diff --git a/monetdb5/ChangeLog.Dec2016 b/monetdb5/ChangeLog.Dec2016 --- a/monetdb5/ChangeLog.Dec2016 +++ b/monetdb5/ChangeLog.Dec2016 @@ -1,3 +1,6 @@ # ChangeLog file for MonetDB5 # This file is updated with Maddlog +* Tue Apr 18 2017 Sjoerd Mullender +- Some memory leaks were plugged. + diff --git a/sql/ChangeLog.Dec2016 b/sql/ChangeLog.Dec2016 --- a/sql/ChangeLog.Dec2016 +++ b/sql/ChangeLog.Dec2016 @@ -1,3 +1,6 @@ # ChangeLog file for sql # This file is updated with Maddlog +* Tue Apr 18 2017 Sjoerd Mullender +- Some memory leaks were plugged. + ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: a697da6e2f62 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a697da6e2f62 Added Files: sql/test/BugTracker-2017/Tests/select.Bug-6259.sql sql/test/BugTracker-2017/Tests/select.Bug-6259.stable.err sql/test/BugTracker-2017/Tests/select.Bug-6259.stable.out Modified Files: gdk/gdk_logger.c gdk/gdk_select.c gdk/gdk_storage.c monetdb5/extras/rapi/rapi.c monetdb5/mal/mal_client.c monetdb5/mal/mal_scenario.c sql/backends/monet5/sql_execute.c sql/backends/monet5/sql_scenario.c sql/backends/monet5/sql_scenario.h sql/test/BugTracker-2017/Tests/All sql/test/SQLite_regress/sqllogictest/Tests/select3.test.stable.out sql/test/SQLite_regress/sqllogictest/Tests/select3.test.stable.out.int128 sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.sql sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.out Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 686 to 300 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -933,6 +933,9 @@ logger_readlog(logger *lg, char *filenam log_return err = LOG_OK; time_t t0, t1; struct stat sb; + int dbg = GDKdebug; + + GDKdebug &= ~(CHECKMASK|PROPMASK); if (lg->debug & 1) { fprintf(stderr, "#logger_readlog opening %s\n", filename); @@ -944,12 +947,14 @@ logger_readlog(logger *lg, char *filenam if (lg->log == NULL || mnstr_errnr(lg->log)) { mnstr_destroy(lg->log); lg->log = NULL; + GDKdebug = dbg; return GDK_SUCCEED; } if (fstat(fileno(getFile(lg->log)), &sb) < 0) { fprintf(stderr, "!ERROR: logger_readlog: fstat on opened file %s failed\n", filename); mnstr_destroy(lg->log); lg->log = NULL; + GDKdebug = dbg; /* If the file could be opened, but fstat fails, * something weird is going on */ return GDK_FAIL; @@ -1082,6 +1087,7 @@ logger_readlog(logger *lg, char *filenam printf("# Finished reading the write-ahead log '%s'\n", filename); fflush(stdout); } + GDKdebug = dbg; /* we cannot distinguish errors from incomplete transactions * (even if we would log aborts in the logs). So we simply * abort and move to the next log file */ diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -1178,6 +1178,8 @@ BAT_scanselect(BAT *b, BAT *s, BAT *bn, th = &vh.v_##TYPE; \ hval = 1; \ } \ + if (*(TYPE*)tl > *(TYPE*)th)\ + return newempty(); \ } \ assert(lval); \ assert(hval); \ diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -828,12 +828,6 @@ BATload_intern(bat bid, int lock) HEAPfree(b->tvheap, 0); return NULL; } - - if ((b->batRestricted == BAT_WRITE && (GDKdebug & CHECKMASK)) || - (GDKdebug & PROPMASK)) { - ++b->batSharecnt; - --b->batSharecnt; - } return b; } diff --git a/monetdb5/extras/rapi/rapi.c b/monetdb5/extras/rapi/rapi.c --- a/monetdb5/extras/rapi/rapi.c +++ b/monetdb5/extras/rapi/rapi.c @@ -482,23 +482,27 @@ void* RAPIloopback(void *query) { if (err) { // there was an error return ScalarString(RSTR(err)); } - if (output && output->nr_cols > 0) { - int i, ncols = output->nr_cols; - SEXP retlist, names, varvalue = R_NilValue; - retlist = PROTECT(allocVector(VECSXP, ncols)); - names = PROTECT(NEW_STRING(ncols)); - for (i = 0; i < ncols; i++) { - if (!(varvalue = bat_to_sexp(BATdescriptor(output->cols[i].b { - UNPROTECT(i + 3); - return ScalarString(RSTR("Conversion error")); + if (output) { + int ncols = output->nr_cols; + if (ncols > 0) { + int i; + SEXP retlist, names, varvalue = R_NilValue; + retlist = PROTECT(allocVector(VECSXP, ncols)); + names = PROTECT(NEW_STRING(ncols)); + for (i = 0; i < n
MonetDB: default - Merge with Dec2016 branch.
Changeset: 605c3f65cc7a for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=605c3f65cc7a Modified Files: gdk/gdk_batop.c gdk/gdk_bbp.c gdk/gdk_logger.c gdk/gdk_orderidx.c monetdb5/mal/mal_stack.c sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/02.stable.out sql/benchmarks/tpch/Tests/01-22.stable.out sql/benchmarks/tpch/Tests/01-22.stable.out.int128 sql/benchmarks/tpch/Tests/02.stable.out sql/server/rel_optimizer.c sql/server/rel_updates.c sql/storage/store.c sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out sql/test/BugTracker-2016/Tests/storagemodel.stable.out sql/test/sql_xml/Tests/xml.reqtests Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 593 to 300 lines): diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -74,8 +74,7 @@ insert_string_bat(BAT *b, BAT *n, BAT *s assert(b->ttype == TYPE_str); /* only transient bats can use some other bat's string heap */ - assert(b->batRole == TRANSIENT || - b->tvheap->parentid == abs(b->batCacheid)); + assert(b->batRole == TRANSIENT || b->tvheap->parentid == b->batCacheid); if (n->batCount == 0 || (s && s->batCount == 0)) return GDK_SUCCEED; ni = bat_iterator(n); diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -1297,7 +1297,7 @@ bm_subcommit(logger *lg, BAT *list_bid, name, (list_bid == catalog_bid) ? BUNtvar(iter, p) : "snapshot"); assert(BBPindex(name)); - n[i++] = abs(BBPindex(name)); + n[i++] = BBPindex(name); } } /* now commit catalog, so it's also up to date on disk */ diff --git a/gdk/gdk_orderidx.c b/gdk/gdk_orderidx.c --- a/gdk/gdk_orderidx.c +++ b/gdk/gdk_orderidx.c @@ -173,6 +173,7 @@ BATorderidx(BAT *b, int stable) oid *restrict mv; oid seq; BUN p, q; + BAT *bn = NULL; if (BATcheckorderidx(b)) return GDK_SUCCEED; @@ -195,7 +196,7 @@ BATorderidx(BAT *b, int stable) if (!BATtdense(b)) { /* we need to sort a copy of the column so as not to * change the original */ - BAT *bn = COLcopy(b, b->ttype, TRUE, TRANSIENT); + bn = COLcopy(b, b->ttype, TRUE, TRANSIENT); if (bn == NULL) { HEAPfree(m, 1); GDKfree(m); @@ -219,7 +220,11 @@ BATorderidx(BAT *b, int stable) BATcount(bn), Tsize(bn), SIZEOF_OID, bn->ttype); } - BBPunfix(bn->batCacheid); + /* we must unfix after releasing the lock since we +* might get deadlock otherwise (we're holding a lock +* based on b->batCacheid; unfix tries to get a lock +* based on bn->batCacheid, usually but (crucially) +* not always a different lock) */ } b->torderidx = m; @@ -227,6 +232,9 @@ BATorderidx(BAT *b, int stable) persistOIDX(b); MT_lock_unset(&GDKhashLock(b->batCacheid)); + if (bn) + BBPunfix(bn->batCacheid); + return GDK_SUCCEED; } @@ -514,7 +522,10 @@ OIDXdestroy(BAT *b) Heap *hp; MT_lock_set(&GDKhashLock(b->batCacheid)); - if ((hp = b->torderidx) == (Heap *) 1) { + hp = b->torderidx; + b->torderidx = NULL; + MT_lock_unset(&GDKhashLock(b->batCacheid)); + if (hp == (Heap *) 1) { GDKunlink(BBPselectfarm(b->batRole, b->ttype, orderidxheap), BATDIR, BBP_physical(b->batCacheid), @@ -523,7 +534,5 @@ OIDXdestroy(BAT *b) HEAPdelete(hp, BBP_physical(b->batCacheid), "torderidx"); GDKfree(hp); } - b->torderidx = NULL; - MT_lock_unset(&GDKhashLock(b->batCacheid)); } } diff --git a/monetdb5/mal/mal_stack.c b/monetdb5/mal/mal_stack.c --- a/monetdb5/mal/mal_stack.c +++ b/monetdb5/mal/mal_stack.c @@ -115,6 +115,10 @@ clearStack(MalStkPtr s) GDKfree(v->val.pval); v->vtype = 0; v->val.pval = NULL; + } else if (BATatoms[v->vtype].atomUnfix) { + BATatoms[v->vtype].atomUnfix(VALget(v)); + v->vtype = 0; + v->val.pval = NULL; } s->stk
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 1b9e7568f4f9 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b9e7568f4f9 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: bfb975822166 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bfb975822166 Modified Files: .hgtags MonetDB.spec debian/changelog libversions sql/ChangeLog-Archive sql/ChangeLog.Dec2016 Branch: default Log Message: Merge with Dec2016 branch. diffs (110 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -662,3 +662,5 @@ 94a35822a8d9dfc6458a2353168e37a21b16ea29 8dcbdc30cd49d1d03e3a21b37671d567d84943ae Dec2016_15 94a35822a8d9dfc6458a2353168e37a21b16ea29 Dec2016_SP3_release 8dcbdc30cd49d1d03e3a21b37671d567d84943ae Dec2016_SP3_release +07824a1c7beb75308b813378af33c243f1c2f511 Dec2016_17 +07824a1c7beb75308b813378af33c243f1c2f511 Dec2016_SP4_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -132,7 +132,7 @@ Vendor: MonetDB BV Group: Applications/Databases License: MPLv2.0 URL: http://www.monetdb.org/ -Source: http://dev.monetdb.org/downloads/sources/Dec2016-SP3/%{name}-%{version}.tar.bz2 +Source: http://dev.monetdb.org/downloads/sources/Dec2016-SP4/%{name}-%{version}.tar.bz2 # we need systemd for the _unitdir macro to exist %if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7 @@ -953,6 +953,22 @@ rm -f %{buildroot}%{_bindir}/Maddlog %postun -p /sbin/ldconfig %changelog +* Tue Apr 11 2017 Sjoerd Mullender - 11.25.17-20170411 +- Rebuilt. +- BZ#6110: cast of a SQL boolean value to a string or clob or (var)char + is wrong +- BZ#6254: Crash (and assertion failure) after querying a view which + uses a correlated subquery in the select-list +- BZ#6256: Assertion Trigger on FULL OUTER JOIN with more than two + BETWEEN clauses +- BZ#6257: wrong count values (1 instead of 0) for correlated aggregation + queries +- BZ#6258: Vulnerability in FITS and NETCDF data vaults + +* Tue Apr 11 2017 Sjoerd Mullender - 11.25.17-20170411 +- sql: Upgrade code was added for an old change in the sys.settimeout function. +- sql: A bug was fixed with the automatic "vacuum" operation on system tables. + * Thu Mar 30 2017 Sjoerd Mullender - 11.25.15-20170330 - Rebuilt. - BZ#6250: Assertion failure when querying a Blob column with order diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,25 @@ +monetdb (11.25.17) unstable; urgency=low + + * Rebuilt. + * BZ#6110: cast of a SQL boolean value to a string or clob or (var)char +is wrong + * BZ#6254: Crash (and assertion failure) after querying a view which +uses a correlated subquery in the select-list + * BZ#6256: Assertion Trigger on FULL OUTER JOIN with more than two +BETWEEN clauses + * BZ#6257: wrong count values (1 instead of 0) for correlated aggregation +queries + * BZ#6258: Vulnerability in FITS and NETCDF data vaults + + -- Sjoerd Mullender Tue, 11 Apr 2017 12:49:56 +0200 + +monetdb (11.25.17) unstable; urgency=low + + * sql: Upgrade code was added for an old change in the sys.settimeout function. + * sql: A bug was fixed with the automatic "vacuum" operation on system tables. + + -- Sjoerd Mullender Tue, 11 Apr 2017 12:49:56 +0200 + monetdb (11.25.15) unstable; urgency=low * Rebuilt. diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -36,7 +36,7 @@ # version of the GDK library (subdirectory gdk; also includes # common/options and common/utils) -GDK_VERSION=14:4:1 +GDK_VERSION=14:5:1 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=8:1:0 diff --git a/sql/ChangeLog-Archive b/sql/ChangeLog-Archive --- a/sql/ChangeLog-Archive +++ b/sql/ChangeLog-Archive @@ -1,6 +1,10 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past ChangeLog entries +* Tue Apr 11 2017 Sjoerd Mullender - 11.25.17-20170411 +- Upgrade code was added for an old change in the sys.settimeout function. +- A bug was fixed with the automatic "vacuum" operation on system tables. + * Wed Aug 3 2016 Sjoerd Mullender - 11.25.1-20161214 - Removed functions sys.zorder_encode, sys.zorder_decode_x, and sys.zorder_decode_y. diff --git a/sql/ChangeLog.Dec2016 b/sql/ChangeLog.Dec2016 --- a/sql/ChangeLog.Dec2016 +++ b/sql/ChangeLog.Dec2016 @@ -1,7 +1,3 @@ # ChangeLog file for sql # This file is updated with Maddlog -* Tue Apr 11 2017 Sjoerd Mullender -- Upgrade code was added for an old change in the sys.settimeout function. -- A bug was fixed with the automatic "vacuum" operation on system tables. - ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 6b8270ce8bd4 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6b8270ce8bd4 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: a2b8b69d8c19 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a2b8b69d8c19 Modified Files: gdk/gdk_bat.c sql/ChangeLog.Dec2016 sql/backends/monet5/sql_upgrades.c sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 Branch: default Log Message: Merge with Dec2016 branch. diffs (180 lines): diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -1194,7 +1194,8 @@ BUNinplace(BAT *b, BUN p, const void *t, b->tnorevsorted = 0; if (((b->ttype != TYPE_void) & b->tkey & !b->tunique) && b->batCount > 1) { BATkey(b, FALSE); - } + } else if (!b->tkey && (b->tnokey[0] == p || b->tnokey[1] == p)) + b->tnokey[0] = b->tnokey[1] = 0; if (b->tnonil) b->tnonil = t && atom_CMP(t, ATOMnilptr(b->ttype), b->ttype) != 0; b->theap.dirty = TRUE; diff --git a/sql/ChangeLog.Dec2016 b/sql/ChangeLog.Dec2016 --- a/sql/ChangeLog.Dec2016 +++ b/sql/ChangeLog.Dec2016 @@ -1,3 +1,7 @@ # ChangeLog file for sql # This file is updated with Maddlog +* Tue Apr 11 2017 Sjoerd Mullender +- Upgrade code was added for an old change in the sys.settimeout function. +- A bug was fixed with the automatic "vacuum" operation on system tables. + diff --git a/sql/backends/monet5/sql_upgrades.c b/sql/backends/monet5/sql_upgrades.c --- a/sql/backends/monet5/sql_upgrades.c +++ b/sql/backends/monet5/sql_upgrades.c @@ -1382,12 +1382,14 @@ sql_update_dec2016_sp3(Client c, mvc *sq pos += snprintf(buf + pos, bufsize - pos, "set schema \"sys\";\n" - "drop procedure sys.settimeout(bigint);" - "drop procedure sys.settimeout(bigint,bigint);" - "drop procedure sys.setsession(bigint);" - "create procedure sys.settimeout(\"query\" bigint) external name clients.settimeout;" - "create procedure sys.settimeout(\"query\" bigint, \"session\" bigint) external name clients.settimeout;" - "create procedure sys.setsession(\"timeout\" bigint) external name clients.setsession;"); + "drop procedure sys.settimeout(bigint);\n" + "drop procedure sys.settimeout(bigint,bigint);\n" + "drop procedure sys.setsession(bigint);\n" + "create procedure sys.settimeout(\"query\" bigint) external name clients.settimeout;\n" + "create procedure sys.settimeout(\"query\" bigint, \"session\" bigint) external name clients.settimeout;\n" + "create procedure sys.setsession(\"timeout\" bigint) external name clients.setsession;\n" + "insert into sys.systemfunctions (select id from sys.functions where name in ('settimeout', 'setsession') and schema_id = (select id from sys.schemas where name = 'sys') and id not in (select function_id from sys.systemfunctions));\n" + "delete from systemfunctions where function_id not in (select id from functions);\n"); if (schema) pos += snprintf(buf + pos, bufsize - pos, "set schema \"%s\";\n", schema); assert(pos < bufsize); diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 --- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 +++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 @@ -26,6 +26,18 @@ stdout of test 'upgrade` in directory 's Ready. Running database upgrade commands: set schema "sys"; +drop procedure sys.settimeout(bigint); +drop procedure sys.settimeout(bigint,bigint); +drop procedure sys.setsession(bigint); +create procedure sys.settimeout("query" bigint) external name clients.settimeout; +create procedure sys.settimeout("query" bigint, "session" bigint) external name clients.settimeout; +create procedure sys.setsession("timeout" bigint) external name clients.setsession; +insert into sys.systemfunctions (select id from sys.functions where name in ('settimeout', 'setsession') and schema_id = (select id from sys.schemas where name = 'sys') and id not in (select function_id from sys.systemfunctions)); +delete from systemfunctions where function_id not in (select id from functions); +set schema "sys"; + +Running database upgrade commands: +set schema "sys"; delete from sys._columns where table_id = (select id from sys._tables where name = 'connections' and schema_id = (select id from sys.s
MonetDB: default - Merge with Dec2016 branch.
Changeset: e5f7dd52b431 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e5f7dd52b431 Modified Files: MonetDB.spec sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_cast.c sql/backends/monet5/sql_result.c sql/backends/monet5/sql_upgrades.c sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/02.stable.out sql/benchmarks/tpch/Tests/01-22.stable.out sql/benchmarks/tpch/Tests/01-22.stable.out.int128 sql/benchmarks/tpch/Tests/02.stable.out sql/server/rel_optimizer.c sql/server/rel_rel.c sql/test/BugTracker-2009/Tests/bool-str-bug.stable.out sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out 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/BugTracker-2016/Tests/storagemodel.stable.out sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out sql/test/SQLite_regress/sqllogictest/Tests/select3.test.stable.out sql/test/SQLite_regress/sqllogictest/Tests/select3.test.stable.out.int128 sql/test/leaks/Tests/check1.stable.out.int128 Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 52515 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -877,6 +877,15 @@ developer, but if you do want to test, t %build +# There is a bug in GCC version 4.8 on AArch64 architectures +# that causes it to report an internal error when compiling +# testing/difflib.c. The work around is to not use -fstack-protector-strong. +# The bug exhibits itself on CentOS 7 on AArch64. +if [ `gcc -v 2>&1 | grep -c 'Target: aarch64\|gcc version 4\.'` -eq 2 ]; then + # set CFLAGS before configure, so that this value gets used + CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -grecord-gcc-switches ' + export CFLAGS +fi %{configure} \ --enable-assert=no \ --enable-console=yes \ diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c --- a/sql/backends/monet5/rel_bin.c +++ b/sql/backends/monet5/rel_bin.c @@ -217,7 +217,7 @@ handle_in_exps(backend *be, sql_exp *ce, sql_subtype *bt = sql_bind_localtype("bit"); sql_subfunc *cmp = (in) ?sql_bind_func(sql->sa, sql->session->schema, "=", tail_type(c), tail_type(c), F_FUNC) - :sql_bind_func(sql->sa, sql->session->schema, "!=", tail_type(c), tail_type(c), F_FUNC); + :sql_bind_func(sql->sa, sql->session->schema, "<>", tail_type(c), tail_type(c), F_FUNC); sql_subfunc *a = (in)?sql_bind_func(sql->sa, sql->session->schema, "or", bt, bt, F_FUNC) :sql_bind_func(sql->sa, sql->session->schema, "and", bt, bt, F_FUNC); @@ -1705,7 +1705,11 @@ rel2bin_join(backend *be, sql_rel *rel, prop *p; /* only handle simple joins here */ - if (exp_has_func(e) && e->flag != cmp_filter) { + if ((exp_has_func(e) && e->flag != cmp_filter) || + (e->flag == cmp_or && +exps_card(e->l) == CARD_MULTI && +exps_card(e->r) == CARD_MULTI) + ) { if (!join && !list_length(lje)) { stmt *l = bin_first_column(be, left); stmt *r = bin_first_column(be, right); @@ -1910,6 +1914,12 @@ rel2bin_semijoin(backend *be, sql_rel *r /* only handle simple joins here */ if (list_length(lje) && (idx || e->type != e_cmp || e->flag != cmp_equal)) break; + if ((exp_has_func(e) && e->flag != cmp_filter) || + (e->flag == cmp_or && +exps_card(e->l) == CARD_MULTI && +exps_card(e->r) == CARD_MULTI) ) { + break; + } s = exp_bin(be, en->data, left, right, NULL, NULL, NULL, NULL); if (!s) { @@ -1933,8 +1943,12 @@ rel2bin_semijoin(backend *be, sql_rel *r } if (list_length(lje) > 1) { join = releqjoin(be, lje, rje, 0 /* no hash used */, cmp_equal, 0); + } else if (!join && list_length(lje) == list_length(rje) && list_length(lje)) { + join = stmt_join(be, lje->h->data, rje->h->data, 0, cmp_equal); } else
MonetDB: default - Merge with Dec2016 branch.
Changeset: d0a6fc57012f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d0a6fc57012f Modified Files: sql/backends/monet5/sql_execute.c sql/server/rel_select.c Branch: default Log Message: Merge with Dec2016 branch. diffs (41 lines): diff --git a/sql/backends/monet5/sql_execute.c b/sql/backends/monet5/sql_execute.c --- a/sql/backends/monet5/sql_execute.c +++ b/sql/backends/monet5/sql_execute.c @@ -368,7 +368,7 @@ SQLescapeString(str s) { str ret = NULL; char *p, *q; - int len = 0; + size_t len = 0; if(!s) { return NULL; diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -2140,6 +2140,25 @@ rel_logical_value_exp(mvc *sql, sql_rel } return NULL; } + case SQL_EXISTS: + case SQL_NOT_EXISTS: + { + symbol *lo = sc->data.sym; + sql_exp *le = rel_value_exp(sql, rel, lo, f, ek); + sql_subfunc *f = NULL; + + if (!le) + return NULL; + + if (sc->token != SQL_EXISTS) + f = sql_bind_func(sql->sa, sql->session->schema, "sql_not_exists", exp_subtype(le), NULL, F_FUNC); + else + f = sql_bind_func(sql->sa, sql->session->schema, "sql_exists", exp_subtype(le), NULL, F_FUNC); + + if (!f) + return sql_error(sql, 02, "exist operator on type %s missing", exp_subtype(le)->type->sqlname); + return exp_unop(sql->sa, le, f); + } case SQL_LIKE: case SQL_NOT_LIKE: { ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 09dad7e2d985 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=09dad7e2d985 Added Files: sql/test/BugTracker-2015/Tests/crash_timestamp_convert.Bug-3816.stable.out.Darwin.src sql/test/BugTracker-2015/Tests/crash_timestamp_convert.Bug-3816.stable.out.FreeBSD sql/test/BugTracker-2017/Tests/fullouterjoinfilter.Bug-6256.sql sql/test/BugTracker-2017/Tests/fullouterjoinfilter.Bug-6256.stable.err sql/test/BugTracker-2017/Tests/fullouterjoinfilter.Bug-6256.stable.out sql/test/BugTracker-2017/Tests/wrong_aggregation_count.Bug-6257.sql sql/test/BugTracker-2017/Tests/wrong_aggregation_count.Bug-6257.stable.err sql/test/BugTracker-2017/Tests/wrong_aggregation_count.Bug-6257.stable.out Modified Files: sql/backends/monet5/sql_execute.c sql/backends/monet5/sql_scenario.h sql/backends/monet5/vaults/fits/fits.c sql/backends/monet5/vaults/netcdf/netcdf.c sql/test/BugTracker-2015/Tests/schema-trigger.Bug-3710.sql sql/test/BugTracker-2015/Tests/schema-trigger.Bug-3710.stable.err sql/test/BugTracker-2015/Tests/schema-trigger.Bug-3710.stable.out 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/BugTracker-2017/Tests/All sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.sql sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.stable.out Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 1195 to 300 lines): diff --git a/sql/backends/monet5/sql_execute.c b/sql/backends/monet5/sql_execute.c --- a/sql/backends/monet5/sql_execute.c +++ b/sql/backends/monet5/sql_execute.c @@ -352,6 +352,49 @@ SQLrun(Client c, backend *be, mvc *m){ return msg; } +/* + * Escape single quotes and backslashes. This is important to do before calling + * SQLstatementIntern, if we are pasting user provided strings into queries + * passed to the SQLstatementIntern. Otherwise we open ourselves to SQL + * injection attacks. + * + * It returns the input string with all the single quotes(') and the backslashes + * (\) doubled, or NULL, if it could not allocate enough space. + * + * The caller is responsible to free the returned value. + */ +str +SQLescapeString(str s) +{ + str ret = NULL; + char *p, *q; + int len = 0; + + if(!s) { + return NULL; + } + + /* At most we will need 2*strlen(s) + 1 characters */ + len = strlen(s); + ret = (str)GDKmalloc(2*len + 1); + if (!ret) { + return NULL; + } + + for (p = s, q = ret; *p != '\0'; p++, q++) { + *q = *p; + if (*p == '\'') { + *(++q) = '\''; + } + else if (*p == '\\') { + *(++q) = '\\'; + } + } + + *q = '\0'; + return ret; +} + str SQLstatementIntern(Client c, str *expr, str nme, bit execute, bit output, res_table **result) { diff --git a/sql/backends/monet5/sql_scenario.h b/sql/backends/monet5/sql_scenario.h --- a/sql/backends/monet5/sql_scenario.h +++ b/sql/backends/monet5/sql_scenario.h @@ -43,6 +43,7 @@ sql5_export str SQLstatementIntern(Clien sql5_export str SQLcompile(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); sql5_export str SQLinclude(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); sql5_export str SQLCacheRemove(Client c, str nme); +sql5_export str SQLescapeString(str s); sql5_export MT_Lock sql_contextLock; #endif /* _SQL_SCENARIO_H_ */ diff --git a/sql/backends/monet5/vaults/fits/fits.c b/sql/backends/monet5/vaults/fits/fits.c --- a/sql/backends/monet5/vaults/fits/fits.c +++ b/sql/backends/monet5/vaults/fits/fits.c @@ -31,8 +31,6 @@ #define FITS_INS_COL "INSERT INTO sys.fits_columns(id, name, type, units, number, table_id) \ VALUES(%d,'%s','%s','%s',%d,%d);" -#define FILE_INS "INSERT INTO sys.fits_files(id, name) VALUES (%d, '%s');" -#define DEL_TABLE "DELETE FROM sys.fitsfiles;" #define ATTACHDIR "call sys.fitsattach('%s');" static void @@ -572,14 +570,25 @@ str FITSdir(Client cntxt, MalBlkPtr mb, s = stmt; while ((ep = readdir(dp)) != NULL && !msg) { - snprintf(fname, BUFSIZ, "%s%s", dir, ep->d_name); + char *filename = SQLescapeString(ep->d_name); + if (!filename) { + msg = createException(MAL, "fits.listdir", MAL_MALLOC_FAIL); + break; + } + + snprintf(fname, BUFSIZ, "%s%s", dir, filename); status = 0; fits_open_file(&fptr, fname, READONLY, &status); if (
MonetDB: default - Merge with Dec2016 branch.
Changeset: 9d9a7c26dd06 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9d9a7c26dd06 Added Files: sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.sql sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.stable.err sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.stable.out Modified Files: geom/monetdb5/geom.mal sql/server/rel_optimizer.c sql/test/BugTracker-2017/Tests/All sql/test/orderidx/Tests/oidx_all_types.sql sql/test/orderidx/Tests/oidx_all_types.stable.out Branch: default Log Message: Merge with Dec2016 branch. diffs (261 lines): diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -8149,7 +8149,8 @@ rel_find_conflicts(mvc *sql, sql_rel *re case op_project: if (rel->l) exps_find_conflicts(sql, rel->exps, exps, conflicts); - rel->l = rel_find_conflicts(sql, rel->l, exps, conflicts); + if (rel->l && rel_uses_exps(rel->l, exps)) + rel->l = rel_find_conflicts(sql, rel->l, exps, conflicts); /* if project produces given names, then we have a conflict */ if (rel->l) exps_mark_conflicts(sql, rel->exps, conflicts, 0); @@ -8173,7 +8174,7 @@ rel_find_conflicts(mvc *sql, sql_rel *re case op_union: case op_inter: - case op_except: + case op_except: exps_find_conflicts(sql, rel->exps, exps, conflicts); rel->l = rel_find_conflicts(sql, rel->l, exps, conflicts); if (!is_semi(rel->op)) @@ -8358,7 +8359,7 @@ rel_apply_rewrite(int *changes, mvc *sql return l; } } - if (rel->flag == APPLY_LOJ && (r->op == op_select || is_join(r->op))) { + if (rel->flag == APPLY_LOJ && ((r->op == op_select && exps_uses_exps(r->exps, rel->exps)) || is_join(r->op))) { sql_rel *nr, *ns; nr = rel_project(sql->sa, rel_dup(r), 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 @@ -39,3 +39,4 @@ modulo.Bug-6225 one-plus-nil.Bug-6243 with-alias-bug.6246 crash_after_oidx_on_sys_statistics.Bug-6251 +crash_correlated_subqueries_in_select.Bug-6254 diff --git a/sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.sql b/sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.sql @@ -0,0 +1,16 @@ +CREATE VIEW sys.view_stats AS +SELECT s.name AS schema_nm, s.id AS schema_id, t.name AS table_nm, t.id AS table_id, t.system AS is_system_view +, (SELECT CAST(COUNT(*) as int) FROM sys.columns c WHERE c.table_id = t.id) AS "# columns" + FROM sys.tables t JOIN sys.schemas s ON t.schema_id = s.id +WHERE query IS NOT NULL +; --ORDER BY s.name, t.name; + +SELECT * FROM sys.view_stats; +-- prints worrying output in console +SELECT * FROM sys.view_stats WHERE is_system_view; +-- crash +SELECT * FROM sys.view_stats WHERE NOT is_system_view; +-- crash + +DROP VIEW sys.view_stats; + diff --git a/sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.stable.err b/sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.stable.err @@ -0,0 +1,36 @@ +stderr of test 'crash_correlated_subqueries_in_select.Bug-6254` in directory 'sql/test/BugTracker-2017` itself: + + +# 14:28:48 > +# 14:28:48 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=33692" "--set" "mapi_usock=/var/tmp/mtest-6451/.s.monetdb.33692" "--set" "monet_prompt=" "--forcemito" "--dbpath=/export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2017" "--set" "embedded_r=yes" "--set" "embedded_py=true" +# 14:28:48 > + +# builtin opt gdk_dbpath = /export/scratch2/dinther/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 = 33692 +# cmdline opt mapi_usock = /var/tmp/mtest-6451/.s.monetdb.33692 +# cmdline opt monet_prompt = +# cmdline opt gdk_dbpath = /export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_t
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: b03278f0ed63 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b03278f0ed63 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: ae27aeb9df68 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ae27aeb9df68 Modified Files: .hgtags MonetDB.spec debian/changelog libversions Branch: default Log Message: Merge with Dec2016 branch. diffs (56 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -659,3 +659,6 @@ 566c4291d2c2547a2360097c9a1038c2d2064ec3 94a35822a8d9dfc6458a2353168e37a21b16ea29 Dec2016_13 566c4291d2c2547a2360097c9a1038c2d2064ec3 Dec2016_SP3_release 94a35822a8d9dfc6458a2353168e37a21b16ea29 Dec2016_SP3_release +8dcbdc30cd49d1d03e3a21b37671d567d84943ae Dec2016_15 +94a35822a8d9dfc6458a2353168e37a21b16ea29 Dec2016_SP3_release +8dcbdc30cd49d1d03e3a21b37671d567d84943ae Dec2016_SP3_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -944,6 +944,13 @@ rm -f %{buildroot}%{_bindir}/Maddlog %postun -p /sbin/ldconfig %changelog +* Thu Mar 30 2017 Sjoerd Mullender - 11.25.15-20170330 +- Rebuilt. +- BZ#6250: Assertion failure when querying a Blob column with order + by DESC +- BZ#6253: FITS Data Vaults does not work when using user/pw and other + than sys schema name + * Wed Mar 29 2017 Sjoerd Mullender - 11.25.13-20170329 - Rebuilt. - BZ#6216: Assertion raised (sqlsmith) diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +monetdb (11.25.15) unstable; urgency=low + + * Rebuilt. + * BZ#6250: Assertion failure when querying a Blob column with order +by DESC + * BZ#6253: FITS Data Vaults does not work when using user/pw and other +than sys schema name + + -- Sjoerd Mullender Thu, 30 Mar 2017 14:00:54 +0200 + monetdb (11.25.13) unstable; urgency=low * Rebuilt. diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -42,7 +42,7 @@ GDK_VERSION=14:4:1 MAPI_VERSION=8:1:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras) -MONETDB5_VERSION=22:3:1 +MONETDB5_VERSION=22:4:1 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=9:0:1 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: be025514990a for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=be025514990a Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 236e22d08109 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=236e22d08109 Modified Files: sql/backends/monet5/vaults/fits/fits.c Branch: default Log Message: Merge with Dec2016 branch. diffs (28 lines): diff --git a/sql/backends/monet5/vaults/fits/fits.c b/sql/backends/monet5/vaults/fits/fits.c --- a/sql/backends/monet5/vaults/fits/fits.c +++ b/sql/backends/monet5/vaults/fits/fits.c @@ -29,11 +29,11 @@ #include "clients.h" #include "mal_exception.h" -#define FITS_INS_COL "INSERT INTO fits_columns(id, name, type, units, number, table_id) \ +#define FITS_INS_COL "INSERT INTO sys.fits_columns(id, name, type, units, number, table_id) \ VALUES(%d,'%s','%s','%s',%d,%d);" -#define FILE_INS "INSERT INTO fits_files(id, name) VALUES (%d, '%s');" -#define DEL_TABLE "DELETE FROM fitsfiles;" -#define ATTACHDIR "call fitsattach('%s');" +#define FILE_INS "INSERT INTO sys.fits_files(id, name) VALUES (%d, '%s');" +#define DEL_TABLE "DELETE FROM sys.fitsfiles;" +#define ATTACHDIR "call sys.fitsattach('%s');" static void FITSinitCatalog(mvc *m) @@ -69,7 +69,7 @@ FITSinitCatalog(mvc *m) mvc_create_column_(m, fits_col, "id", "int", 32); mvc_create_column_(m, fits_col, "name", "varchar", 80); mvc_create_column_(m, fits_col, "type", "varchar", 80); - mvc_create_column_(m, fits_col, "units", "varchar", 10); + mvc_create_column_(m, fits_col, "units", "varchar", 80); mvc_create_column_(m, fits_col, "number", "int", 32); mvc_create_column_(m, fits_col, "table_id", "int", 32); } ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 7b7fc905a056 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7b7fc905a056 Modified Files: monetdb5/modules/atoms/blob.c sql/backends/monet5/Tests/pyloader04.stable.err sql/backends/monet5/UDF/pyapi/convert_loops.h sql/backends/monet5/UDF/pyapi/emit.c sql/backends/monet5/UDF/pyapi/pyapi.c sql/backends/monet5/UDF/pyapi/pyloader.c Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 476 to 300 lines): diff --git a/monetdb5/modules/atoms/blob.c b/monetdb5/modules/atoms/blob.c --- a/monetdb5/modules/atoms/blob.c +++ b/monetdb5/modules/atoms/blob.c @@ -99,7 +99,7 @@ blob_cmp(blob *l, blob *r) size_t len = l->nitems; if (len != r->nitems) - return len - r->nitems; + return len < r->nitems ? -1 : len > r->nitems ? 1 : 0; if (len == ~(size_t) 0) return (0); diff --git a/sql/backends/monet5/Tests/pyloader04.stable.err b/sql/backends/monet5/Tests/pyloader04.stable.err --- a/sql/backends/monet5/Tests/pyloader04.stable.err +++ b/sql/backends/monet5/Tests/pyloader04.stable.err @@ -32,16 +32,18 @@ stderr of test 'pyloader04` in directory MAPI = (monetdb) /var/tmp/mtest-6147/.s.monetdb.38930 QUERY = COPY LOADER INTO pyloader04table FROM pyloader04(); ERROR = !Python exception +! ! 1. def pyfun(_emit,_conn): -! 2. _emit.emit({'a1': 3, 'a2': 4, 'a3': 5}) -!> 3. +!> 2. _emit.emit({'a1': 3, 'a2': 4, 'a3': 5}) +! 3. !Unmatched element "a3" in dict MAPI = (monetdb) /var/tmp/mtest-6147/.s.monetdb.38930 QUERY = COPY LOADER INTO pyloader04table FROM pyloader04(); ERROR = !Python exception +! ! 1. def pyfun(_emit,_conn): -! 2. _emit.emit({'a1': 3, 'a2': 4, 3: 5}) -!> 3. +!> 2. _emit.emit({'a1': 3, 'a2': 4, 3: 5}) +! 3. !Unmatched element "3" in dict MAPI = (monetdb) /var/tmp/mtest-79373/.s.monetdb.33370 QUERY = COPY LOADER INTO pyloader04table FROM pyloader04(); @@ -74,7 +76,7 @@ ERROR = !Python exception ! 1. def pyfun(_emit,_conn): !> 2. _emit.emit({'a1': 'hello'}) ! 3. -!Conversion Failed: Error converting string. +!Failed conversion: Error converting string. # 12:30:44 > # 12:30:44 > "Done." diff --git a/sql/backends/monet5/UDF/pyapi/convert_loops.h b/sql/backends/monet5/UDF/pyapi/convert_loops.h --- a/sql/backends/monet5/UDF/pyapi/convert_loops.h +++ b/sql/backends/monet5/UDF/pyapi/convert_loops.h @@ -253,8 +253,10 @@ for (iu = 0; iu < ret->count; iu++) \ { \ snprintf(utf8_string, utf8string_minlength, fmt, *((mtpe*)&data[(index_offset * ret->count + iu) * ret->memory_size])); \ -if (BUNappend(bat, utf8_string, FALSE) != GDK_SUCCEED) \ - goto bunins_failed; \ +if (BUNappend(bat, utf8_string, FALSE) != GDK_SUCCEED) { \ +msg = createException(MAL, "pyapi.eval", "BUNappend failed.\n"); \ +goto wrapup; \ +} \ } \ } \ else \ @@ -264,14 +266,18 @@ if (mask[index_offset * ret->count + iu] == TRUE) \ { \ bat->tnil = 1; \ -if (BUNappend(bat, str_nil, FALSE) != GDK_SUCCEED) \ - goto bunins_failed; \ +if (BUNappend(bat, str_nil, FALSE) != GDK_SUCCEED) { \ +msg = createException(MAL, "pyapi.eval", "BUNappend failed.\n"); \ +goto wrapup;
MonetDB: default - Merge with Dec2016 branch.
Changeset: 4fcf45f027df for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4fcf45f027df Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out monetdb5/modules/atoms/blob.c monetdb5/modules/atoms/blob.mal sql/storage/store.c 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 Branch: default Log Message: Merge with Dec2016 branch. diffs (167 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -6184,12 +6184,12 @@ Ready. [ "bbp", "getRefCount", "command bbp.getRefCount(b:bat[:any_1]):int ", "CMDgetBATrefcnt;", "Utility for debugging MAL interpreter" ] [ "bbp", "getStatus","command bbp.getStatus():bat[:str] ", "CMDbbpStatus;","Create a BAT with the disk/load status"] [ "bbp", "setName", "command bbp.setName(b:bat[:any_1], n:str):str ", "CMDsetName;", "Rename a BAT" ] +[ "blob", "#cmp", "command blob.#cmp():void ","BLOBcmp;", "" ] [ "blob", "#del", "command blob.#del():void ","BLOBdel;", "" ] [ "blob", "#fromstr", "command blob.#fromstr():void ", "BLOBfromstr;", "" ] [ "blob", "#hash","command blob.#hash():void ", "BLOBhash;", "" ] [ "blob", "#heap","command blob.#heap():void ", "BLOBheap;", "" ] [ "blob", "#length", "command blob.#length():void ", "BLOBlength;", "" ] -[ "blob", "#nequal", "command blob.#nequal():void ", "BLOBnequal;", "" ] [ "blob", "#null","command blob.#null():void ", "BLOBnull;", "" ] [ "blob", "#put", "command blob.#put():void ","BLOBput;", "" ] [ "blob", "#read","command blob.#read():void ", "BLOBread;", "" ] diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -8153,12 +8153,12 @@ Ready. [ "bbp", "getRefCount", "command bbp.getRefCount(b:bat[:any_1]):int ", "CMDgetBATrefcnt;", "Utility for debugging MAL interpreter" ] [ "bbp", "getStatus","command bbp.getStatus():bat[:str] ", "CMDbbpStatus;","Create a BAT with the disk/load status"] [ "bbp", "setName", "command bbp.setName(b:bat[:any_1], n:str):str ", "CMDsetName;", "Rename a BAT" ] +[ "blob", "#cmp", "command blob.#cmp():void ","BLOBcmp;", "" ] [ "blob", "#del", "command blob.#del():void ","BLOBdel;", "" ] [ "blob", "#fromstr", "command blob.#fromstr():void ", "BLOBfromstr;", "" ] [ "blob", "#hash","command blob.#hash():void ", "BLOBhash;", "" ] [ "blob", "#heap","command blob.#heap():void ", "BLOBheap;", "" ] [ "blob", "#length", "command blob.#length():void ", "BLOBlength;", "" ] -[ "blob", "#nequal", "command blob.#nequal():void ", "BLOBnequal;", "" ] [ "blob", "#null","command blob.#null():void ", "BLOBnull;", "" ] [ "blob", "#put", "command blob.#put():void ","BLOBput;", "" ] [ "blob", "#read","command blob.#read():void ", "BLOBread;", "" ] 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 @@ -819,6 +819,7 @@ str BKCsetkey(bat *res, const bat *bid, str BKCshrinkBAT(bat *ret, const bat *bid, const bat *did); str BLOBblob_blob(blob **d, blob **s); str BLOBblob_fromstr(blob **b, str *d); +int BLOBcmp(blob *l, blob *r); void BLOBdel(Heap *h, var_t *index); str BLOBfromblob(str *retval, blob **b); str BLOBfromidx(str *retval, blob **binp, int *index); @@ -827,7 +828,6 @@ int BLOBget(Heap *h, int *bun, int *l, b BUN BLOBhash(blob *b); void BLOBheap(Heap *heap, size_t capacity); int BLOBlength(blob *p); -int BLOBnequal(blob *l, blob *r); str BLOBnitems(int *ret, blob *b); blob *BLOBnull(void); str BLOBprelude(void *ret); diff --git a/monetdb5/modules/atoms/blob.c b/monetdb5/modules/atoms/blob.c --- a/monetdb5/modules/atoms/blob.c +++ b/monetdb5/modules/atoms/blob.c @@ -39,7 +39,7 @@ mal_export str BLOBprelude(void *ret); mal_export int BLOBtostr(str *tostr, int *l, blob *pin); mal_export int BLOBfromstr(char *instr, int *l, blob **val); -mal_export int BLOBnequal(blob *l, blob *r); +mal_export int BLOBcmp(blob *l, blob *r); mal_export BUN BLOBhash(blob *b); mal_export blob * BLOBnull(vo
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 92caaac827c5 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=92caaac827c5 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 363de59d9863 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=363de59d9863 Modified Files: .hgtags MonetDB.spec debian/changelog libversions Branch: default Log Message: Merge with Dec2016 branch. diffs (81 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -656,3 +656,6 @@ 3968ed7fb6dab04a2530c6c3e1a5ffd6d649298b 615229dc6f3c7dc89bbd9cc5923ad307b4c93cb1 Dec2016_SP2_release 566c4291d2c2547a2360097c9a1038c2d2064ec3 Dec2016_11 566c4291d2c2547a2360097c9a1038c2d2064ec3 Dec2016_SP3_release +94a35822a8d9dfc6458a2353168e37a21b16ea29 Dec2016_13 +566c4291d2c2547a2360097c9a1038c2d2064ec3 Dec2016_SP3_release +94a35822a8d9dfc6458a2353168e37a21b16ea29 Dec2016_SP3_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -944,6 +944,22 @@ rm -f %{buildroot}%{_bindir}/Maddlog %postun -p /sbin/ldconfig %changelog +* Wed Mar 29 2017 Sjoerd Mullender - 11.25.13-20170329 +- Rebuilt. +- BZ#6216: Assertion raised (sqlsmith) +- BZ#6227: Monetdb fails on remote tables +- BZ#6242: Crash on rel_reduce_groupby_exps (sqlsmith) +- BZ#6243: Static optimization gives wrong result (1 + NULL = -127) +- BZ#6245: Nested query crashes all versions of MonetDB or gives wrong + result starting from Dec2016-SP2 +- BZ#6246: update statements: references to a table do not bind to + its alias +- BZ#6247: Type analysis issue (sqlsmith) +- BZ#6248: update statements: the semantic stage does not resolve the + relation in the from clause +- BZ#6251: Crash after adding an ordered index on sys.statistics column + and querying sys.statistics + * Mon Mar 13 2017 Sjoerd Mullender - 11.25.11-20170313 - Rebuilt. - BZ#6138: Weak duplicate elimination in string heaps > 64KB diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,22 @@ +monetdb (11.25.13) unstable; urgency=low + + * Rebuilt. + * BZ#6216: Assertion raised (sqlsmith) + * BZ#6227: Monetdb fails on remote tables + * BZ#6242: Crash on rel_reduce_groupby_exps (sqlsmith) + * BZ#6243: Static optimization gives wrong result (1 + NULL = -127) + * BZ#6245: Nested query crashes all versions of MonetDB or gives wrong +result starting from Dec2016-SP2 + * BZ#6246: update statements: references to a table do not bind to +its alias + * BZ#6247: Type analysis issue (sqlsmith) + * BZ#6248: update statements: the semantic stage does not resolve the +relation in the from clause + * BZ#6251: Crash after adding an ordered index on sys.statistics column +and querying sys.statistics + + -- Sjoerd Mullender Wed, 29 Mar 2017 13:18:23 +0200 + monetdb (11.25.11) unstable; urgency=low * Rebuilt. diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -36,13 +36,13 @@ # version of the GDK library (subdirectory gdk; also includes # common/options and common/utils) -GDK_VERSION=14:3:1 +GDK_VERSION=14:4:1 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=8:1:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras) -MONETDB5_VERSION=22:2:1 +MONETDB5_VERSION=22:3:1 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=9:0:1 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 0ebdd27d6a67 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0ebdd27d6a67 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: a353c55efd8c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a353c55efd8c Modified Files: gdk/gdk_heap.c Branch: default Log Message: Merge with Dec2016 branch. diffs (38 lines): diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c --- a/gdk/gdk_heap.c +++ b/gdk/gdk_heap.c @@ -395,7 +395,7 @@ GDKupgradevarheap(BAT *b, var_t v, int c size_t i, n; size_t savefree; const char *filename; - bat bid; + bat bid = b->batCacheid; assert(b->theap.parentid == 0); assert(width != 0); @@ -430,7 +430,6 @@ GDKupgradevarheap(BAT *b, var_t v, int c filename = b->theap.filename; else filename++; - bid = strtol(filename, NULL, 8); if ((BBP_status(bid) & (BBPEXISTING|BBPDELETED)) && !file_exists(b->theap.farmid, BAKDIR, filename, NULL) && (b->theap.storage != STORE_MEM || @@ -505,7 +504,7 @@ GDKupgradevarheap(BAT *b, var_t v, int c break; case 4: #ifndef NDEBUG - memset(ps, 0, b->theap.base + b->theap.size - (char *) pi); + memset(pi, 0, b->theap.base + b->theap.size - (char *) pi); #endif switch (b->twidth) { case 1: @@ -521,7 +520,7 @@ GDKupgradevarheap(BAT *b, var_t v, int c #if SIZEOF_VAR_T == 8 case 8: #ifndef NDEBUG - memset(ps, 0, b->theap.base + b->theap.size - (char *) pv); + memset(pv, 0, b->theap.base + b->theap.size - (char *) pv); #endif switch (b->twidth) { case 1: ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: c56cca352541 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c56cca352541 Added Files: sql/test/BugTracker-2017/Tests/one-plus-nil.Bug-6243.sql sql/test/BugTracker-2017/Tests/one-plus-nil.Bug-6243.stable.err sql/test/BugTracker-2017/Tests/one-plus-nil.Bug-6243.stable.out sql/test/BugTracker-2017/Tests/with-alias-bug.6246.sql sql/test/BugTracker-2017/Tests/with-alias-bug.6246.stable.err sql/test/BugTracker-2017/Tests/with-alias-bug.6246.stable.out Modified Files: sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_upgrades.c sql/server/rel_dump.c sql/server/rel_optimizer.c sql/server/rel_select.c sql/server/sql_atom.c sql/server/sql_atom.h sql/test/BugTracker-2012/Tests/with_in_derived_table.Bug-3043.stable.out sql/test/BugTracker-2017/Tests/All sql/test/remote/Tests/ssbm.stable.out.int128 Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 871 to 300 lines): diff --git a/sql/backends/monet5/sql_gencode.c b/sql/backends/monet5/sql_gencode.c --- a/sql/backends/monet5/sql_gencode.c +++ b/sql/backends/monet5/sql_gencode.c @@ -175,7 +175,10 @@ static int const char *nme = (op->op3)?op->op3->op4.aval->data.val.sval:op->cname; char buf[64]; - snprintf(buf,64,"A%s",nme); + if (nme[0] != 'A') + snprintf(buf,64,"A%s",nme); + else + snprintf(buf,64,"%s",nme); varid = newVariable(curBlk, buf, strlen(buf), type); curInstr = pushArgument(curBlk, curInstr, varid); setVarType(curBlk, varid, type); diff --git a/sql/backends/monet5/sql_upgrades.c b/sql/backends/monet5/sql_upgrades.c --- a/sql/backends/monet5/sql_upgrades.c +++ b/sql/backends/monet5/sql_upgrades.c @@ -1479,7 +1479,7 @@ SQLupgrades(Client c, mvc *m) } } - if ((sql_update_dec2016_sp2(c, m)) != NULL) { + if ((err = sql_update_dec2016_sp2(c, m)) != NULL) { fprintf(stderr, "!%s\n", err); GDKfree(err); } diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c --- a/sql/server/rel_dump.c +++ b/sql/server/rel_dump.c @@ -592,6 +592,18 @@ skipIdent( char *r, int *pos) (*pos)++; } +static void +skipIdentOrSymbol( char *r, int *pos) +{ + while(r[*pos] && (isalnum(r[*pos]) || + r[*pos] == '_' || r[*pos] == '%' || + r[*pos] == '<' || r[*pos] == '>' || + r[*pos] == '/' || r[*pos] == '*' || + r[*pos] == '-' || r[*pos] == '+' || + r[*pos] == '~' || r[*pos] == '^' )) + (*pos)++; +} + static int readInt( char *r, int *pos) { @@ -724,7 +736,7 @@ exp_read(mvc *sql, sql_rel *lrel, sql_re (*pos)++; tname = b; cname = r + *pos; - skipIdent(r, pos); + skipIdentOrSymbol(r, pos); e = r+*pos; skipWS(r, pos); old = *e; diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -85,12 +85,14 @@ name_find_column( sql_rel *rel, char *rn } if (t->idxs.set) for (cn = t->idxs.set->h; cn; cn = cn->next) { - sql_idx *c = cn->data; - if (strcmp(c->base.name, name+1 /* skip % */) == 0) { + sql_idx *i = cn->data; + if (strcmp(i->base.name, name+1 /* skip % */) == 0) { *bt = rel; - if (pnr < 0 || (c->t->p && - list_position(c->t->p->tables.set, c->t) == pnr)) - return c; + if (pnr < 0 || (i->t->p && + list_position(i->t->p->tables.set, i->t) == pnr)) { + sql_kc *c = i->columns->h->data; + return c->c; + } } } break; @@ -2720,7 +2722,7 @@ exp_simplify_math( mvc *sql, sql_exp *e, atom *ra = exp_flatten(sql, re); if (la && ra) { - atom *a = atom_mul(sql->sa, la, ra); + atom *a = atom_mul(la, ra); if (a) { sql_exp *ne = exp_atom(sql->sa, a); @@ -2766,10 +2768,11 @@ exp_simplify_math( mvc *sql, sql_exp *e,
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 0ee640e2f86e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0ee640e2f86e Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 671f6403c54c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=671f6403c54c Modified Files: .hgtags MonetDB.spec debian/changelog gdk/ChangeLog-Archive gdk/ChangeLog.Dec2016 libversions Branch: default Log Message: Merge with Dec2016 branch. diffs (135 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -654,3 +654,5 @@ 3968ed7fb6dab04a2530c6c3e1a5ffd6d649298b 615229dc6f3c7dc89bbd9cc5923ad307b4c93cb1 Dec2016_9 3968ed7fb6dab04a2530c6c3e1a5ffd6d649298b Dec2016_SP2_release 615229dc6f3c7dc89bbd9cc5923ad307b4c93cb1 Dec2016_SP2_release +566c4291d2c2547a2360097c9a1038c2d2064ec3 Dec2016_11 +566c4291d2c2547a2360097c9a1038c2d2064ec3 Dec2016_SP3_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -132,7 +132,7 @@ Vendor: MonetDB BV Group: Applications/Databases License: MPLv2.0 URL: http://www.monetdb.org/ -Source: http://dev.monetdb.org/downloads/sources/Dec2016-SP2/%{name}-%{version}.tar.bz2 +Source: http://dev.monetdb.org/downloads/sources/Dec2016-SP3/%{name}-%{version}.tar.bz2 # we need systemd for the _unitdir macro to exist %if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7 @@ -944,6 +944,26 @@ rm -f %{buildroot}%{_bindir}/Maddlog %postun -p /sbin/ldconfig %changelog +* Mon Mar 13 2017 Sjoerd Mullender - 11.25.11-20170313 +- Rebuilt. +- BZ#6138: Weak duplicate elimination in string heaps > 64KB +- BZ#6183: ResultSet returns double quoted column name if name contains + space characters +- BZ#6219: Crash in rel_optimizer (sqlsmith) +- BZ#6228: mclient crashes if real column is multiplied by it itself +- BZ#6229: ANALYZE, unexpected end of input +- BZ#6230: ANALYZE, syntax error +- BZ#6237: semijoin with empty right bat does not return immediately + +* Tue Feb 28 2017 Sjoerd Mullender - 11.25.11-20170313 +- gdk: Fixed a bug when appending string bats that are fully duplicate + eliminated. It could happend that the to-be-appended bat had an empty + string at an offset and at that same offset in the to-be-appended-to bat + there happened to be a (sequence of) NULL(s). Then this offset would be + used, even though it might nog be the right offset for the empty string + in the to-be-appended-to bat. This would result in multiple offsets for + the empty string, breaking the promise of being duplicate eliminated. + * Mon Feb 27 2017 Panagiotis Koutsourakis - 11.25.9-20170227 - Rebuilt. - BZ#6217: Segfault in rel_optimizer (sqlsmith) diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,29 @@ +monetdb (11.25.11) unstable; urgency=low + + * Rebuilt. + * BZ#6138: Weak duplicate elimination in string heaps > 64KB + * BZ#6183: ResultSet returns double quoted column name if name contains +space characters + * BZ#6219: Crash in rel_optimizer (sqlsmith) + * BZ#6228: mclient crashes if real column is multiplied by it itself + * BZ#6229: ANALYZE, unexpected end of input + * BZ#6230: ANALYZE, syntax error + * BZ#6237: semijoin with empty right bat does not return immediately + + -- Sjoerd Mullender Mon, 13 Mar 2017 10:10:14 +0100 + +monetdb (11.25.11) unstable; urgency=low + + * gdk: Fixed a bug when appending string bats that are fully duplicate +eliminated. It could happend that the to-be-appended bat had an empty +string at an offset and at that same offset in the to-be-appended-to bat +there happened to be a (sequence of) NULL(s). Then this offset would be +used, even though it might nog be the right offset for the empty string +in the to-be-appended-to bat. This would result in multiple offsets for +the empty string, breaking the promise of being duplicate eliminated. + + -- Sjoerd Mullender Tue, 28 Feb 2017 10:10:14 +0100 + monetdb (11.25.9) unstable; urgency=low * Rebuilt. diff --git a/gdk/ChangeLog-Archive b/gdk/ChangeLog-Archive --- a/gdk/ChangeLog-Archive +++ b/gdk/ChangeLog-Archive @@ -1,6 +1,15 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past ChangeLog entries +* Tue Feb 28 2017 Sjoerd Mullender - 11.25.11-20170313 +- Fixed a bug when appending string bats that are fully duplicate + eliminated. It could happend that the to-be-appended bat had an empty + string at an offset and at that same offset in the to-be-appended-to bat + there happened to be a (sequence of) NULL(s). Then this offset would be + used, even though it might nog be the right offset for the empty string + in the to-be-appended-to bat. This would result in multiple offsets for + the empty string, breaking the promise of being duplicate eliminated. + * Thu Dec 1 2016 Sjoerd Mullender - 11.25.1-20161214 - The tnokey values must now be 0 if it is not known whether all values in a column are distinct. diff --git a/gdk/ChangeLog.Dec2016 b/gdk/ChangeLog.Dec2016 --- a/gdk/ChangeLog.Dec2016 +++ b/gdk/ChangeLog.Dec2016 @@ -1,12 +1,3 @@ # ChangeLo
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: dcb97dc28e40 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dcb97dc28e40 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 100fc99826b9 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=100fc99826b9 Added Files: sql/jdbc/tests/Tests/BugResultSetMetaData_Bug_6183.SQL.bat sql/jdbc/tests/Tests/BugResultSetMetaData_Bug_6183.SQL.sh sql/jdbc/tests/Tests/BugResultSetMetaData_Bug_6183.stable.err sql/jdbc/tests/Tests/BugResultSetMetaData_Bug_6183.stable.out sql/test/BugTracker-2017/Tests/insert_self_ref_FK.Bug-6131.sql sql/test/BugTracker-2017/Tests/insert_self_ref_FK.Bug-6131.stable.err sql/test/BugTracker-2017/Tests/insert_self_ref_FK.Bug-6131.stable.out sql/test/BugTracker-2017/Tests/unknown_col_in_order_by.Bug-3535.sql sql/test/BugTracker-2017/Tests/unknown_col_in_order_by.Bug-3535.stable.err sql/test/BugTracker-2017/Tests/unknown_col_in_order_by.Bug-3535.stable.out sql/test/testdb-upgrade-chain-hge/Tests/dump.SQL.py.src sql/test/testdb-upgrade-chain-hge/Tests/upgrade.SQL.py.src sql/test/testdb-upgrade-chain/Tests/dump.SQL.py.src sql/test/testdb-upgrade-chain/Tests/upgrade.SQL.py.src sql/test/testdb-upgrade-hge/Tests/dump.SQL.py.src sql/test/testdb-upgrade-hge/Tests/upgrade.SQL.py.src sql/test/testdb-upgrade/Tests/dump.SQL.py.src Removed Files: sql/test/testdb-upgrade-chain-hge/Tests/dump.SQL.py sql/test/testdb-upgrade-chain-hge/Tests/upgrade.SQL.py sql/test/testdb-upgrade-chain/Tests/dump.SQL.py sql/test/testdb-upgrade-chain/Tests/upgrade.SQL.py sql/test/testdb-upgrade-hge/Tests/dump.SQL.py sql/test/testdb-upgrade-hge/Tests/upgrade.SQL.py sql/test/testdb-upgrade/Tests/dump.SQL.py Modified Files: clients/R/Tests/copy_into_fwf.stable.out clients/R/Tests/dbapply.stable.out clients/R/Tests/dbi.R clients/R/Tests/dbi.stable.out clients/R/Tests/deps-test.R clients/R/Tests/dplyr-flights.R clients/R/Tests/dplyr-flights.stable.out clients/R/Tests/dplyr.R clients/R/Tests/dplyr.stable.err clients/R/Tests/dplyr.stable.out gdk/gdk_orderidx.c monetdb5/modules/mal/querylog.c sql/jdbc/tests/Tests/All sql/jdbc/tests/Tests/BugDecimalRound_Bug_3561.stable.out sql/test/BugTracker-2017/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 1205 to 300 lines): diff --git a/clients/R/Tests/copy_into_fwf.stable.out b/clients/R/Tests/copy_into_fwf.stable.out --- a/clients/R/Tests/copy_into_fwf.stable.out +++ b/clients/R/Tests/copy_into_fwf.stable.out @@ -24,11 +24,8 @@ Ready. # 16:40:23 > "R" "--vanilla" "--slave" "--args" "30658" # 16:40:23 > -[1] TRUE SQL CREATE TABLE mtcars (mpg DOUBLE PRECISION, cyl DOUBLE PRECISION, disp DOUBLE PRECISION, hp DOUBLE PRECISION, drat DOUBLE PRECISION, wt DOUBLE PRECISION, qsec DOUBLE PRECISION, vs DOUBLE PRECISION, am DOUBLE PRECISION, gear DOUBLE PRECISION, carb DOUBLE PRECISION) - ROWS Fetched: 0 [complete] - Changed: NA mpg cyl disp hp dratwt qsec vs am gear carb 1 21.0 6 160.0 110 3.90 2.620 16.46 0 144 2 21.0 6 160.0 110 3.90 2.875 17.02 0 144 @@ -62,7 +59,6 @@ 29 15.8 8 351.0 264 4.22 3.170 14.50 30 19.7 6 145.0 175 3.62 2.770 15.50 0 156 31 15.0 8 301.0 335 3.54 3.570 14.60 0 158 32 21.4 4 121.0 109 4.11 2.780 18.60 1 142 -[1] TRUE [1] "SUCCESS" # 16:40:23 > diff --git a/clients/R/Tests/dbapply.stable.out b/clients/R/Tests/dbapply.stable.out --- a/clients/R/Tests/dbapply.stable.out +++ b/clients/R/Tests/dbapply.stable.out @@ -29,14 +29,10 @@ Ready. # 11:43:14 > "R" "--vanilla" "--slave" "--args" "35780" # 11:43:14 > -[1] TRUE -[1] TRUE -[1] TRUE [1] 32 [1] TRUE [1] 32 [1] 42 -[1] TRUE [1] "SUCCESS" # 11:43:21 > diff --git a/clients/R/Tests/dbi.R b/clients/R/Tests/dbi.R --- a/clients/R/Tests/dbi.R +++ b/clients/R/Tests/dbi.R @@ -43,6 +43,7 @@ dbRemoveTable(con,tname) stopifnot(identical(dbExistsTable(con,tname),FALSE)) # write test table iris +# iris is one of the built-in datasets in R data(iris) dbWriteTable(con,tname,iris) @@ -65,16 +66,22 @@ stopifnot(identical(res@env$success,TRUE stopifnot(dbColumnInfo(res)[[1,1]] == "Species") stopifnot(dbColumnInfo(res)[[2,1]] == "Sepal.Width") -stopifnot(dbGetRowCount(res) == 150 && res@env$info$rows == 150) +stopifnot(dbGetRowCount(res) == 0) data <- dbFetch(res,10) +stopifnot(dbGetRowCount(res) == 10) + + stopifnot(dim(data)[[1]] == 10) stopifnot(dim(data)[[2]] == 2) stopifnot(res@env$delivered == 10) stopifnot(dbHasCompleted(res) == FALSE) data2 <- dbFetch(res,-1) + +stopifnot(dbGetRowCount(res) == 150) + stopifnot(dim(data2)[[1]] == 140) stopifnot(dbHasCompleted(res) == TRUE) diff --git a/clients/R/Tests/dbi.stable.out b/clients/R/Tests/dbi.stable.out --- a/clients/R/Tests/dbi.stable.out +++ b/clients/R/Tests/dbi.stable.out @@ -44,42 +44,
MonetDB: default - Merge with Dec2016 branch.
Changeset: 0a81b81505c9 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0a81b81505c9 Added Files: sql/backends/monet5/Tests/pyloader06.stable.out.Windows sql/backends/monet5/Tests/pyloader07.stable.out.Windows Modified Files: sql/server/rel_select.c sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain-hge/Tests/dump.SQL.py sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/dump.SQL.py sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-hge/Tests/dump.SQL.py sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/dump.SQL.py sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb/Tests/testdb-dump.SQL.py Branch: default Log Message: Merge with Dec2016 branch. diffs (276 lines): diff --git a/sql/backends/monet5/Tests/pyloader06.stable.out.Windows b/sql/backends/monet5/Tests/pyloader06.stable.out.Windows new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/Tests/pyloader06.stable.out.Windows @@ -0,0 +1,89 @@ +stdout of test 'pyloader06` in directory 'sql/backends/monet5` itself: + + +# 15:10:43 > +# 15:10:43 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=39055" "--set" "mapi_usock=/var/tmp/mtest-23860/.s.monetdb.39055" "--set" "monet_prompt=" "--forcemito" "--dbpath=/Users/myth/opt/var/MonetDB/mTests_sql_backends_monet5" "--set" "embedded_r=yes" "--set" "embedded_py=true" +# 15:10:43 > + +# MonetDB 5 server v11.24.0 +# This is an unreleased version +# Serving database 'mTests_sql_backends_monet5', using 4 threads +# Compiled for x86_64-apple-darwin15.6.0/64bit with 128bit integers +# Found 8.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://dhcp-154.eduroam.cwi.nl:39055/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-23860/.s.monetdb.39055 +# MonetDB/SQL module loaded +# MonetDB/Python module loaded +# MonetDB/R 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_json.sql +# loading sql script: 40_json_hge.sql +# loading sql script: 41_md5sum.sql +# loading sql script: 45_uuid.sql +# loading sql script: 46_profiler.sql +# loading sql script: 51_sys_schema_extension.sql +# loading sql script: 72_fits.sql +# loading sql script: 74_netcdf.sql +# loading sql script: 75_storagemodel.sql +# loading sql script: 80_statistics.sql +# loading sql script: 80_udf.sql +# loading sql script: 80_udf_hge.sql +# loading sql script: 90_generator.sql +# loading sql script: 90_generator_hge.sql +# loading sql script: 99_system.sql + +# 15:10:44 > +# 15:10:44 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-23860" "--port=39055" +# 15:10:44 > + +#START TRANSACTION; +#CREATE LOADER pyloader06() LANGUAGE PYTHON { +# return +#}; +#ROLLBACK; +#START TRANSACTION; +#CREATE LOADER pyloader06() LANGUAGE PYTHON { +# return {'a': 1, 'b': 2, 'c': 3} +#}; +#SELECT * FROM pyloader06table; +% sys.pyloader06table, sys.pyloader06table,sys.pyloader06table # table_name +% a, c, b # name +% int, int,int # type +% 1, 1, 1 # length +[ 1, 3, 2 ] +#ROLLBACK; +#START TRANSACTION; +#CREATE LOADER pyloader06() LANGUAGE PYTHON { +# return 3 +#}; +#ROLLBACK; + +# 15:10:44 > +# 15:10:44 > "Done." +# 15:10:44 > + diff --git a/sql/backends/monet5/Tests/pyloader07.stable.out.Windows b/sql/backends/monet5/Tests/pyloader07.stable.out.Windows new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/Tests/pyloader07.stable.out.Windows @@ -0,0 +1,82 @@ +stdout of test 'pyloader07` in directory 'sql/backends/mon
MonetDB: default - Merge with Dec2016 branch.
Changeset: 163ba1769943 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=163ba1769943 Modified Files: sql/server/rel_select.c sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out Branch: default Log Message: Merge with Dec2016 branch. diffs (132 lines): diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -4885,7 +4885,7 @@ rel_query(mvc *sql, sql_rel *rel, symbol /* reset error */ sql->session->status = 0; sql->errstr[0] = 0; - if (used) + if (used && rel) rel = rel_dup(rel); if (!used && (!sn->lateral && !lateral) && rel) { sql_rel *o = rel; diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 --- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 +++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 @@ -24,11 +24,6 @@ stdout of test 'upgrade` in directory 's # MonetDB/R module loaded Ready. -Running database upgrade commands: -set schema "sys"; -update sys.types set digits = 38 where sqlname = 'decimal' and digits = 39; -update sys.args set type_digits = 38 where type = 'decimal' and type_digits = 39; -set schema "sys"; # 15:26:18 > # 15:26:18 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-21187" "--port=38946" diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out --- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out +++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out @@ -24,11 +24,6 @@ stdout of test 'upgrade` in directory 's # MonetDB/R module loaded Ready. -Running database upgrade commands: -set schema "sys"; -update sys.types set digits = 18 where sqlname = 'decimal' and digits = 19; -update sys.args set type_digits = 18 where type = 'decimal' and type_digits = 19; -set schema "sys"; # 15:41:19 > # 15:41:19 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-7576" "--port=32696" diff --git a/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 b/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 --- a/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 +++ b/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 @@ -24,11 +24,6 @@ stdout of test 'upgrade` in directory 's # MonetDB/R module loaded Ready. -Running database upgrade commands: -set schema "sys"; -update sys.types set digits = 38 where sqlname = 'decimal' and digits = 39; -update sys.args set type_digits = 38 where type = 'decimal' and type_digits = 39; -set schema "sys"; # 15:26:18 > # 15:26:18 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-21187" "--port=38946" diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out --- a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out +++ b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out @@ -24,11 +24,6 @@ stdout of test 'upgrade` in directory 's # MonetDB/R module loaded Ready. -Running database upgrade commands: -set schema "sys"; -update sys.types set digits = 18 where sqlname = 'decimal' and digits = 19; -update sys.args set type_digits = 18 where type = 'decimal' and type_digits = 19; -set schema "sys"; # 15:41:18 > # 15:41:18 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-7576" "--port=32696" diff --git a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 --- a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 +++ b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 @@ -22,11 +22,6 @@ stdout of test 'upgrade` in directory 's # MonetDB/R module loaded Ready. -Running database upgrade commands: -set schema "sys"; -update sys.types set digits = 38 where sqlname = 'decimal' and digits = 39; -update sys.args set type_digits = 38 where type = 'decimal' and type_digits = 39; -set schema "testschema"; # 15:26:22 > # 15:26:22 > "/usr/bin/python2" "upgrade.SQL.py" "upgrade" d
MonetDB: default - Merge with Dec2016 branch.
Changeset: f054b7310be7 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f054b7310be7 Added Files: monetdb5/modules/atoms/Tests/strappend.malC monetdb5/modules/atoms/Tests/strappend.stable.err monetdb5/modules/atoms/Tests/strappend.stable.out Modified Files: gdk/ChangeLog.Dec2016 gdk/gdk.h gdk/gdk_batop.c gdk/gdk_bbp.c gdk/gdk_join.c monetdb5/mal/mal_client.c monetdb5/modules/atoms/Tests/All monetdb5/optimizer/opt_pipes.c sql/backends/monet5/sql_statistics.c Branch: default Log Message: Merge with Dec2016 branch. NOTE: YOUR DATABASES THAT YOU CREATED IN THE DEFAULT BRANCH CANNOT BE USED. In the Dec2016 branch the BBP version number was increased in order to fix a bug where the empty string might occur with different offsets in a duplicate-eliminated string heap. This conflicts with a version number increase that had been done in the default branch. This means that your default databases are now incompatible with the current code. Dump before you build, and restore after (or simply throw them away). diffs (truncated from 627 to 300 lines): diff --git a/gdk/ChangeLog.Dec2016 b/gdk/ChangeLog.Dec2016 --- a/gdk/ChangeLog.Dec2016 +++ b/gdk/ChangeLog.Dec2016 @@ -1,3 +1,12 @@ # ChangeLog file for MonetDB # This file is updated with Maddlog +* Tue Feb 28 2017 Sjoerd Mullender +- Fixed a bug when appending string bats that are fully duplicate + eliminated. It could happend that the to-be-appended bat had an empty + string at an offset and at that same offset in the to-be-appended-to bat + there happened to be a (sequence of) NULL(s). Then this offset would be + used, even though it might nog be the right offset for the empty string + in the to-be-appended-to bat. This would result in multiple offsets for + the empty string, breaking the promise of being duplicate eliminated. + diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -854,8 +854,9 @@ typedef struct { #define GDKLIBRARY_INSERTED061032 /* inserted and deleted in BBP.dir */ #define GDKLIBRARY_HEADED 061033 /* head properties are stored */ #define GDKLIBRARY_NOKEY 061034 /* nokey values can't be trusted */ -#define GDKLIBRARY_TALIGN 061035 /* talign field in BBP.dir */ -#define GDKLIBRARY 061036 +#define GDKLIBRARY_BADEMPTY061035 /* possibility of duplicate empty str */ +#define GDKLIBRARY_TALIGN 061036 /* talign field in BBP.dir */ +#define GDKLIBRARY 061037 typedef struct BAT { /* static bat properties */ diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -301,10 +301,13 @@ insert_string_bat(BAT *b, BAT *n, BAT *s } bunfastapp(b, tp); } - } else if (b->tvheap->free < n->tvheap->free / 2) { + } else if (b->tvheap->free < n->tvheap->free / 2 || + GDK_ELIMDOUBLES(b->tvheap)) { /* if b's string heap is much smaller than n's string * heap, don't bother checking whether n's string -* values occur in b's string heap */ +* values occur in b's string heap; also, if b is +* (still) fully double eliminated, we must continue +* to use the double elimination mechanism */ r = BUNlast(b); if (cand) { oid hseq = n->hseqbase; diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -629,6 +629,287 @@ fixwkbheap(void) } #endif +#ifdef GDKLIBRARY_BADEMPTY +/* There was a bug (fixed in changeset 1f5498568a24) which could + * result in empty strings not being double-eliminated. This code + * fixes the affected bats. + * Note that we only fix BATs whose string heap is still fully double + * eliminated. */ +static inline int +offsearch(const int *restrict offsets, int noffsets, int val) +{ + /* binary search on offsets for val, return whether present */ + int lo = 0, hi = noffsets - 1, mid; + + while (hi > lo) { + mid = (lo + hi) / 2; + if (offsets[mid] == val) + return 1; + if (offsets[mid] < val) + lo = mid + 1; + else + hi = mid - 1; + } + return offsets[lo] == val; +} + +static void +fixstroffheap(BAT *b, int *restrict offsets) +{ + long_str filename; + Heap h1;/* old offset heap */ + Heap h2;/* new string heap */ + Heap h3;/* new offset heap */ + Heap *h;/* string heap */ + int noffsets = 0; + const size_t extralen = b->tvheap->hashash ? EXTRALEN : 0; + size_t pos; + var_t emptyoff = 0; + const char *nme, *bnme; + char *srcdir; + BUN i; + int
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: f3ce7fa04fdd for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f3ce7fa04fdd Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 78b7b9f8a0b9 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=78b7b9f8a0b9 Modified Files: .hgtags MonetDB.spec debian/changelog Branch: default Log Message: Merge with Dec2016 branch. diffs (44 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -651,3 +651,6 @@ bf4b58d202645774b75c7f508c84b30e3be78a49 bf4b58d202645774b75c7f508c84b30e3be78a49 Dec2016_SP1_release 3968ed7fb6dab04a2530c6c3e1a5ffd6d649298b Dec2016_7 3968ed7fb6dab04a2530c6c3e1a5ffd6d649298b Dec2016_SP2_release +615229dc6f3c7dc89bbd9cc5923ad307b4c93cb1 Dec2016_9 +3968ed7fb6dab04a2530c6c3e1a5ffd6d649298b Dec2016_SP2_release +615229dc6f3c7dc89bbd9cc5923ad307b4c93cb1 Dec2016_SP2_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -944,6 +944,13 @@ rm -f %{buildroot}%{_bindir}/Maddlog %postun -p /sbin/ldconfig %changelog +* Mon Feb 27 2017 Panagiotis Koutsourakis - 11.25.9-20170227 +- Rebuilt. +- BZ#6217: Segfault in rel_optimizer (sqlsmith) +- BZ#6218: grouped quantiles with all null group causes following groups + to return null +- BZ#6224: mal_parser: cannot refer to types containing an underscore + * Thu Feb 16 2017 Panagiotis Koutsourakis - 11.25.7-20170216 - Rebuilt. - BZ#4034: argnames array in rapi.c has fixed length (that was too short) diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +monetdb (11.25.9) unstable; urgency=low + + * Rebuilt. + * BZ#6217: Segfault in rel_optimizer (sqlsmith) + * BZ#6218: grouped quantiles with all null group causes following groups +to return null + * BZ#6224: mal_parser: cannot refer to types containing an underscore + + -- Panagiotis Koutsourakis Mon, 27 Feb 2017 11:15:08 +0100 + monetdb (11.25.7) unstable; urgency=low * Rebuilt. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 42ec9ab4914f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=42ec9ab4914f Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: f287b734e603 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f287b734e603 Added Files: sql/test/BugTracker-2017/Tests/real-power.Bug-6228.sql sql/test/BugTracker-2017/Tests/real-power.Bug-6228.stable.err sql/test/BugTracker-2017/Tests/real-power.Bug-6228.stable.out Modified Files: monetdb5/optimizer/opt_support.c sql/backends/monet5/Tests/All sql/backends/monet5/Tests/pyloader06.stable.out sql/backends/monet5/Tests/pyloader07.stable.out sql/backends/monet5/UDF/pyapi/emit.c sql/backends/monet5/sql_scenario.c sql/server/rel_exp.c sql/test/BugTracker-2017/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (251 lines): diff --git a/monetdb5/optimizer/opt_support.c b/monetdb5/optimizer/opt_support.c --- a/monetdb5/optimizer/opt_support.c +++ b/monetdb5/optimizer/opt_support.c @@ -143,8 +143,10 @@ optimizeMALBlock(Client cntxt, MalBlkPtr msg = (str) (*p->fcn) (cntxt, mb, 0, p); if (msg) { str place = getExceptionPlace(msg); - msg= createException(getExceptionType(msg), place, "%s", getExceptionMessage(msg)); + str nmsg= createException(getExceptionType(msg), place, "%s", getExceptionMessage(msg)); GDKfree(place); + GDKfree(msg); + msg = nmsg; goto wrapup; } if (cntxt->mode == FINISHCLIENT) 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 @@ -61,6 +61,7 @@ HAVE_LIBPY?pyloader04 HAVE_LIBPY?pyloader05 HAVE_LIBPY?pyloader06 HAVE_LIBPY?pyloader07 +HAVE_LIBPY?pyloader08 HAVE_LIBPY?createorreplace diff --git a/sql/backends/monet5/Tests/pyloader06.stable.out b/sql/backends/monet5/Tests/pyloader06.stable.out --- a/sql/backends/monet5/Tests/pyloader06.stable.out +++ b/sql/backends/monet5/Tests/pyloader06.stable.out @@ -73,7 +73,7 @@ Ready. #SELECT * FROM pyloader06table; % sys.pyloader06table, sys.pyloader06table,sys.pyloader06table # table_name % a, c, b # name -% int, int,int # type +% bigint, bigint, bigint # type % 1, 1, 1 # length [ 1, 3, 2 ] #ROLLBACK; diff --git a/sql/backends/monet5/Tests/pyloader07.stable.out b/sql/backends/monet5/Tests/pyloader07.stable.out --- a/sql/backends/monet5/Tests/pyloader07.stable.out +++ b/sql/backends/monet5/Tests/pyloader07.stable.out @@ -69,7 +69,7 @@ Ready. #SELECT * FROM pyloader07table; % sys.pyloader07table, sys.pyloader07table # table_name % s, t # name -% int, int # type +% bigint, bigint # type % 2, 2 # length [ 33, 42 ] #DROP TABLE pyloader07table; diff --git a/sql/backends/monet5/UDF/pyapi/emit.c b/sql/backends/monet5/UDF/pyapi/emit.c --- a/sql/backends/monet5/UDF/pyapi/emit.c +++ b/sql/backends/monet5/UDF/pyapi/emit.c @@ -142,7 +142,22 @@ PyEmit_Emit(PyEmitObject *self, PyObject } if (!found) { // unrecognized column, create the column in the table -self->cols[self->ncols].b = COLnew(0, TYPE_int, 0, TRANSIENT); +// first infer the type from the value +// we use NumPy for this by creating an array from the object +// without specifying the type +PyObject* value = PyDict_GetItem(args, key); +PyObject* array = PyArray_FromAny(value, NULL, 0, 0, NPY_ARRAY_CARRAY | NPY_ARRAY_FORCECAST, NULL); +PyArray_Descr* array_type = NULL; +int bat_type = TYPE_int; +if (!array) { +PyErr_Format(PyExc_TypeError, "Failed to create NumPy array."); +return NULL; +} +array_type = (PyArray_Descr*) PyArray_DESCR((PyArrayObject*)array); +bat_type = PyType_ToBat(array_type->type_num); +Py_DECREF(array); + +self->cols[self->ncols].b = COLnew(0, bat_type, 0, TRANSIENT); self->cols[self->ncols].name = GDKstrdup(val); if (self->nvals > 0) { // insert NULL values up until the current entry 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 @@ -1146,7 +1146,7 @@ SQLparser(Client c) /* in case we had produced a non-cachable plan, the optimizer should be called */ if (opt ) { - str msg = SQLoptimizeQuery(c, c->curprg->def); + msg = SQLoptimizeQuery
MonetDB: default - Merge with Dec2016 branch.
Changeset: 0ab7a2e3483f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0ab7a2e3483f Modified Files: monetdb5/mal/mal_import.c monetdb5/tools/Tests/mserver5--help.stable.err monetdb5/tools/Tests/mserver5--help.stable.err.Windows sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_statement.c sql/common/sql_hash.c sql/common/sql_list.c sql/server/rel_exp.c sql/storage/sql_catalog.c tools/mserver/mserver5.c Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 414 to 300 lines): diff --git a/monetdb5/mal/mal_import.c b/monetdb5/mal/mal_import.c --- a/monetdb5/mal/mal_import.c +++ b/monetdb5/mal/mal_import.c @@ -222,7 +222,7 @@ malInclude(Client c, str name, int listi parseMAL(c, c->curprg, 1); bstream_destroy(c->fdin); } else { - GDKfree(s); // not interested in error here + freeException(s); // not interested in error here s = MAL_SUCCEED; } if (p) diff --git a/monetdb5/tools/Tests/mserver5--help.stable.err b/monetdb5/tools/Tests/mserver5--help.stable.err --- a/monetdb5/tools/Tests/mserver5--help.stable.err +++ b/monetdb5/tools/Tests/mserver5--help.stable.err @@ -34,7 +34,6 @@ The debug, testing & trace options: --optimizers --trace --forcemito - --recycler --debug= # 10:03:11 > diff --git a/monetdb5/tools/Tests/mserver5--help.stable.err.Windows b/monetdb5/tools/Tests/mserver5--help.stable.err.Windows --- a/monetdb5/tools/Tests/mserver5--help.stable.err.Windows +++ b/monetdb5/tools/Tests/mserver5--help.stable.err.Windows @@ -29,7 +29,6 @@ The debug, testing & trace options: --optimizers --trace --forcemito - --recycler --debug= # 10:03:11 > diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c --- a/sql/backends/monet5/rel_bin.c +++ b/sql/backends/monet5/rel_bin.c @@ -64,12 +64,19 @@ list_find_column(backend *be, list *l, c MT_lock_set(&l->ht_lock); if (!l->ht && list_length(l) > HASH_MIN_SIZE) { l->ht = hash_new(l->sa, MAX(list_length(l), l->expected_cnt), (fkeyvalue)&stmt_key); + if (l->ht == NULL) { + MT_lock_unset(&l->ht_lock); + return NULL; + } for (n = l->h; n; n = n->next) { const char *nme = column_name(be->mvc->sa, n->data); int key = hash_key(nme); - hash_add(l->ht, key, n->data); + if (hash_add(l->ht, key, n->data) == NULL) { + MT_lock_unset(&l->ht_lock); + return NULL; + } } } if (l->ht) { diff --git a/sql/backends/monet5/sql_statement.c b/sql/backends/monet5/sql_statement.c --- a/sql/backends/monet5/sql_statement.c +++ b/sql/backends/monet5/sql_statement.c @@ -2863,84 +2863,92 @@ stmt_alias(backend *be, stmt *op1, const sql_subtype * tail_type(stmt *st) { - switch (st->type) { - case st_const: - return tail_type(st->op2); - - case st_uselect: - case st_uselect2: - case st_limit: - case st_limit2: - case st_sample: - case st_tunion: - case st_tdiff: - case st_tinter: - case st_append: - case st_alias: - case st_gen_group: - case st_order: - return tail_type(st->op1); - - case st_list: - return tail_type(st->op4.lval->h->data); - - case st_bat: - return &st->op4.cval->type; - case st_idxbat: - if (hash_index(st->op4.idxval->type)) { + for (;;) { + switch (st->type) { + case st_const: + st = st->op2; + continue; + + case st_uselect: + case st_uselect2: + case st_limit: + case st_limit2: + case st_sample: + case st_tunion: + case st_tdiff: + case st_tinter: + case st_append: + case st_alias: + case st_gen_group: + case st_order: + st = st->op1; + continue; + + case st_list: + st = st->op4.lval->h->data; + continue; + + case st_bat: + return &st->op4.cval->type; + case st_idxbat: + if (hash_index(st->op4.idxval->type)) { + return sql_bind_localtype("lng"); + } else if (st->op4.idxval->type == join
MonetDB: default - Merge with Dec2016 branch.
Changeset: 9c8d67da017d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9c8d67da017d Added Files: monetdb5/modules/kernel/Tests/select.malC monetdb5/modules/kernel/Tests/select.stable.err monetdb5/modules/kernel/Tests/select.stable.out Modified Files: gdk/gdk_logger.c gdk/gdk_select.c monetdb5/modules/kernel/Tests/All monetdb5/modules/mal/Tests/orderidx01.malC monetdb5/modules/mal/Tests/orderidx02.malC sql/backends/monet5/UDF/pyapi/convert_loops.h sql/backends/monet5/generator/generator.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_statement.c sql/backends/monet5/vaults/netcdf/netcdf.c sql/storage/bat/bat_storage.c sql/storage/bat/bat_utils.c sql/storage/bat/res_table.c sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.out sql/test/BugTracker-2016/Tests/decimal_vs_integer.Bug-3941.stable.out sql/test/BugTracker/Tests/explain.SF-1739353.stable.out sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 3631 to 300 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -1598,6 +1598,8 @@ logger_load(int debug, const char *fn, c logger_fatal("Logger_new: inconsistent database, snapshots_tid does not exist", 0, 0, 0); } else { lg->dsnapshots = logbat_new(TYPE_oid, 1, PERSISTENT); + if (lg->dsnapshots == NULL) + logger_fatal("Logger_new: cannot create dsnapshot bat", 0, 0, 0); snprintf(bak, sizeof(bak), "%s_dsnapshots", fn); if (BBPrename(lg->dsnapshots->batCacheid, bak) < 0) logger_fatal("Logger_new: BBPrename to %s failed", bak, 0, 0); @@ -2513,6 +2515,9 @@ bm_commit(logger *lg) BAT *n = logbat_new(TYPE_str, BATcount(lg->freed), TRANSIENT); gdk_return res; + if (n == NULL) + return LOG_ERR; + /* subcommit the freed bats */ if (BATcount(lg->freed)) { diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -1275,14 +1275,13 @@ BATselect(BAT *b, BAT *s, const void *tl equi = th == NULL || (lval && ATOMcmp(t, tl, th) == 0); /* point select? */ if (equi) { assert(lval); - hi = li; + if (th == NULL) + hi = li; th = tl; hval = 1; } else { hval = ATOMcmp(t, th, nil) != 0; } - if (!equi && !lval && !hval && lnil) - anti = !anti; if (anti) { if (lval != hval) { /* one of the end points is nil and the other @@ -1857,7 +1856,7 @@ BATthetaselect(BAT *b, BAT *s, const voi nil = ATOMnilptr(b->ttype); if (ATOMcmp(b->ttype, val, nil) == 0) return newempty(); - if (op[0] == '=' && ((op[1] == '=' && op[2] == 0) || op[2] == 0)) { + if (op[0] == '=' && ((op[1] == '=' && op[2] == 0) || op[1] == 0)) { /* "=" or "==" */ return BATselect(b, s, val, NULL, 1, 1, 0); } diff --git a/monetdb5/modules/kernel/Tests/All b/monetdb5/modules/kernel/Tests/All --- a/monetdb5/modules/kernel/Tests/All +++ b/monetdb5/modules/kernel/Tests/All @@ -2,3 +2,4 @@ time01 TriBool batstr math +select diff --git a/monetdb5/modules/kernel/Tests/select.malC b/monetdb5/modules/kernel/Tests/select.malC new file mode 100644 --- /dev/null +++ b/monetdb5/modules/kernel/Tests/select.malC @@ -0,0 +1,1010 @@ +b := bat.new(:int); +bat.append(b, 7); +bat.append(b, 6); +bat.append(b, 8); +bat.append(b, nil:int); +bat.append(b, 9); +bat.append(b, 5); +bat.append(b, 0); +bat.append(b, 3); +bat.append(b, 2); +bat.append(b, 1); +bat.append(b, 4); +s := algebra.sort(b, false, true); +r := algebra.sort(b, true, true); +bat.setAccess(b, "r"); +bat.setAccess(s, "r"); +bat.setAccess(r, "r"); + +# if tl and th are both nil, and li and hi are both true, +# algebra.select translates th to NULL + +x := algebra.select(b, nil:int, nil:int, true, true, false); +z := algebra.projection(x, b); +z := algebra.sort(z, false, true); +io.print(z);# nil +io.print("nil"); +x := algebra.select(b, nil:int, nil:int, true, false, false); +z := algebra.projection(x, b); +z := algebra.sort(z, false, true); +io.print(z);# 0,1,2,3,4,5,6,7,8,9 +io.print("0,1,2,3,4,5,6,7,8,9"); +x := algebra.select(b, nil:int, nil:int, false, true, false); +z := algebra.projection(x, b); +z := algebra.sort(z, false, true); +io.print(z);
MonetDB: default - Merge with Dec2016 branch.
Changeset: 1f48e877596d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1f48e877596d Modified Files: gdk/gdk_logger.c gdk/gdk_project.c geom/monetdb5/geom.c geom/monetdb5/geomBulk.c geom/monetdb5/geom_upgrade.c monetdb5/mal/mal_authorize.c monetdb5/modules/kernel/aggr.c sql/backends/monet5/sql.c sql/backends/monet5/sql_statistics.c sql/server/rel_optimizer.c sql/server/rel_rel.c sql/storage/bat/bat_storage.c sql/test/emptydb-upgrade-chain/Tests/check.stable.out.32bit sql/test/emptydb-upgrade/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.32bit Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 1238 to 300 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -1227,18 +1227,27 @@ bm_subcommit(logger *lg, BAT *list_bid, BAT *bids, *nmes, *tids; tids = bm_tids(catalog_bid, dcatalog); - bids = logbat_new(TYPE_int, BATSIZE, PERSISTENT); - nmes = logbat_new(TYPE_str, BATSIZE, PERSISTENT); - if (tids == NULL || bids == NULL || nmes == NULL) { - if (tids) - BBPunfix(tids->batCacheid); - BBPreclaim(bids); - BBPreclaim(nmes); + if (tids == NULL) { GDKfree(n); return GDK_FAIL; } - BATappend(bids, catalog_bid, tids, TRUE); - BATappend(nmes, catalog_nme, tids, TRUE); + bids = logbat_new(TYPE_int, BATcount(tids), PERSISTENT); + nmes = logbat_new(TYPE_str, BATcount(tids), PERSISTENT); + if (bids == NULL || nmes == NULL) { + logbat_destroy(tids); + logbat_destroy(bids); + logbat_destroy(nmes); + GDKfree(n); + return GDK_FAIL; + } + if (BATappend(bids, catalog_bid, tids, TRUE) != GDK_SUCCEED || + BATappend(nmes, catalog_nme, tids, TRUE) != GDK_SUCCEED) { + logbat_destroy(tids); + logbat_destroy(bids); + logbat_destroy(nmes); + GDKfree(n); + return GDK_FAIL; + } logbat_destroy(tids); BATclear(dcatalog, TRUE); diff --git a/gdk/gdk_project.c b/gdk/gdk_project.c --- a/gdk/gdk_project.c +++ b/gdk/gdk_project.c @@ -747,6 +747,7 @@ BATprojectchain(BAT **bats) return bn; bunins_failed: + GDKfree(ba); BBPreclaim(bn); return NULL; } diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c --- a/geom/monetdb5/geom.c +++ b/geom/monetdb5/geom.c @@ -464,7 +464,7 @@ wkbTransform(wkb **transformedWKB, wkb * ret = createException(MAL, "geom.Transform", "Unknown geometry type"); } - if (transformedGeosGeometry) { + if (ret == MAL_SUCCEED && transformedGeosGeometry) { /* set the new srid */ GEOSSetSRID(transformedGeosGeometry, *srid_dst); /* get the wkb */ @@ -2670,7 +2670,7 @@ wkbMLineStringToPolygon(wkb **geomWKB, s } //all remaining should be internal - internalGeometries = GDKmalloc((itemsNum - 1) * sizeof(GEOSGeom *)); + internalGeometries = GDKmalloc((itemsNum - 1) * sizeof(GEOSGeom)); if (internalGeometries == NULL) { GEOSGeom_destroy(linearRingExternalGeometry); ret = createException(MAL, "geom.MLineStringToPolygon", MAL_MALLOC_FAIL); @@ -2730,8 +2730,8 @@ wkbMLineStringToPolygon(wkb **geomWKB, s GEOSGeom_destroy(finalGeometry); - throw(MAL, "geom.MLineStringToPolygon", "The provided MultiLineString does not create a valid Polygon"); - + ret = createException(MAL, "geom.MLineStringToPolygon", "The provided MultiLineString does not create a valid Polygon"); + goto bailout; } GEOSSetSRID(finalGeometry, *srid); @@ -3047,6 +3047,7 @@ wkbMakePolygon(wkb **out, wkb **external GEOSGeom geosGeometry, externalGeometry, linearRingGeometry; bit closed = 0; GEOSCoordSeq coordSeq_copy; + str err; if (wkb_isnil(*external) || *srid == int_nil) { if ((*out = wkbNULLcopy()) == NULL) @@ -3065,7 +3066,10 @@ wkbMakePolygon(wkb **out, wkb **external throw(MAL, "geom.Polygon", "Geometries should be LineString"); } //check whether the linestring is closed - wkbIsClosed(&closed, external); + if ((err = wkbIsClosed(&clos
MonetDB: default - Merge with Dec2016 branch.
Changeset: 7157f1299a6b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7157f1299a6b Added Files: sql/test/BugTracker-2017/Tests/null-quantile.Bug-6218.sql sql/test/BugTracker-2017/Tests/null-quantile.Bug-6218.stable.err sql/test/BugTracker-2017/Tests/null-quantile.Bug-6218.stable.out Modified Files: gdk/gdk_aggr.c sql/test/BugTracker-2017/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (206 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -2482,24 +2482,22 @@ BATgroupquantile(BAT *b, BAT *g, BAT *e, assert(r < p); if ( p == q || grps[p] != prev) { BUN qindex; - if (skip_nils) { + if (skip_nils && !b->tnonil) { while (r < p && (*atomcmp)(BUNtail(bi, r), nil) == 0) r++; - if (r == p) - break; } - while (BATcount(bn) < prev - min) { - bunfastapp_nocheck(bn, BUNlast(bn), - nil, Tsize(bn)); + if (r == p) { + v = nil; nils++; + } else { + qindex = (BUN) (r + (p-r-1) * quantile); + /* be a little paranoid about the index */ + assert(qindex >= r); + assert(qindex < p); + v = BUNtail(bi, qindex); + nils += (*atomcmp)(v, nil) == 0; } - qindex = (BUN) (r + (p-r-1) * quantile); - /* be a little paranoid about the index */ - assert(qindex >= r); - assert(qindex < p); - v = BUNtail(bi, qindex); bunfastapp_nocheck(bn, BUNlast(bn), v, Tsize(bn)); - nils += (*atomcmp)(v, nil) == 0; r = p; if (p < q) 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 @@ -26,3 +26,4 @@ sqlsmith03 sqlsmith04 nested_with.Bug-6187 prepare.Bug-6133 +null-quantile.Bug-6218 diff --git a/sql/test/BugTracker-2017/Tests/null-quantile.Bug-6218.sql b/sql/test/BugTracker-2017/Tests/null-quantile.Bug-6218.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2017/Tests/null-quantile.Bug-6218.sql @@ -0,0 +1,15 @@ +start transaction; + +create table bug6218 (i int, j int); +copy 8 records into bug6218 from stdin; +0|0 +1|0 +NULL|1 +NULL|1 +0|2 +1|2 +2|0 +2|2 +select quantile(i,0.5),j from bug6218 group by j order by j; + +rollback; diff --git a/sql/test/BugTracker-2017/Tests/null-quantile.Bug-6218.stable.err b/sql/test/BugTracker-2017/Tests/null-quantile.Bug-6218.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2017/Tests/null-quantile.Bug-6218.stable.err @@ -0,0 +1,36 @@ +stderr of test 'null-quantile.Bug-6218` in directory 'sql/test/BugTracker-2017` itself: + + +# 12:42:35 > +# 12:42:35 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=34225" "--set" "mapi_usock=/var/tmp/mtest-8842/.s.monetdb.34225" "--set" "monet_prompt=" "--forcemito" "--dbpath=/ufs/sjoerd/Monet-stable/var/MonetDB/mTests_sql_test_BugTracker-2017" "--set" "embedded_r=yes" "--set" "embedded_py=true" +# 12:42:35 > + +# builtin opt gdk_dbpath = /ufs/sjoerd/Monet-stable/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 = 34225 +# cmdline opt mapi_usock = /var/tmp/mtest-8842/.s.monetdb.34225 +# cmdline opt monet_prompt = +# cmdline opt gdk_dbpath = /ufs/sjoerd/Monet-stable/var/MonetDB/mTests_sql_test_BugTracker-2017 +# cmdline opt embedded_r = yes +# cmdline opt embedded_py = true +# cmdline opt gdk_debug = 536870922 + +# 12:42:36 > +# 12:42:36 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-8842" "--port=34
MonetDB: default - Merge with Dec2016 branch.
Changeset: ec2096728c7a for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ec2096728c7a Modified Files: gdk/gdk_aggr.c gdk/gdk_imprints.c gdk/gdk_interprocess.c gdk/gdk_logger.c gdk/gdk_search.c gdk/gdk_select.c gdk/gdk_utils.c tools/merovingian/daemon/connections.c Branch: default Log Message: Merge with Dec2016 branch. diffs (263 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -2416,9 +2416,13 @@ BATgroupquantile(BAT *b, BAT *g, BAT *e, /* there is a candidate list, replace b (and g, if * given) with just the values we're interested in */ b = BATproject(s, b); + if (b == NULL) + return NULL; freeb = 1; if (g) { g = BATproject(s, g); + if (g == NULL) + goto bunins_failed; freeg = 1; } } @@ -2436,7 +2440,8 @@ BATgroupquantile(BAT *b, BAT *g, BAT *e, BBPunfix(g->batCacheid); return bn; } - BATsort(&t1, &t2, NULL, g, NULL, NULL, 0, 0); + if (BATsort(&t1, &t2, NULL, g, NULL, NULL, 0, 0) != GDK_SUCCEED) + goto bunins_failed; if (freeg) BBPunfix(g->batCacheid); g = t1; @@ -2444,7 +2449,11 @@ BATgroupquantile(BAT *b, BAT *g, BAT *e, } else { t2 = NULL; } - BATsort(&t1, NULL, NULL, b, t2, g, 0, 0); + if (BATsort(&t1, NULL, NULL, b, t2, g, 0, 0) != GDK_SUCCEED) { + if (t2) + BBPunfix(t2->batCacheid); + goto bunins_failed; + } if (freeb) BBPunfix(b->batCacheid); b = t1; @@ -2454,7 +2463,7 @@ BATgroupquantile(BAT *b, BAT *g, BAT *e, bn = COLnew(g ? min : 0, b->ttype, ngrp, TRANSIENT); if (bn == NULL) - return NULL; + goto bunins_failed; bi = bat_iterator(b); nil = ATOMnilptr(b->ttype); @@ -2511,7 +2520,8 @@ BATgroupquantile(BAT *b, BAT *g, BAT *e, } index = (BUN) (r + (p-r-1) * quantile); v = BUNtail(bi, index); - BUNappend(bn, v, FALSE); + if (BUNappend(bn, v, FALSE) != GDK_SUCCEED) + goto bunins_failed; nils += (*atomcmp)(v, nil) == 0; } @@ -2532,7 +2542,8 @@ BATgroupquantile(BAT *b, BAT *g, BAT *e, BBPunfix(b->batCacheid); if (freeg) BBPunfix(g->batCacheid); - BBPunfix(bn->batCacheid); + if (bn) + BBPunfix(bn->batCacheid); return NULL; } diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c --- a/gdk/gdk_imprints.c +++ b/gdk/gdk_imprints.c @@ -309,6 +309,7 @@ BATimprints(BAT *b) bat p = VIEWtparent(b); o = b; b = BATdescriptor(p); + assert(b); if (BATcheckimprints(b)) { BBPunfix(b->batCacheid); return GDK_SUCCEED; diff --git a/gdk/gdk_interprocess.c b/gdk/gdk_interprocess.c --- a/gdk/gdk_interprocess.c +++ b/gdk/gdk_interprocess.c @@ -81,6 +81,9 @@ GDKinitmmap(size_t id, size_t size, void int fd; int mod = MMAP_READ | MMAP_WRITE | MMAP_SEQUENTIAL | MMAP_SYNC | MAP_SHARED; char *path = NULL; + + assert(return_ptr != NULL); + GDKmmapfile(address, 100, id); /* round up to multiple of GDK_mmap_pagesize with a @@ -109,9 +112,7 @@ GDKinitmmap(size_t id, size_t size, void goto cleanup; } GDKfree(path); - if (return_ptr != NULL) { - *return_ptr = ptr; - } + *return_ptr = ptr; if (return_size != NULL) { *return_size = size; } diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -1128,6 +1128,9 @@ bm_tids(BAT *b, BAT *d) BUN sz = BATcount(b); BAT *tids = COLnew(0, TYPE_void, 0, TRANSIENT); + if (tids == NULL) + return NULL; + BATtseqbase(tids, 0); BATsetcount(tids, sz); tids->trevsorted = 0; @@ -1217,11 +1220,23 @@ bm_subcommit(logger *lg, BAT *list_bid, n[i++] = catalog_bid->batCacheid; n[i++] = catalog_nme->batCacheid; n[i++] = dcatalog->batCacheid; - if (BATcount(dcatalog) > (BATcount(catalog_nme)/2) && catalog_bid == list_bid && catalog_nme == list_nme && lg->catalog_bid == catalog_bid) { - BAT *bids, *nmes, *tids = bm_tids(catalog_bid, dcatalog); + if (BATcount(dcatalog) > (BATcount(catalog_nme)/2) && + catalog_bid == list_bid && + catalog_nme
MonetDB: default - Merge with Dec2016 branch.
Changeset: 1542e2ce8126 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1542e2ce8126 Added Files: sql/test/BugTracker-2016/Tests/storagemodel.stable.out.Windows Removed Files: sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit sql/test/BugTracker-2016/Tests/storagemodel.stable.out.int128 Modified Files: monetdb5/mal/mal_resource.h sql/backends/monet5/sql.c sql/test/BugTracker-2016/Tests/storagemodel.sql sql/test/BugTracker-2016/Tests/storagemodel.stable.err sql/test/BugTracker-2016/Tests/storagemodel.stable.out Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 470 to 300 lines): diff --git a/monetdb5/mal/mal_resource.h b/monetdb5/mal/mal_resource.h --- a/monetdb5/mal/mal_resource.h +++ b/monetdb5/mal/mal_resource.h @@ -18,7 +18,7 @@ //#define heapinfo(X,Id) (((X) && (X)->base && ((X)->parentid == 0 || (X)->parentid == Id)) ? (X)->free : 0) #define heapinfo(X,Id) (((X) && (X)->base ) ? (X)->free : 0) -#define hashinfo(X,Id) ( (X)? heapinfo((X)->heap, Id):0) +#define hashinfo(X,Id) ((X) && (X) != (Hash *) 1 ? heapinfo((X)->heap, Id) : 0) #define USE_MAL_ADMISSION #ifdef USE_MAL_ADMISSION diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -4038,7 +4038,7 @@ sql_storage(Client cntxt, MalBlkPtr mb, bitval = bit_nil; BUNappend(key, &bitval, FALSE); - sz = bn->torderidx ? bn->torderidx->free : 0; + sz = bn->torderidx && bn->torderidx != (Heap *) 1 ? bn->torderidx->free : 0; BUNappend(oidx, &sz, FALSE); BBPunfix(bn->batCacheid); } @@ -4126,7 +4126,7 @@ sql_storage(Client cntxt, MalBlkPtr mb, if (!bitval && bn->tnokey[0] == 0 && bn->tnokey[1] == 0) bitval = bit_nil; BUNappend(key, &bitval, FALSE); - sz = bn->torderidx ? bn->torderidx->free : 0; + sz = bn->torderidx && bn->torderidx != (Heap *) 1 ? bn->torderidx->free : 0; BUNappend(oidx, &sz, FALSE); BBPunfix(bn->batCacheid); } diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.sql b/sql/test/BugTracker-2016/Tests/storagemodel.sql --- a/sql/test/BugTracker-2016/Tests/storagemodel.sql +++ b/sql/test/BugTracker-2016/Tests/storagemodel.sql @@ -12,17 +12,19 @@ select * from storagemodel() where "tabl drop table bug3923; -crate schema bug3923schema; + +create schema bug3923schema; +set schema bug3923schema; create table bug3923(i integer); -- skip columns location, count, columnsize. -select "schema", "table", "column", "type", "mode", typewidth, hashes, phash, imprints, sorted from storage('sys','_tables'); +select "schema", "table", "column", "type", "mode", typewidth, hashes, phash, imprints, sorted from sys.storage('sys','_tables'); -call storagemodelinit(); -update storagemodelinput set "count" =1 where "table" ='bug3923'; -update storagemodelinput set "distinct" =10 where "table" ='bug3923' and "column" ='i'; +call sys.storagemodelinit(); +update sys.storagemodelinput set "count" =1 where "table" ='bug3923'; +update sys.storagemodelinput set "distinct" =10 where "table" ='bug3923' and "column" ='i'; -select * from storagemodel() where "table" = 'bug3923'; +select * from sys.storagemodel() where "table" = 'bug3923'; drop table bug3923; diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.stable.err b/sql/test/BugTracker-2016/Tests/storagemodel.stable.err --- a/sql/test/BugTracker-2016/Tests/storagemodel.stable.err +++ b/sql/test/BugTracker-2016/Tests/storagemodel.stable.err @@ -28,9 +28,6 @@ stderr of test 'storagemodel` in directo # 23:38:44 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-21747" "--port=30783" # 23:38:44 > -MAPI = (monetdb) /var/tmp/mtest-545/.s.monetdb.36257 -QUERY = crate schema bug3923schema; -ERROR = !syntax error, unexpected IDENT in: "crate" # 23:38:44 > # 23:38:44 > "Done." diff --git a/sql/test/BugTracker-2016/Tests/storagem
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: f4a2840b2ca4 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f4a2840b2ca4 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 4a10daae5a7d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a10daae5a7d Modified Files: .hgtags MonetDB.spec debian/changelog libversions Branch: default Log Message: Merge with Dec2016 branch. diffs (143 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -649,3 +649,5 @@ ea0fe76e0095771bccca626b39e3e839a90ba320 afc859894553ef804cded49a83b035d9d2cda73b Dec2016_release bf4b58d202645774b75c7f508c84b30e3be78a49 Dec2016_5 bf4b58d202645774b75c7f508c84b30e3be78a49 Dec2016_SP1_release +3968ed7fb6dab04a2530c6c3e1a5ffd6d649298b Dec2016_7 +3968ed7fb6dab04a2530c6c3e1a5ffd6d649298b Dec2016_SP2_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -124,7 +124,7 @@ Vendor: MonetDB BV Group: Applications/Databases License: MPLv2.0 URL: http://www.monetdb.org/ -Source: http://dev.monetdb.org/downloads/sources/Dec2016-SP1/%{name}-%{version}.tar.bz2 +Source: http://dev.monetdb.org/downloads/sources/Dec2016-SP2/%{name}-%{version}.tar.bz2 # we need systemd for the _unitdir macro to exist %if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7 @@ -962,6 +962,49 @@ rm -f %{buildroot}%{_bindir}/Maddlog %postun -p /sbin/ldconfig %changelog +* Thu Feb 16 2017 Panagiotis Koutsourakis - 11.25.7-20170216 +- Rebuilt. +- BZ#4034: argnames array in rapi.c has fixed length (that was too short) +- BZ#6080: mserver5: rel_bin.c:2391: rel2bin_project: Assertion `0' + failed. +- BZ#6081: Segmentation fault (core dumped) +- BZ#6082: group.subgroup is undefined if group by is used on an + expression involving only constants +- BZ#6111: Maximum number of digits for hge decimal is listed as 39 in + sys.types. Should be 38 as DECIMAL(39) is not supported. +- BZ#6112: Crash upgrading Jul2015->Jun2016 +- BZ#6130: Query rewriter crashes on a NULL pointer when having a + correlated subquery +- BZ#6133: A crash occurs when preparing an INSERT on joined tables + during the query semantic phase +- BZ#6141: Getting an error message regarding a non-GROUP-BY column + rather than an unknown identifier +- BZ#6177: Server crashes +- BZ#6186: Null casting causes no results (silent server crash?) +- BZ#6189: Removing a NOT NULL constraint from a PKey column should NOT + be allowed +- BZ#6190: CASE query crashes database +- BZ#6191: MT_msync failed with "Cannot allocate memory" +- BZ#6192: Numeric column stores wrong values after adding large numbers +- BZ#6193: converting to a smaller precision (fewer or no decimals after + decimal point) should round/truncate consistently +- BZ#6194: splitpart returns truncated last part if it contains non + ascii caracters +- BZ#6195: Cast from huge decimal type to smaller returns wrong results +- BZ#6196: Database crashes after generate_series query +- BZ#6198: COALESCE could be more optimized +- BZ#6201: MonetDB completely giving up on certain queries - no error + and no result +- BZ#6202: querying a table with an ordered index on string/varchar + column crashes server and makes server unrestartable! +- BZ#6203: copy into: Failed to import table Leftover data 'False' +- BZ#6205: Integer addition overflow +- BZ#6206: casting strings with more than one trailing zero ('0') to + decimal goes wrong +- BZ#6209: Aggregation over complex OR expressions produce wrong results +- BZ#6210: Upgrading a database from Jun2015 or older crashes the server +- BZ#6213: SQLsmith causes server to crash + * Fri Jan 13 2017 Panagiotis Koutsourakis - 11.25.5-20170113 - Rebuilt. - BZ#4039: Slow mserver5 start after drop of tables (> 1 hour) diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,49 @@ +monetdb (11.25.7) unstable; urgency=low + + * Rebuilt. + * BZ#4034: argnames array in rapi.c has fixed length (that was too short) + * BZ#6080: mserver5: rel_bin.c:2391: rel2bin_project: Assertion `0' +failed. + * BZ#6081: Segmentation fault (core dumped) + * BZ#6082: group.subgroup is undefined if group by is used on an +expression involving only constants + * BZ#6111: Maximum number of digits for hge decimal is listed as 39 in +sys.types. Should be 38 as DECIMAL(39) is not supported. + * BZ#6112: Crash upgrading Jul2015->Jun2016 + * BZ#6130: Query rewriter crashes on a NULL pointer when having a +correlated subquery + * BZ#6133: A crash occurs when preparing an INSERT on joined tables +during the query semantic phase + * BZ#6141: Getting an error message regarding a non-GROUP-BY column +rather than an unknown identifier + * BZ#6177: Server crashes + * BZ#6186: Null casting causes no results (silent server crash?) + * BZ#6189: Removing a NOT NULL constraint from a PKey column should NOT +be allowed + * BZ#6190: CASE query crashes database + * BZ#6191: MT_msync failed with "Cannot allocate memory" + * BZ#6192: Numeric column stores wrong values after adding large numbers + * BZ#6193: converting to a smaller pre
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 9abaf9af6a99 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9abaf9af6a99 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: b0b48be77b7d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b0b48be77b7d Modified Files: gdk/gdk_batop.c sql/test/BugTracker-2016/Tests/All sql/test/emptydb/updatetests sql/test/lateral/Tests/lateral.sql Branch: default Log Message: Merge with Dec2016 branch. diffs (107 lines): diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -1729,6 +1729,8 @@ BATcount_no_nil(BAT *b) return cnt; } +/* create a new, dense candidate list with values from `first' up to, + * but not including, `last' */ static BAT * newdensecand(oid first, oid last) { @@ -1738,7 +1740,7 @@ newdensecand(oid first, oid last) return NULL; if (last < first) first = last = 0; /* empty range */ - BATsetcount(bn, last - first + 1); + BATsetcount(bn, last - first); BATtseqbase(bn, first); return bn; } @@ -1790,19 +1792,19 @@ BATmergecand(BAT *a, BAT *b) if (af <= bf && bf <= al + 1) { /* partial overlap starting with a, or b is * smack bang after a */ - return newdensecand(af, al < bl ? bl : al); + return newdensecand(af, al < bl ? bl + 1 : al + 1); } if (bf <= af && af <= bl + 1) { /* partial overlap starting with b, or a is * smack bang after b */ - return newdensecand(bf, al < bl ? bl : al); + return newdensecand(bf, al < bl ? bl + 1 : al + 1); } } if (ad && af <= bf && al >= bl) { - return newdensecand(af, al); + return newdensecand(af, al + 1); } if (bd && bf <= af && bl >= al) { - return newdensecand(bf, bl); + return newdensecand(bf, bl + 1); } bn = COLnew(0, TYPE_oid, BATcount(a) + BATcount(b), TRANSIENT); @@ -1912,7 +1914,7 @@ BATintersectcand(BAT *a, BAT *b) if ((af + BATcount(a) - 1 == al) && (bf + BATcount(b) - 1 == bl)) { /* both lists are VOID */ - return newdensecand(MAX(af, bf), MIN(al, bl)); + return newdensecand(MAX(af, bf), MIN(al, bl) + 1); } bn = COLnew(0, TYPE_oid, MIN(BATcount(a), BATcount(b)), TRANSIENT); 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 @@ -57,7 +57,7 @@ cast_and_floor.Bug-6071 union.Bug-6069 ifthenelse-void.Bug-6075 assert-on-table-producing-function.Bug-6076 -HAVE_NETCDF?assert-on-push-project-up.Bug-6077 +HAVE_NETCDF&HAVE_SAMTOOLS?assert-on-push-project-up.Bug-6077 HAVE_SAMTOOLS?assert-on-project.Bug-6078 crash.Bug-6081 merge-table-edit.Bug-6084 diff --git a/sql/test/emptydb/updatetests b/sql/test/emptydb/updatetests --- a/sql/test/emptydb/updatetests +++ b/sql/test/emptydb/updatetests @@ -3,7 +3,7 @@ case $# in 1) -if [ -d "$1" ] && [ -f "$1"/Tests/load.sql ] && [ -f "$1"/Tests/check.SQL.py.src ]; then +if [ -d "$1" ] && [ -f "$1"/Tests/load.sql ] && [ -f "$1"/Tests/check.SQL.py ]; then cd "$1" || exit 1 else echo "bad argument" @@ -14,7 +14,7 @@ 0) case $0 in */*) cd ${0%/*};; esac -if [ -f Tests/load.sql ] && [ -f Tests/check.SQL.py.src ]; then +if [ -f Tests/load.sql ] && [ -f Tests/check.SQL.py ]; then : else echo "bad directory" diff --git a/sql/test/lateral/Tests/lateral.sql b/sql/test/lateral/Tests/lateral.sql --- a/sql/test/lateral/Tests/lateral.sql +++ b/sql/test/lateral/Tests/lateral.sql @@ -36,12 +36,12 @@ INSERT INTO employees VALUES (7566,'JONE INSERT INTO employees VALUES (7654,'MARTIN','SALESMAN',7698,to_date('28-9-1981','dd-mm-'),1250,1400,30); INSERT INTO employees VALUES (7698,'BLAKE','MANAGER',7839,to_date('1-5-1981','dd-mm-'),2850,NULL,30); INSERT INTO employees VALUES (7782,'CLARK','MANAGER',7839,to_date('9-6-1981','dd-mm-'),2450,NULL,10); ---INSERT INTO employees VALUES (7788,'SCOTT','ANALYST',7566,to_date('13-JUL-87','dd-mm-rr')-85,3000,NULL,20); -INSERT INTO employees VALUES (7788,'SCOTT','ANALYST',7566,to_date('13-6-87','dd-mm-rr')-85,3000,NULL,20); +--INSERT INTO employees VALUES (7788,'SCOTT','ANALYST',7566,to_date('13-JUL-1987','dd-mm-rr')-85,3000,NULL,20); +INSERT INTO employees VALUES (7788,'SCOTT','ANALYST',7566,to_date('13-6-1987','dd-mm-rr')-85,3000,NULL,20); INSERT INTO employees VALUES (7839,'KING','PRESIDENT',NULL,to_date('17-11-1981','dd-mm-'),5000,NULL,10); INSERT INTO employees VALUES (7844,'TURNER','SALESMAN',7698,to_date('8-9-1981','dd-mm-'),1500,0,30); ---INSERT INTO employees VALUES (7876,'ADAMS','CLERK',7788,to_date('13-JUL-87', 'dd-mm-rr')-51,1100,NULL,20); -INSERT INTO employees VALUES (7876,'ADAMS','CLERK',7788
MonetDB: default - Merge with Dec2016 branch.
Changeset: 771b92d1b410 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=771b92d1b410 Modified Files: monetdb5/mal/mal_function.c sql/backends/monet5/UDF/pyapi/convert_loops.h sql/test/BugTracker-2017/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (75 lines): diff --git a/monetdb5/mal/mal_function.c b/monetdb5/mal/mal_function.c --- a/monetdb5/mal/mal_function.c +++ b/monetdb5/mal/mal_function.c @@ -924,7 +924,7 @@ showFlowDetails(MalBlkPtr mb, MalStkPtr { (void) mb; /* fool the compiler */ (void) stk; /* fool the compiler */ - mnstr_printf(f, "n%d [fontsize=8, shape=box, label=\"%s\"]\n", pc, getFunctionId(p)); + mnstr_printf(f, "n%d [fontsize=8, shape=box, label=\"%s\"]\n", pc, getFunctionId(p) ? getFunctionId(p) : ""); } /* Produce a file with the flow graph in dot format. diff --git a/sql/backends/monet5/UDF/pyapi/convert_loops.h b/sql/backends/monet5/UDF/pyapi/convert_loops.h --- a/sql/backends/monet5/UDF/pyapi/convert_loops.h +++ b/sql/backends/monet5/UDF/pyapi/convert_loops.h @@ -171,6 +171,34 @@ } \ } \ } } +#define NP_COL_BAT_LOOPF(bat, mtpe_to, mtpe_from,index) { \ +if (mask == NULL) \ +{ \ +for (iu = 0; iu < ret->count; iu++) \ +{ \ +if (isnan(((mtpe_from*)data)[index_offset * ret->count + iu])) { \ + bat->tnil = 1; \ +((mtpe_to*) Tloc(bat, 0))[index + iu] = mtpe_to##_nil; \ +} else { \ +((mtpe_to*) Tloc(bat, 0))[index + iu] = (mtpe_to)((mtpe_from*)data)[index_offset * ret->count + iu]; \ +} \ +} \ +} \ +else \ +{ \ +for (iu = 0; iu < ret->count; iu++) \ +{ \ +if (mask[index_offset * ret->count + iu] == TRUE || isnan(((mtpe_from*)data)[index_offset * ret->count + iu])) \ +{ \ +bat->tnil = 1; \ +((mtpe_to*) Tloc(bat, 0))[index + iu] = mtpe_to##_nil; \ +} \ +else \ +{
MonetDB: default - Merge with Dec2016 branch.
Changeset: c162fb78322f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=3Dchangeset;node=3Dc162fb78322f Modified Files: MonetDB.spec geom/BugTracker/Tests/copy_into_crash.SF-1975402.stable.err monetdb5/modules/mal/mkey.c sql/backends/monet5/sql.c sql/test/BugDay_2005-11-09_2.9.3/Tests/hang_on_copy_into.SF-1100504.stable= .err sql/test/BugTracker-2008/Tests/copy-format.SF-2468513.stable.err sql/test/BugTracker-2008/Tests/varchar.SF-2471371.stable.err sql/test/BugTracker-2009/Tests/copy_into_error_off_by_one.SF-2833696.stabl= e.err sql/test/BugTracker-2010/Tests/copy-into-too-long-string.Bug-2358.stable.e= rr sql/test/BugTracker-2010/Tests/error-truncated.Bug-2615.stable.err sql/test/BugTracker-2010/Tests/incomplete-utf8-sequence.Bug-2575.stable.err sql/test/BugTracker-2015/Tests/backslash_predecing_separator.Bug-3775.stab= le.err sql/test/BugTracker-2017/Tests/All sql/test/BugTracker/Tests/copy_decimal.SF-1582957.stable.err sql/test/BugTracker/Tests/copy_overflow_null_bug.SF-1842550.stable.err sql/test/copy/Tests/columns.stable.err sql/test/copy/Tests/int_parse.stable.err sql/test/copy/Tests/load_stdin_incorrect_line_nr.stable.err sql/test/copy/Tests/null_as_string_errors.stable.err Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 315 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -201,6 +201,7 @@ package, and most likely also %{name}-SQ more client packages. =20 %files +%license COPYING %defattr(-,root,root) %{_libdir}/libbat.so.* =20 @@ -242,6 +243,7 @@ This package contains a shared library ( various other components. =20 %files stream +%license COPYING %defattr(-,root,root) %{_libdir}/libstream.so.* =20 @@ -289,6 +291,7 @@ SQL database so that it can be loaded ba MonetDB, you will very likely need this package. =20 %files client +%license COPYING %defattr(-,root,root) %{_bindir}/mclient %{_bindir}/msqldump @@ -375,6 +378,7 @@ odbcinst -u -d -n MonetDB fi =20 %files client-odbc +%license COPYING %defattr(-,root,root) %{_libdir}/libMonetODBC.so %{_libdir}/libMonetODBCs.so @@ -853,6 +857,7 @@ MonetDB packages. You probably don't ne developer. If you do want to test, install %{name}-testing-python. =20 %files testing +%license COPYING %defattr(-,root,root) %{_bindir}/Mdiff %{_bindir}/MkillUsers diff --git a/geom/BugTracker/Tests/copy_into_crash.SF-1975402.stable.err b/= geom/BugTracker/Tests/copy_into_crash.SF-1975402.stable.err --- a/geom/BugTracker/Tests/copy_into_crash.SF-1975402.stable.err +++ b/geom/BugTracker/Tests/copy_into_crash.SF-1975402.stable.err @@ -13,7 +13,7 @@ stderr of test 'copy_into_crash.SF-19754 MAPI =3D (monetdb) /var/tmp/mtest-27003/.s.monetdb.30235 QUERY =3D COPY 1 RECORDS INTO nodes from STDIN USING DELIMITERS ',', '\n'; 45111956, 'POINT(52.0697 4.3723)' -ERROR =3D !Failed to import table line 1 field p 'geometry(4)' expected in= ' 'POINT(52.0697 4.3723)'' +ERROR =3D !Failed to import table 'nodes', line 1 field p 'geometry(4)' ex= pected in ' 'POINT(52.0697 4.3723)'' =20 # 13:33:18 > =20 # 13:33:18 > Done. diff --git a/monetdb5/modules/mal/mkey.c b/monetdb5/modules/mal/mkey.c --- a/monetdb5/modules/mal/mkey.c +++ b/monetdb5/modules/mal/mkey.c @@ -50,6 +50,11 @@ MKEYhash(Client cntxt, MalBlkPtr mb, Mal res=3D getArgReference_lng(stk,p,0); val=3D getArgReference(stk,p,1); switch (ATOMstorage(tpe)) { + case TYPE_void: + case TYPE_bat: + case TYPE_ptr: + // illegal types, avoid falling into the default case. + assert(0); case TYPE_bte: *res =3D MKEYHASH_bte(val); break; diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -2507,7 +2507,7 @@ mvc_import_table_wrap(Client cntxt, MalB if (fname && s =3D=3D NULL) throw(IO, "bstreams.create", "Failed to create block stream"); if (b =3D=3D NULL) - throw(SQL, "importTable", "Failed to import table %s", be->mvc->errstr); + throw(SQL, "importTable", "Failed to import table '%s', %s", t->base.nam= e, be->mvc->errstr); bat2return(stk, pci, b); GDKfree(b); return msg; diff --git a/sql/test/BugDay_2005-11-09_2.9.3/Tests/hang_on_copy_into.SF-11= 00504.stable.err b/sql/test/BugDay_2005-11-09_2.9.3/Tests/hang_on_copy_into= .SF-1100504.stable.err --- a/sql/test/BugDay_2005-11-09_2.9.3/Tests/hang_on_copy_into.SF-1100504.s= table.err +++ b/sql/test/BugDay_2005-11-09_2.9.3/Tests/hang_on_copy_into.SF-1100504.s= table.err @@ -88,9 +88,7 @@ QUERY =3D COPY 1 RECORDS INTO "news" FROM=20 allemaal nogal lang duurt, maar in principe is het nog maar een uurtje of 6 werk om het goed te krijgen.
MonetDB: default - Merge with Dec2016 branch.
Changeset: 2572e6750e46 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2572e6750e46 Added Files: sql/test/emptydb/Tests/check.SQL.py Removed Files: clients/Tests/SQL-dump.SQL.py clients/Tests/SQL-dump.stable.err clients/Tests/SQL-dump.stable.out clients/Tests/SQL-dump.stable.out.int128 sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out.32bit sql/test/emptydb/Tests/check.SQL.py.src Modified Files: clients/Tests/All monetdb5/optimizer/opt_reorder.c sql/backends/monet5/UDF/pyapi/type_conversion.c sql/backends/monet5/sql_upgrades.c sql/test/bugs/Tests/All sql/test/emptydb-upgrade-chain-hge/Tests/All sql/test/emptydb-upgrade-chain-hge/Tests/check.SQL.py.src sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/All sql/test/emptydb-upgrade-chain/Tests/check.SQL.py.src sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-hge/Tests/All sql/test/emptydb-upgrade-hge/Tests/check.SQL.py.src sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/All sql/test/emptydb-upgrade/Tests/check.SQL.py.src sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb/Tests/All sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 16138 to 300 lines): diff --git a/clients/Tests/All b/clients/Tests/All --- a/clients/Tests/All +++ b/clients/Tests/All @@ -1,4 +1,3 @@ exports HAVE_FITS&HAVE_GEOM&HAVE_GSL&HAVE_LIBPY&HAVE_LIBR&HAVE_LIDAR&HAVE_NETCDF&HAVE_SAMTOOLS&HAVE_SHP&HAVE_SPHINXCLIENT?MAL-signatures -!BITS32&HAVE_FITS&HAVE_GEOM&HAVE_GSL&HAVE_LIDAR&HAVE_NETCDF&HAVE_PCRE&HAVE_SHP&HAVE_SAMTOOLS?SQL-dump MERCURIAL?malcheck diff --git a/clients/Tests/SQL-dump.stable.err b/clients/Tests/SQL-dump.stable.err deleted file mode 100644 --- a/clients/Tests/SQL-dump.stable.err +++ /dev/null @@ -1,36 +0,0 @@ -stderr of test 'SQL-dump` in directory 'clients` itself: - - -# 15:01:36 > -# 15:01:36 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=34237" "--set" "mapi_usock=/var/tmp/mtest-13451/.s.monetdb.34237" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/ufs/sjoerd/Monet-candidate/var/MonetDB/mTests_clients" "--set" "mal_listing=0" -# 15:01:36 > - -# builtin opt gdk_dbpath = /ufs/sjoerd/Monet-candidate/var/monetdb5/dbfarm/demo -# builtin opt gdk_debug = 0 -# builtin opt gdk_vmtrim = yes -# 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 = 34237 -# cmdline opt mapi_usock = /var/tmp/mtest-13451/.s.monetdb.34237 -# cmdline opt monet_prompt = -# cmdline opt mal_listing = 2 -# cmdline opt gdk_dbpath = /ufs/sjoerd/Monet-candidate/var/MonetDB/mTests_clients -# cmdline opt mal_listing = 0 - -# 15:01:36 > -# 15:01:36 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-13451" "--port=34237" -# 15:01:36 > - - - -# 15:01:41 > -# 15:01:41 > "Done." -# 15:01:41 > - diff --git a/clients/Tests/SQL-dump.stable.out b/clients/Tests/SQL-dump.stable.out deleted file mode 100644 --- a/clients/Tests/SQL-dump.stable.out +++ /dev/null @@ -1,7586 +0,0 @@ -stdout of test 'SQL-dump` in directory 'clients` itself: - - -# 15:01:36 > -# 15:01:36 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=34237" "--set" "mapi_usock=/var/tmp/mtest-13451/.s.monetdb.34237" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/ufs/sjoerd/Monet-candidate/var/MonetDB/mTests_clients" "--set" "mal_listing=0" -# 15:01:36 > - -# MonetDB 5 server v11.17.0 (hg id: 51cced809df4) -# This is an unreleased version -# Serving database 'mTests_clients', using 8 threads -# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked -# Found 15.591 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:34237/ -# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-13451/.s.monetdb.34237 -# MonetDB/GIS module loaded -# MonetDB/JAQL modu
MonetDB: default - Merge with Dec2016 branch.
Changeset: 06e7ddcdd814 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=06e7ddcdd814 Added Files: sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.out.int128 sql/test/BugTracker-2017/Tests/integer_addition_overflow.Bug-6205.sql sql/test/BugTracker-2017/Tests/integer_addition_overflow.Bug-6205.stable.err sql/test/BugTracker-2017/Tests/integer_addition_overflow.Bug-6205.stable.out Removed Files: sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single sql/test/BugTracker-2014/Tests/querylog.Bug-3607.stable.err.single sql/test/BugTracker-2014/Tests/querylog.Bug-3607.stable.out.single sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.out.single Modified Files: gdk/Makefile.ag monetdb5/optimizer/opt_support.c sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out sql/backends/monet5/rel_bin.c sql/test/BugTracker-2009/Tests/explain_gives_crash.SF-2741829.stable.out sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out sql/test/BugTracker-2010/Tests/group-by_ordered_column.Bug-2564.stable.out sql/test/BugTracker-2010/Tests/group-by_ordered_column.Bug-2564.stable.out.32bit sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.out sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128 sql/test/BugTracker-2011/Tests/func_iter_vs_bulk.Bug-2826.stable.out sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out sql/test/BugTracker-2013/Tests/between.Bug-3259.sql sql/test/BugTracker-2013/Tests/between.Bug-3259.stable.out sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.sql sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out sql/test/BugTracker-2014/Tests/querylog.Bug-3607.sql sql/test/BugTracker-2014/Tests/querylog.Bug-3607.stable.out sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.sql sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.out sql/test/BugTracker-2017/Tests/All sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.err sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.out sql/test/BugTracker/Tests/explain.SF-1739353.stable.out sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out sql/test/mergetables/Tests/mergequery.stable.out sql/test/pg_regress/Tests/float8.stable.err.Windows sql/test/remote/Tests/partition_elim.stable.out Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 2434 to 300 lines): diff --git a/gdk/Makefile.ag b/gdk/Makefile.ag --- a/gdk/Makefile.ag +++ b/gdk/Makefile.ag @@ -34,7 +34,6 @@ lib_gdk = { gdk_unique.c \ gdk_interprocess.c gdk_interprocess.h \ gdk_firstn.c \ - bat.feps bat1.feps bat2.feps \ libbat.rc LIBS = ../common/options/libmoptions \ ../common/stream/libstream \ diff --git a/monetdb5/optimizer/opt_support.c b/monetdb5/optimizer/opt_support.c --- a/monetdb5/optimizer/opt_support.c +++ b/monetdb5/optimizer/opt_support.c @@ -398,6 +398,10 @@ hasSideEffects(InstrPtr p, int strict) { if( getFunctionId(p) == NULL) return FALSE; + /* update instructions have side effects */ + if (isUpdateInstruction(p)) + return TRUE; + if ( (getModuleId(p) == batRef || getModuleId(p)==sqlRef) && (getFunctionId(p) == setAccessRef || getFunctionId(p) == setWriteModeRef || @@ -442,10 +446,6 @@ hasSideEffects(InstrPtr p, int strict) if (getFunctionId(p) == zero_or_oneRef) return FALSE; if (getFunctionId(p) == mvcRef) return FALSE; if (getFunctionId(p) == singleRef) return FALSE; - /* the update instructions for SQL has side effects. - whether this is relevant should be explicitly checked - in the environment of the call */ - if (isUpdateInstruction(p)) return TRUE; return TRUE; } if( getModuleId(p) == languageRef){ diff --git a/sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out b/sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out --- a/sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out +++ b/sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out @@ -172,15 +172,10 @@ end user.s8_1; function user.s16_1():void; X_1:void := querylog.define("explain select fuse(a,b) from udf_fuse;", "sequential_pipe", 27:int); X_29 := bat.new(nil:
MonetDB: default - Merge with Dec2016 branch.
Changeset: c2339c56c478 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c2339c56c478 Added Files: monetdb5/extras/rapi/Tests/rapi02.stable.out.int128 sql/backends/monet5/Tests/int_notation_1e5.stable.out.int128 sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.stable.out.int128 sql/jdbc/tests/Tests/Test_Int128.stable.out.int128 sql/test/BugTracker-2015/Tests/hugeint-wrong-value.Bug-3849.stable.out.int128 sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.stable.out.int128 sql/test/BugTracker-2017/Tests/cast-with-many-decimals.Bug-6195.stable.out.int128 sql/test/BugTracker-2017/Tests/str2decimal.Bug-6206.sql sql/test/BugTracker-2017/Tests/str2decimal.Bug-6206.stable.err sql/test/BugTracker-2017/Tests/str2decimal.Bug-6206.stable.out sql/test/mapi/Tests/mal_int128.stable.out.int128 sql/test/mapi/Tests/perl_dec38.stable.out.int128 sql/test/mapi/Tests/perl_int128.stable.out.int128 sql/test/mapi/Tests/php_dec38.stable.out.int128 sql/test/mapi/Tests/php_int128.stable.out.int128 sql/test/mapi/Tests/python2_dec38.stable.out.int128 sql/test/mapi/Tests/python2_int128.stable.out.int128 sql/test/mapi/Tests/python3_dec38.stable.out.int128 sql/test/mapi/Tests/python3_int128.stable.out.int128 sql/test/mapi/Tests/sql_dec38.stable.out.int128 sql/test/mapi/Tests/sql_int128.stable.out.int128 sql/test/pg_regress/Tests/numeric.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/dump.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/package.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/unpackage.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/dump.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/unpackage.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb/Tests/testdb-package-hge.stable.out.int128 Removed Files: gdk/bat.feps gdk/bat.png gdk/bat1.feps gdk/bat1.png gdk/bat2.feps gdk/bat2.png monetdb5/extras/rapi/Tests/rapi02.stable.out sql/backends/monet5/Tests/int_notation_1e5.stable.out sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.stable.out sql/jdbc/tests/Tests/Test_Int128.stable.out sql/test/BugTracker-2015/Tests/hugeint-wrong-value.Bug-3849.stable.out sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.stable.out sql/test/BugTracker-2017/Tests/cast-with-many-decimals.Bug-6195.stable.out sql/test/mapi/Tests/mal_int128.stable.out sql/test/mapi/Tests/perl_dec38.stable.out sql/test/mapi/Tests/perl_int128.stable.out sql/test/mapi/Tests/php_dec38.stable.out sql/test/mapi/Tests/php_int128.stable.out sql/test/mapi/Tests/python2_dec38.stable.out sql/test/mapi/Tests/python2_int128.stable.out sql/test/mapi/Tests/python3_dec38.stable.out sql/test/mapi/Tests/python3_int128.stable.out sql/test/mapi/Tests/sql_dec38.stable.out sql/test/mapi/Tests/sql_int128.stable.out sql/test/pg_regress/Tests/numeric.stable.out sql/test/testdb-upgrade-chain-hge/Tests/dump.stable.out sql/test/testdb-upgrade-chain-hge/Tests/package.stable.out sql/test/testdb-upgrade-chain-hge/Tests/unpackage.stable.out sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out sql/test/testdb-upgrade-hge/Tests/dump.stable.out sql/test/testdb-upgrade-hge/Tests/unpackage.stable.out sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out sql/test/testdb/Tests/testdb-package-hge.stable.out Modified Files: gdk/gdk_join.c monetdb5/extras/rapi/rapi.c monetdb5/modules/mal/sysmon.c sql/backends/monet5/sql_round_impl.h sql/benchmarks/ssbm/Tests/01-13.stable.out sql/benchmarks/ssbm/Tests/01-13.stable.out.int128 sql/benchmarks/ssbm/Tests/01.stable.out sql/benchmarks/ssbm/Tests/01.stable.out.int128 sql/benchmarks/ssbm/Tests/02.stable.out sql/benchmarks/ssbm/Tests/02.stable.out.int128 sql/benchmarks/ssbm/Tests/03.stable.out sql/benchmarks/ssbm/Tests/03.stable.out.int128 sql/common/sql_types.c sql/server/rel_psm.c sql/server/rel_select.c sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128 sql/test/BugTracker-2013/Tests/between.Bug-3259.stable.out sql/test/BugTracker-2016/Tests/column_alias_in_where_clause.Bug-3947.stable.out sql/test/BugTracker-2016/Tests/column_alias_in_where_clause.Bug-3947.stable.out.int128 sql/test/BugTracker-2017/Tests/A
MonetDB: default - Merge with Dec2016 branch.
Changeset: 26dde113491f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=26dde113491f Added Files: sql/test/BugTracker-2017/Tests/crash_on_count_div_count.Bug-6201.sql sql/test/BugTracker-2017/Tests/crash_on_count_div_count.Bug-6201.stable.err sql/test/BugTracker-2017/Tests/crash_on_count_div_count.Bug-6201.stable.out sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.sql sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.err sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.out sql/test/BugTracker-2017/Tests/rel2bin_project-assert.Bug-6080.sql sql/test/BugTracker-2017/Tests/rel2bin_project-assert.Bug-6080.stable.err sql/test/BugTracker-2017/Tests/rel2bin_project-assert.Bug-6080.stable.out Modified Files: clients/Tests/SQL-dump.stable.out clients/Tests/SQL-dump.stable.out.int128 gdk/gdk.h gdk/gdk_atoms.c gdk/gdk_bbp.c gdk/gdk_heap.c sql/backends/monet5/sql_result.c sql/backends/monet5/sql_upgrades.c sql/benchmarks/ATIS/Tests/select_group.stable.out sql/benchmarks/ATIS/Tests/select_group.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/01.stable.out sql/benchmarks/tpch/LOCKED/Tests/01.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/03.stable.out sql/benchmarks/tpch/LOCKED/Tests/03.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/04.stable.out sql/benchmarks/tpch/LOCKED/Tests/05.stable.out sql/benchmarks/tpch/LOCKED/Tests/05.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/06.stable.out sql/benchmarks/tpch/LOCKED/Tests/06.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/07.stable.out sql/benchmarks/tpch/LOCKED/Tests/07.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/08.stable.out sql/benchmarks/tpch/LOCKED/Tests/08.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/09.stable.out sql/benchmarks/tpch/LOCKED/Tests/09.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/10.stable.out sql/benchmarks/tpch/LOCKED/Tests/10.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/11.stable.out sql/benchmarks/tpch/LOCKED/Tests/11.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/12.stable.out sql/benchmarks/tpch/LOCKED/Tests/12.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/13.stable.out sql/benchmarks/tpch/LOCKED/Tests/14.stable.out sql/benchmarks/tpch/LOCKED/Tests/14.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/15.stable.out sql/benchmarks/tpch/LOCKED/Tests/15.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/16.stable.out sql/benchmarks/tpch/LOCKED/Tests/17.stable.out sql/benchmarks/tpch/LOCKED/Tests/17.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/18.stable.out sql/benchmarks/tpch/LOCKED/Tests/18.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/19.stable.out sql/benchmarks/tpch/LOCKED/Tests/19.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/21.stable.out sql/benchmarks/tpch/LOCKED/Tests/21.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/22.stable.out sql/benchmarks/tpch/LOCKED/Tests/22.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/check1.stable.out sql/benchmarks/tpch/LOCKED/Tests/check2.stable.out sql/benchmarks/tpch/LOCKED/Tests/load.stable.out sql/benchmarks/tpch/Tests/01-22.stable.out sql/benchmarks/tpch/Tests/01-22.stable.out.int128 sql/benchmarks/tpch/Tests/01.stable.out sql/benchmarks/tpch/Tests/01.stable.out.int128 sql/benchmarks/tpch/Tests/03.stable.out sql/benchmarks/tpch/Tests/03.stable.out.int128 sql/benchmarks/tpch/Tests/05.stable.out sql/benchmarks/tpch/Tests/05.stable.out.int128 sql/benchmarks/tpch/Tests/06.stable.out sql/benchmarks/tpch/Tests/06.stable.out.int128 sql/benchmarks/tpch/Tests/07.stable.out sql/benchmarks/tpch/Tests/07.stable.out.int128 sql/benchmarks/tpch/Tests/08.stable.out sql/benchmarks/tpch/Tests/08.stable.out.int128 sql/benchmarks/tpch/Tests/09.stable.out sql/benchmarks/tpch/Tests/09.stable.out.int128 sql/benchmarks/tpch/Tests/10.stable.out sql/benchmarks/tpch/Tests/10.stable.out.int128 sql/benchmarks/tpch/Tests/11.stable.out sql/benchmarks/tpch/Tests/11.stable.out.int128 sql/benchmarks/tpch/Tests/14.stable.out sql/benchmarks/tpch/Tests/14.stable.out.int128 sql/benchmarks/tpch/Tests/15.stable.out sql/benchmarks/tpch/Tests/15.stable.out.int128 sql/benchmarks/tpch/Tests/17.stable.out sql/ben
MonetDB: default - Merge with Dec2016 branch.
Changeset: caa628bc505f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=caa628bc505f Added Files: sql/test/BugTracker-2017/Tests/crash_in_null_cast.Bug-6186.sql sql/test/BugTracker-2017/Tests/crash_in_null_cast.Bug-6186.stable.err sql/test/BugTracker-2017/Tests/crash_in_null_cast.Bug-6186.stable.out sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.sql sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.err sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.out Modified Files: monetdb5/mal/Makefile.ag monetdb5/modules/atoms/str.c monetdb5/modules/mal/orderidx.c monetdb5/modules/mal/pcre.c sql/backends/monet5/sql.c sql/backends/monet5/sql_cat.c sql/server/rel_optimizer.c sql/test/BugTracker-2017/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 467 to 300 lines): diff --git a/monetdb5/mal/Makefile.ag b/monetdb5/mal/Makefile.ag --- a/monetdb5/mal/Makefile.ag +++ b/monetdb5/mal/Makefile.ag @@ -54,10 +54,18 @@ headers_h = { HEADERS = h SOURCES = \ mal.h \ + mal_client.h \ mal_errors.h \ mal_exception.h \ + mal_factory.h \ + mal_function.h \ mal_instruction.h \ + mal_interpreter.h \ + mal_listing.h \ + mal_module.h \ mal_namespace.h \ + mal_profiler.h \ + mal_resolve.h \ mal_stack.h \ mal_type.h } diff --git a/monetdb5/modules/atoms/str.c b/monetdb5/modules/atoms/str.c --- a/monetdb5/modules/atoms/str.c +++ b/monetdb5/modules/atoms/str.c @@ -1831,8 +1831,8 @@ STRReverseStrSearch(int *res, const str str STRsplitpart(str *res, str *haystack, str *needle, int *field) { - size_t slen; - int len, f = *field; + size_t len; + int f = *field; char *p; const char *s = *haystack; const char *s2 = *needle; @@ -1848,10 +1848,10 @@ STRsplitpart(str *res, str *haystack, st throw(MAL, "str.splitpart", "field position must be greater than zero"); } - slen = strlen(s2); + len = strlen(s2); while ((p = strstr(s, s2)) != 0 && f > 1) { - s = p + slen; + s = p + len; f--; } @@ -1861,16 +1861,16 @@ STRsplitpart(str *res, str *haystack, st throw(MAL, "str.splitpart", MAL_MALLOC_FAIL); return MAL_SUCCEED; } - + if (p == 0) { len = strlen(s); } else if ((p = strstr(s, s2)) != 0) { - len = (int) (p - s); + len = (size_t) (p - s); } else { len = strlen(s); } - if (len == int_nil || len == 0) { + if (len == 0) { *res = GDKstrdup(""); if (*res == NULL) throw(MAL, "str.splitpart", MAL_MALLOC_FAIL); diff --git a/monetdb5/modules/mal/orderidx.c b/monetdb5/modules/mal/orderidx.c --- a/monetdb5/modules/mal/orderidx.c +++ b/monetdb5/modules/mal/orderidx.c @@ -47,6 +47,25 @@ OIDXcreateImplementation(Client cntxt, i if (b->torderidx) return MAL_SUCCEED; + switch (ATOMbasetype(b->ttype)) { + case TYPE_bte: + case TYPE_sht: + case TYPE_int: + case TYPE_lng: +#ifdef HAVE_HGE + case TYPE_hge: +#endif + case TYPE_flt: + case TYPE_dbl: + break; + case TYPE_str: + /* TODO: support strings etc. */ + case TYPE_void: + case TYPE_ptr: + default: + throw(MAL, "bat.orderidx", TYPE_NOT_SUPPORTED); + } + if( pieces < 0 ){ if (GDKnr_threads <= 1) { pieces = 1; diff --git a/sql/backends/monet5/sql_cat.c b/sql/backends/monet5/sql_cat.c --- a/sql/backends/monet5/sql_cat.c +++ b/sql/backends/monet5/sql_cat.c @@ -642,8 +642,13 @@ alter_table(Client cntxt, mvc *sql, char if (i->type == ordered_idx) { sql_kc *ic = i->columns->h->data; BAT *b = mvc_bind(sql, nt->s->base.name, nt->base.name, ic->c->base.name, 0); - OIDXcreateImplementation(cntxt, newBatType(b->ttype), b, -1); + char *msg = OIDXcreateImplementation(cntxt, newBatType(b->ttype), b, -1); BBPunfix(b->batCacheid); + if (msg != MAL_SUCCEED) { + char *smsg = sql_message("40002!CREATE ORDERED INDEX: %s", msg); + freeException(msg); + return smsg; + }
MonetDB: default - Merge with Dec2016 branch.
Changeset: 47bb3cb873ea for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=47bb3cb873ea Added Files: sql/test/BugTracker-2017/Tests/complicated_logic.Bug-105.sql sql/test/BugTracker-2017/Tests/complicated_logic.Bug-105.stable.err sql/test/BugTracker-2017/Tests/complicated_logic.Bug-105.stable.out sql/test/BugTracker-2017/Tests/drop_not_null_on_pkey.Bug-6189.sql sql/test/BugTracker-2017/Tests/drop_not_null_on_pkey.Bug-6189.stable.err sql/test/BugTracker-2017/Tests/drop_not_null_on_pkey.Bug-6189.stable.out sql/test/BugTracker-2017/Tests/incorrect_error.Bug-6141.sql sql/test/BugTracker-2017/Tests/incorrect_error.Bug-6141.stable.err sql/test/BugTracker-2017/Tests/incorrect_error.Bug-6141.stable.out sql/test/BugTracker-2017/Tests/splitpart.Bug-6194.sql sql/test/BugTracker-2017/Tests/splitpart.Bug-6194.stable.err sql/test/BugTracker-2017/Tests/splitpart.Bug-6194.stable.out sql/test/BugTracker-2017/Tests/union_func_crash.Bug-6196.sql sql/test/BugTracker-2017/Tests/union_func_crash.Bug-6196.stable.err sql/test/BugTracker-2017/Tests/union_func_crash.Bug-6196.stable.out Modified Files: monetdb5/modules/atoms/str.c monetdb5/modules/kernel/mmath.mal monetdb5/optimizer/opt_support.c sql/backends/monet5/sql.c sql/backends/monet5/sql_cat.c sql/server/rel_optimizer.c sql/server/rel_select.c sql/server/sql_mvc.h sql/test/BugTracker-2014/Tests/too_general_errmsg.Bug-3605.stable.err sql/test/BugTracker-2017/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 741 to 300 lines): diff --git a/monetdb5/modules/atoms/str.c b/monetdb5/modules/atoms/str.c --- a/monetdb5/modules/atoms/str.c +++ b/monetdb5/modules/atoms/str.c @@ -1863,11 +1863,11 @@ STRsplitpart(str *res, str *haystack, st } if (p == 0) { - len = UTF8_strlen(s); + len = strlen(s); } else if ((p = strstr(s, s2)) != 0) { len = (int) (p - s); } else { - len = UTF8_strlen(s); + len = strlen(s); } if (len == int_nil || len == 0) { diff --git a/monetdb5/modules/kernel/mmath.mal b/monetdb5/modules/kernel/mmath.mal --- a/monetdb5/modules/kernel/mmath.mal +++ b/monetdb5/modules/kernel/mmath.mal @@ -194,7 +194,7 @@ unsafe command rand () :int address MATHrandint comment "return a random number"; -command rand (v:int) :int +unsafe command rand (v:int) :int address MATHrandintarg comment "return a random number"; diff --git a/monetdb5/optimizer/opt_support.c b/monetdb5/optimizer/opt_support.c --- a/monetdb5/optimizer/opt_support.c +++ b/monetdb5/optimizer/opt_support.c @@ -277,7 +277,7 @@ isUnsafeFunction(InstrPtr q) } /* - * Instructions are unsafe is one of the arguments is also mentioned + * Instructions are unsafe if one of the arguments is also mentioned * in the result list. Alternatively, the 'unsafe' property is set * for the function call itself. */ diff --git a/sql/backends/monet5/sql_cat.c b/sql/backends/monet5/sql_cat.c --- a/sql/backends/monet5/sql_cat.c +++ b/sql/backends/monet5/sql_cat.c @@ -591,6 +591,15 @@ alter_table(Client cntxt, mvc *sql, char sql_column *nc = mvc_bind_column(sql, nt, c->base.name); if (c->null != nc->null && isTable(nt)) { + if (c->null && nt->pkey) { /* check for primary keys based on this column */ + node *m; + for(m = nt->pkey->k.columns->h; m; m = m->next) { + sql_kc *kc = m->data; + + if (kc->c->base.id == c->base.id) + return sql_message("4!NOT NULL CONSTRAINT: cannot change NOT NULL CONSTRAINT for column '%s' as its part of the PRIMARY KEY\n", c->base.name); + } + } mvc_null(sql, nc, c->null); /* for non empty check for nulls */ if (c->null == 0) { diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -3961,7 +3961,7 @@ rel_push_select_down(int *changes, mvc * pl = r->l; /* introduce selects under the project (if needed) */ set_processed(pl); - if (!is_select(pl->op)) + if (!is_select(pl->op) || rel_is_ref(pl)) r->l = pl = rel_select(sql->sa, pl, NULL); /* for each exp check if we can rename it */ @@ -4586,7 +4586,7 @@ rel_push_select_down_union(int *changes, if (u->op == op_project) u = u->l; - if (!u || !is_union(u->o
MonetDB: default - Merge with Dec2016 branch.
Changeset: 7b3b0b6185df for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7b3b0b6185df Removed Files: sql/test/Tests/setoptimizer.stable.out.Windows Modified Files: monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows monetdb5/mal/mal_client.c monetdb5/mal/mal_import.c monetdb5/mal/mal_session.c monetdb5/modules/atoms/mtime.c sql/test/Tests/setoptimizer.stable.out Branch: default Log Message: Merge with Dec2016 branch. diffs (235 lines): diff --git a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows --- a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows +++ b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows @@ -49,21 +49,21 @@ Ready. % .L2 # table_name % L2 # name % varchar # type -% 12 # length -[ "default_pipe" ] +% 15 # length +[ "sequential_pipe"] #select def from optimizers() where name = optimizer; % .L1 # table_name % def # name % clob # type -% 579 # length -[ "optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.emptybind();optimizer.pushselect();optimizer.aliases();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.reorder();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.candidates();optimizer.jit();optimizer.garbageCollector();" ] +% 538 # length +[ "optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.emptybind();optimizer.pushselect();optimizer.aliases();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.reorder();optimizer.deadcode();optimizer.reduce();optimizer.matpack();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.candidates();optimizer.jit();optimizer.garbageCollector();" ] #explain copy into ttt from 'a:\tmp/xyz'; % .explain # table_name % mal # name % clob # type % 149 # length -function user.s8_1():void; -X_0:void := querylog.define("explain copy into ttt from \\'a:tmp/xyz\\';","default_pipe",4:int); +function user.s10_1():void; +X_0:void := querylog.define("explain copy into ttt from \\'a:tmp/xyz\\';","sequential_pipe",4:int); X_3 := sql.mvc(); (X_24:bat[:int],X_25:bat[:int],X_26:bat[:int]) := sql.copy_from(nil:ptr,"|","\\n",nil:str,"null","a:\\tmp/xyz",-1:lng,0:lng,0:int,0:int,nil:str); X_28 := sql.append(X_3,"sys","ttt","a",X_24); @@ -109,14 +109,14 @@ end user.s10_1; % .L1 # table_name % def # name % clob # type -% 602 # length -[ "optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.emptybind();optimizer.pushselect();optimizer.aliases();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.reorder();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.candidates();optimizer.jit();optimizer.sql_append();optimizer.garbageCollector();" ] +% 561 # length +[ "optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.emptybind();optimizer.pushselect();optimizer.aliases();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.reorder();optimizer.deadcode();optimizer.reduce();optimizer.matpack();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.candidates();optimizer.jit();optimizer.sql_append();optimizer.garbageCollector();" ] #explain copy into ttt from 'Z:/tmp/xyz'; % .explain # table_name % mal # name % clob # type % 148 # length -function user.s24_1():void; +function user.s26_1():void; X_0:void := querylog.define("explain copy into ttt from \\'Z:/tmp/xyz\\';","user_1",4:int); X_3 := sql.mvc(); (X_24:bat[:int],X_25:bat[:int],X_26:bat[:int]) := sql.copy_from(nil:ptr,"|","\\n",nil:str,"null","Z:/tmp/xyz",-1:lng,0:lng,0:int,0:int,nil:str); 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 @@ -110,7 +110,7 @@ MCpopClientInput(Client c) ClientInput *x = c->bak; if (c->fdin) { /* missing protection against closing stdin stream */
MonetDB: default - Merge with Dec2016 branch.
Changeset: 76e085af5b55 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=76e085af5b55 Modified Files: gdk/gdk_calc.c sql/backends/monet5/sql_cast.c sql/backends/monet5/sql_cast_impl_int.h sql/backends/monet5/sql_fround.c Branch: default Log Message: Merge with Dec2016 branch. diffs (82 lines): diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c --- a/gdk/gdk_calc.c +++ b/gdk/gdk_calc.c @@ -13454,6 +13454,20 @@ convert_##TYPE1##_##TYPE2(const TYPE1 *s #define roundflt(x)roundf(x) #define rounddbl(x)round(x) #endif + +#ifndef HAVE_ROUND +static inline double +round(double val) +{ + /* round to nearest integer, away from zero */ + if (val < 0) + return -floor(-val + 0.5); + else + return floor(val + 0.5); +} +#define roundf(x) ((float)round((double)(x))) +#endif + #define convertimpl_reduce_float(TYPE1, TYPE2) \ static BUN \ convert_##TYPE1##_##TYPE2(const TYPE1 *src, TYPE2 *restrict dst, BUN cnt, \ diff --git a/sql/backends/monet5/sql_cast.c b/sql/backends/monet5/sql_cast.c --- a/sql/backends/monet5/sql_cast.c +++ b/sql/backends/monet5/sql_cast.c @@ -465,6 +465,19 @@ SQLbatstr_cast(Client cntxt, MalBlkPtr m return msg; } +#ifndef HAVE_ROUND +static inline double +round(double val) +{ + /* round to nearest integer, away from zero */ + if (val < 0) + return -floor(-val + 0.5); + else + return floor(val + 0.5); +} +#define roundf(x) ((float)round((double)(x))) +#endif + /* up casting */ #define TP1 bte diff --git a/sql/backends/monet5/sql_cast_impl_int.h b/sql/backends/monet5/sql_cast_impl_int.h --- a/sql/backends/monet5/sql_cast_impl_int.h +++ b/sql/backends/monet5/sql_cast_impl_int.h @@ -48,7 +48,7 @@ FUN(do_,TP1,_dec2dec_,TP2) (TP2 *restric GDKfree(buf); return msg; } - val *= scales[s2 - s1]; + val *= (TP1) scales[s2 - s1]; } else if (s2 < s1) { if (val / scales[s1 - s2] <= GDKmin(TP2) || val / scales[s1 - s2] > GDKmax(TP2)) { @@ -75,9 +75,9 @@ FUN(do_,TP1,_dec2dec_,TP2) (TP2 *restric *res = (TP2) val; #else if (s2 > s1) { - r *= scales[s2 - s1]; + r *= (TP2) scales[s2 - s1]; } else if (s2 < s1) { - r = (TP1) ((r + r = (TP2) ((r #ifndef TRUNCATE_NUMBERS + (val < 0 ? -5 : 5) * scales[s1 - s2 - 1] #endif diff --git a/sql/backends/monet5/sql_fround.c b/sql/backends/monet5/sql_fround.c --- a/sql/backends/monet5/sql_fround.c +++ b/sql/backends/monet5/sql_fround.c @@ -22,7 +22,6 @@ #include "clients.h" #include "mal_instruction.h" -/* Windows doesn't have round or trunc, but it does have floor and ceil */ #ifndef HAVE_ROUND static inline double round(double val) ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 55cd1907ad24 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=55cd1907ad24 Modified Files: monetdb5/modules/mal/tablet.c sql/backends/monet5/sql_upgrades.c Branch: default Log Message: Merge with Dec2016 branch. diffs (78 lines): diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c --- a/monetdb5/modules/mal/tablet.c +++ b/monetdb5/modules/mal/tablet.c @@ -959,6 +959,9 @@ SQLworker_column(READERtask *task, int c int i; Column *fmt = task->as->format; + if (fmt[col].c == NULL) + return 0; + /* watch out for concurrent threads */ MT_lock_set(&mal_copyLock); if (!fmt[col].skip && BATcapacity(fmt[col].c) < BATcount(fmt[col].c) + task->next) { @@ -1617,6 +1620,7 @@ SQLload_file(Client cntxt, Tablet *as, b BUN cnt = 0, cntstart = 0, leftover = 0; int res = 0;/* < 0: error, > 0: success, == 0: continue processing */ int j; + BUN firstcol; BUN i, attr; READERtask *task = (READERtask *) GDKzalloc(sizeof(READERtask)); READERtask ptask[MAXWORKERS]; @@ -1762,10 +1766,13 @@ SQLload_file(Client cntxt, Tablet *as, b #ifdef MLOCK_TST mlock(task->b->buf, task->b->size); #endif + for (firstcol = 0; firstcol < task->as->nr_attrs; firstcol++) + if (task->as->format[firstcol].c != NULL) + break; while (res == 0 && cnt < task->maxrow) { // track how many elements are in the aggregated BATs - cntstart = BATcount(task->as->format[0].c); + cntstart = BATcount(task->as->format[firstcol].c); /* block until the producer has data available */ MT_sema_down(&task->consumer); cnt += task->top[task->cur]; @@ -1857,9 +1864,9 @@ SQLload_file(Client cntxt, Tablet *as, b #ifdef _DEBUG_TABLET_ mnstr_printf(GDKout, "#Trim bbest %d table size " BUNFMT " rows found so far " BUNFMT "\n", -best, BATcount(as->format[0].c), task->cnt); +best, BATcount(as->format[firstcol].c), task->cnt); #endif - if (best && BATcount(as->format[0].c)) { + if (best && BATcount(as->format[firstcol].c)) { BUN limit; int width; @@ -1920,7 +1927,7 @@ SQLload_file(Client cntxt, Tablet *as, b task->ateof, res); #endif - cnt = BATcount(task->as->format[0].c); + cnt = BATcount(task->as->format[firstcol].c); if (GDKdebug & GRPalgorithms) { mnstr_printf(GDKout, "#COPY reader time " LLFMT " line break " LLFMT " io " LLFMT "\n", total, lio, iototal); diff --git a/sql/backends/monet5/sql_upgrades.c b/sql/backends/monet5/sql_upgrades.c --- a/sql/backends/monet5/sql_upgrades.c +++ b/sql/backends/monet5/sql_upgrades.c @@ -483,7 +483,7 @@ sql_update_geom(Client c, mvc *sql, int } static str -sql_update_default(Client c, mvc *sql) +sql_update_dec2016(Client c, mvc *sql) { size_t bufsize = 12240, pos = 0; char *buf = GDKmalloc(bufsize), *err = NULL; @@ -1284,7 +1284,7 @@ SQLupgrades(Client c, mvc *m) sql_find_subtype(&tp, "clob", 0, 0); if (!sql_bind_func3(m->sa, s, "createorderindex", &tp, &tp, &tp, F_PROC)) { - if ((err = sql_update_default(c, m)) != NULL) { + if ((err = sql_update_dec2016(c, m)) != NULL) { fprintf(stderr, "!%s\n", err); GDKfree(err); } ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 2ab3006100c3 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ab3006100c3 Added Files: sql/test/BugTracker-2017/Tests/cast-with-many-decimals.Bug-6195.sql sql/test/BugTracker-2017/Tests/cast-with-many-decimals.Bug-6195.stable.err sql/test/BugTracker-2017/Tests/cast-with-many-decimals.Bug-6195.stable.out Modified Files: geom/BugTracker/Tests/X_crash.SF-1971632.stable.out monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out sql/test/BugTracker-2017/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (253 lines): diff --git a/geom/BugTracker/Tests/X_crash.SF-1971632.stable.out b/geom/BugTracker/Tests/X_crash.SF-1971632.stable.out --- a/geom/BugTracker/Tests/X_crash.SF-1971632.stable.out +++ b/geom/BugTracker/Tests/X_crash.SF-1971632.stable.out @@ -29,8 +29,8 @@ Ready. [ 1] [ 1] #select count(*) from geoms; -% sys.L1 # table_name -% L1 # name +% sys.L4 # table_name +% L3 # name % bigint # type % 1 # length [ 4] diff --git a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out --- a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out +++ b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out @@ -49,21 +49,21 @@ Ready. % .L2 # table_name % L2 # name % varchar # type -% 12 # length -[ "default_pipe" ] +% 15 # length +[ "sequential_pipe"] #select def from optimizers() where name = optimizer; % .L1 # table_name % def # name % clob # type -% 544 # length -[ "optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.emptybind();optimizer.pushselect();optimizer.aliases();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.reorder();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.candidates();optimizer.garbageCollector();" ] +% 503 # length +[ "optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.emptybind();optimizer.pushselect();optimizer.aliases();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.reorder();optimizer.deadcode();optimizer.matpack();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.candidates();optimizer.garbageCollector();" ] #explain copy into ttt from '/tmp/xyz'; % .explain # table_name % mal # name % clob # type % 158 # length -function user.s8_1():void; -X_1:void := querylog.define("explain copy into ttt from \\'/tmp/xyz\\';", "default_pipe", 21:int); +function user.s10_1():void; +X_1:void := querylog.define("explain copy into ttt from \\'/tmp/xyz\\';", "sequential_pipe", 21:int); X_4 := sql.mvc(); (X_25:bat[:int], X_26:bat[:int], X_27:bat[:int]) := sql.copy_from(nil:ptr, "|", "\\n", nil:str, "null", "/tmp/xyz", -1:lng, 0:lng, 0:int, 0:int, nil:str); X_29 := sql.append(X_4, "sys", "ttt", "a", X_25); @@ -71,7 +71,7 @@ function user.s8_1():void; X_37 := sql.append(X_34, "sys", "ttt", "c", X_27); X_39 := aggr.count(X_27); sql.affectedRows(X_37, X_39); -end user.s8_1; +end user.s10_1; #inline actions= 0 time=1 usec #candidates actions= 1 time=14 usec #remapactions= 0 time=3 usec @@ -114,14 +114,14 @@ end user.s8_1; % .L1 # table_name % def # name % clob # type -% 567 # length -[ "optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.emptybind();optimizer.pushselect();optimizer.aliases();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.reorder();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.candidates();optimizer.sql_append();optimizer.garbageCollector();" ] +% 526 # length +[ "optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.emptybind();optimizer.pushselect();optimizer.aliases();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.reorder();optimizer.deadcode();optimizer.matpack();optimizer.querylog();optimizer.multiplex(
MonetDB: default - Merge with Dec2016 branch.
Changeset: 43db749925a8 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=43db749925a8 Added Files: sql/backends/monet5/sql_cast_impl_int.h sql/test/BugTracker-2017/Tests/round-or-truncate.Bug-6193.sql sql/test/BugTracker-2017/Tests/round-or-truncate.Bug-6193.stable.err sql/test/BugTracker-2017/Tests/round-or-truncate.Bug-6193.stable.out Removed Files: sql/backends/monet5/sql_cast_impl_down_from_int.h sql/backends/monet5/sql_cast_impl_up_to_int.h sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.out.int128 Modified Files: gdk/gdk_calc.c geom/BugTracker/Tests/All geom/BugTracker/Tests/X_crash.SF-1971632.sql monetdb5/extras/mal_optimizer_template/Tests/All monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.sql monetdb5/optimizer/opt_pipes.c sql/backends/monet5/Makefile.ag sql/backends/monet5/generator/Tests/generator04.sql sql/backends/monet5/generator/Tests/generator04.stable.err sql/backends/monet5/sql.c sql/backends/monet5/sql_cast.c sql/backends/monet5/sql_cast_impl_down_from_flt.h sql/backends/monet5/sql_cast_impl_up_to_flt.h sql/jdbc/tests/Tests/All sql/server/sql_atom.c sql/test/ADT2006/Tests/bram.stable.out sql/test/BugTracker-2009/Tests/All sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.sql sql/test/BugTracker-2015/Tests/cast_to_num.Bug-3744.stable.out sql/test/BugTracker-2016/Tests/All sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.sql 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/BugTracker-2017/Tests/All sql/test/VOC/Tests/VOC.stable.out sql/test/mergetables/Tests/forex.stable.out sql/test/mergetables/Tests/forex.stable.out.int128 sql/test/pg_regress/Tests/All sql/test/pg_regress/Tests/int8.sql sql/test/pg_regress/Tests/numeric.sql sql/test/pg_regress/Tests/numeric.stable.err sql/test/pg_regress/Tests/numeric.stable.out sql/test/pg_regress/Tests/numerology.stable.out sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.sql sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.out Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 5597 to 300 lines): diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c --- a/gdk/gdk_calc.c +++ b/gdk/gdk_calc.c @@ -13447,6 +13447,13 @@ convert_##TYPE1##_##TYPE2(const TYPE1 *s /* Special version of the above for converting from floating point. * The final assignment rounds the value which can still come out to * the NIL representation, so we need to check for that. */ +#ifdef TRUNCATE_NUMBERS +#define roundflt(x)(x) +#define rounddbl(x)(x) +#else +#define roundflt(x)roundf(x) +#define rounddbl(x)round(x) +#endif #define convertimpl_reduce_float(TYPE1, TYPE2) \ static BUN \ convert_##TYPE1##_##TYPE2(const TYPE1 *src, TYPE2 *restrict dst, BUN cnt, \ @@ -13468,7 +13475,7 @@ convert_##TYPE1##_##TYPE2(const TYPE1 *s CONV_OVERFLOW(TYPE1, #TYPE2, src[i]); \ dst[i] = TYPE2##_nil; \ nils++; \ - } else if ((dst[i] = (TYPE2) src[i]) == TYPE2##_nil && \ + } else if ((dst[i] = (TYPE2) round##TYPE1(src[i])) == TYPE2##_nil && \ abort_on_error) \ CONV_OVERFLOW(TYPE1, #TYPE2, src[i]); \ } \ @@ -13575,6 +13582,9 @@ convertimpl_reduce_float(dbl, lng) #ifdef HAVE_HGE convertimpl_reduce_float(dbl, hge) #endif +#undef rounddbl +/* no rounding here */ +#define rounddbl(x)(x) convertimpl_reduce_float(dbl, flt) convertimpl_copy(dbl) diff --git a/geom/BugTracker/Tests/All b/geom/BugTracker/Tests/All --- a/geom/BugTracker/Tests/All +++ b/geom/BugTracker/Tests/All @@ -1,7 +1,7 @@ # tests related to bug reports: # .SF-[.] -HAVE_GEOM&THREADS=1?X_crash.SF-1971632 +HAVE_GEOM?X_crash.SF-1971632 HAVE_GEOM?copy_into_crash.SF-1975402 HAVE_GEOM?copy_into_mbr.3492 diff --git a/geom/BugTracker/Tests/X_crash.SF-1971632.sql b/geom/BugTracker/Tests/X_crash.SF-1971632.sql --- a/geom/BugTracker/Tests/X_crash.SF-1971632.sql +++ b/geom/BugTracker/Tests/X_crash.SF-1971632.sql @@ -1,3 +1,5 @@ +set optimizer = 'sequential_pipe'; -- to get predictable errors + CREATE TABLE geoms (id INTEGER, g GEOMETRY); INSERT INTO geoms values (1, 'POINT(10 10)'); INSERT INTO geo
MonetDB: default - Merge with Dec2016 branch.
Changeset: 03e7818da0ec for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=03e7818da0ec Added Files: sql/test/BugTracker-2017/Tests/too-large-decimals.Bug-6192.sql sql/test/BugTracker-2017/Tests/too-large-decimals.Bug-6192.stable.err sql/test/BugTracker-2017/Tests/too-large-decimals.Bug-6192.stable.out Modified Files: .hgignore monetdb5/mal/mal.h monetdb5/optimizer/opt_evaluate.c sql/backends/monet5/sql_cast_impl_down_from_int.h sql/test/BugTracker-2017/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 327 to 300 lines): diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -61,21 +61,10 @@ lex.yy.c *.lib # notwithstanding clients/odbc/winsetup/winredist/*.dll: *.dll -# ruby: -*.gem -# java: -*.jar -java/build -java/target -java/bin -java/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java -# python: -dist # other files we don't want TAGS tags -*.elc *.pyo *.rej *.orig @@ -99,11 +88,3 @@ NT/unistd.h # package building on Mac OS X MacOSX/build MacOSX/usr - -# Build directory -BUILD - -syntax: regexp -^java/build$ -syntax: regexp -^java/target$ diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h --- a/monetdb5/mal/mal.h +++ b/monetdb5/mal/mal.h @@ -163,7 +163,7 @@ typedef struct VARRECORD { */ typedef struct { - bit token; /* instruction type */ + bte token; /* instruction type */ bit barrier;/* flow of control modifier takes: BARRIER, LEAVE, REDO, EXIT, CATCH, RAISE */ bit typechk;/* type check status */ diff --git a/monetdb5/optimizer/opt_evaluate.c b/monetdb5/optimizer/opt_evaluate.c --- a/monetdb5/optimizer/opt_evaluate.c +++ b/monetdb5/optimizer/opt_evaluate.c @@ -164,7 +164,7 @@ OPTevaluateImplementation(Client cntxt, for (i = 1; i < limit && cntxt->mode != FINISHCLIENT; i++) { p = getInstrPtr(mb, i); // to avoid management of duplicate assignments over multiple blocks - // we limit ourselfs to evaluation of the first assignment only. + // we limit ourselves to evaluation of the first assignment only. use = assigned[getArg(p,0)] == 1 && !(p->argc == p->retc && blockExit(p)); for (k = p->retc; k < p->argc; k++) if (alias[getArg(p, k)]) diff --git a/sql/backends/monet5/sql_cast_impl_down_from_int.h b/sql/backends/monet5/sql_cast_impl_down_from_int.h --- a/sql/backends/monet5/sql_cast_impl_down_from_int.h +++ b/sql/backends/monet5/sql_cast_impl_down_from_int.h @@ -28,7 +28,7 @@ str FUN(,TP1,_dec2_,TP2) (TP2 *res, const int *s1, const TP1 *v) { int scale = *s1; - lng val = *v, h = 0; + TP1 val = *v, h = 0; /* shortcut nil */ if (*v == NIL(TP1)) { @@ -39,12 +39,17 @@ FUN(,TP1,_dec2_,TP2) (TP2 *res, const in if (scale) val = (val + h * scales[scale - 1]) / scales[scale]; /* see if the number fits in the data type */ - if (val > (lng) GDKmin(TP2) && val <= GDKmax(TP2) + if (val > (TP1) GDKmin(TP2) && val <= (TP1) GDKmax(TP2) ) { *res = (TP2) val; return MAL_SUCCEED; } else { - throw(SQL, "convert", "22003!value (" LLFMT ") exceeds limits of type "STRNG(TP2), val); + char *buf = NULL, *msg; + int len = 0; + BATatoms[TPE(TP1)].atomToStr(&buf, &len, &val); + msg = createException(SQL, "convert", "22003!value (%s) exceeds limits of type "STRNG(TP2), buf); + GDKfree(buf); + return msg; } } @@ -52,7 +57,7 @@ str FUN(,TP1,_dec2dec_,TP2) (TP2 *res, const int *S1, const TP1 *v, const int *d2, const int *S2) { int p = *d2, inlen = 1; - lng val = *v, cpyval = val, h = (val < 0) ? -5 : 5; + TP1 val = *v, cpyval = val, h = (val < 0) ? -5 : 5; int s1 = *S1, s2 = *S2; /* shortcut nil */ @@ -76,12 +81,17 @@ FUN(,TP1,_dec2dec_,TP2) (TP2 *res, const val = (val + h * scales[s1 - s2 - 1]) / scales[s1 - s2]; /* see if the number fits in the data type */ - if (val > (lng) GDKmin(TP2) && val <= GDKmax(TP2) + if (val > (TP1) GDKmin(TP2) && val <= (TP1) GDKmax(TP2) ) { *res = (TP2) val; return MAL_SUCCEED; } else { - throw(SQL, "convert", "22003!value (" LLFMT ") exceeds limits of type "STRNG(TP2), val); + char *buf = NULL, *msg; + int len = 0; + BATatoms[TPE(TP1)].atomToStr(&buf, &len, &val); + msg = createException(SQL, "convert", "22003!value (%s) exceeds limits of type "STR
MonetDB: default - Merge with Dec2016 branch.
Changeset: 1a922c962466 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1a922c962466 Added Files: sql/backends/monet5/Tests/pyapi33.sql sql/backends/monet5/Tests/pyapi33.stable.err sql/backends/monet5/Tests/pyapi33.stable.out Modified Files: gdk/gdk_storage.c sql/backends/monet5/Tests/All sql/backends/monet5/UDF/pyapi/pyapi.c sql/server/rel_select.c tools/merovingian/daemon/controlrunner.c Branch: default Log Message: Merge with Dec2016 branch. diffs (250 lines): diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -637,6 +637,7 @@ DESCclean(BAT *b) #define MSYNC_BACKGROUND #ifndef DISABLE_MSYNC +#ifndef MS_ASYNC struct msync { bat id; Heap *h; @@ -646,26 +647,24 @@ static void BATmsyncImplementation(void *arg) { Heap *h = ((struct msync *) arg)->h; - char *adr; - size_t len; - size_t offset; - adr = h->base; - offset = ((size_t) adr % MT_pagesize()); - len = MT_pagesize() * (1 + ((h->base + h->free - adr) / MT_pagesize())); - if (offset) - adr -= MT_pagesize() - offset; - if (len) - (void) MT_msync(adr, len); + (void) MT_msync(h->base, h->size); BBPunfix(((struct msync *) arg)->id); GDKfree(arg); } #endif +#endif void BATmsync(BAT *b) { #ifndef DISABLE_MSYNC +#ifdef MS_ASYNC + if (b->theap.storage == STORE_MMAP) + (void) msync(b->theap.base, b->theap.free, MS_ASYNC); + if (b->tvheap && b->tvheap->storage == STORE_MMAP) + (void) msync(b->tvheap->base, b->tvheap->free, MS_ASYNC); +#else #ifdef MSYNC_BACKGROUND MT_Id tid; #endif @@ -703,6 +702,7 @@ BATmsync(BAT *b) BATmsyncImplementation(arg); #endif } +#endif #else (void) b; #endif /* DISABLE_MSYNC */ 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 @@ -52,6 +52,7 @@ HAVE_LIBPY?pyapi28 HAVE_LIBPY?pyapi29 HAVE_LIBPY?pyapi30 HAVE_LIBPY?pyapi32 +HAVE_LIBPY?pyapi33 HAVE_LIBPY?pyloader01 HAVE_LIBPY?pyloader02 diff --git a/sql/backends/monet5/Tests/pyapi33.sql b/sql/backends/monet5/Tests/pyapi33.sql new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/Tests/pyapi33.sql @@ -0,0 +1,8 @@ + +START TRANSACTION; + +CREATE FUNCTION pyapi33() RETURNS STRING LANGUAGE PYTHON { return 'hello'; }; + +SELECT pyapi33(); + +ROLLBACK; diff --git a/sql/backends/monet5/Tests/pyapi33.stable.err b/sql/backends/monet5/Tests/pyapi33.stable.err new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/Tests/pyapi33.stable.err @@ -0,0 +1,35 @@ +stderr of test 'pyapi33` in directory 'sql/backends/monet5` itself: + + +# 14:44:15 > +# 14:44:15 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=34589" "--set" "mapi_usock=/var/tmp/mtest-6105/.s.monetdb.34589" "--set" "monet_prompt=" "--forcemito" "--dbpath=/Users/myth/opt/var/MonetDB/mTests_sql_backends_monet5" "--set" "embedded_py=true" +# 14:44:15 > + +# builtin opt gdk_dbpath = /Users/myth/opt/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 = 34589 +# cmdline opt mapi_usock = /var/tmp/mtest-6105/.s.monetdb.34589 +# cmdline opt monet_prompt = +# cmdline opt gdk_dbpath = /Users/myth/opt/var/MonetDB/mTests_sql_backends_monet5 +# cmdline opt embedded_py = true +# cmdline opt gdk_debug = 536870922 + +# 14:44:15 > +# 14:44:15 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-6105" "--port=34589" +# 14:44:15 > + + +# 14:44:16 > +# 14:44:16 > "Done." +# 14:44:16 > + diff --git a/sql/backends/monet5/Tests/pyapi33.stable.out b/sql/backends/monet5/Tests/pyapi33.stable.out new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/Tests/pyapi33.stable.out @@ -0,0 +1,75 @@ +stdout of test 'pyapi33` in directory 'sql/backends/monet5` itself: + + +# 14:44:15 > +# 14:44:15 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=34589" "--set" "mapi_usock=/var/tmp/mtest-6105/.s.monetdb.34589" "--set" "monet_prompt=" "--forcemito" "--dbpath=/Users/myth/opt/var/MonetDB/mTests_sql_backends_monet5" "--set" "embedded_py=true" +# 14:44:15 > + +# MonetDB 5 server v11.25.6 +# This is an unreleased version +# Serving database 'mTests_sql_backends_monet5', using 4 threads +# Compiled for x86_64-apple-darwin15.6.0/64bit with 128bit integers +# Found 8.000 GiB available main
MonetDB: default - Merge with Dec2016 branch.
Changeset: 241249759ced for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=241249759ced Modified Files: gdk/gdk_unique.c sql/backends/monet5/sql_result.c sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.sql Branch: default Log Message: Merge with Dec2016 branch. diffs (64 lines): diff --git a/gdk/gdk_unique.c b/gdk/gdk_unique.c --- a/gdk/gdk_unique.c +++ b/gdk/gdk_unique.c @@ -172,7 +172,7 @@ BATunique(BAT *b, BAT *s) s ? BATgetId(s) : "NULL", s ? BATcount(s) : 0); assert(vars == NULL); - seen = GDKzalloc(256 / 16); + seen = GDKzalloc((256 / 16) * sizeof(seen[0])); if (seen == NULL) goto bunins_failed; for (;;) { @@ -209,7 +209,7 @@ BATunique(BAT *b, BAT *s) s ? BATgetId(s) : "NULL", s ? BATcount(s) : 0); assert(vars == NULL); - seen = GDKzalloc(65536 / 16); + seen = GDKzalloc((65536 / 16) * sizeof(seen[0])); if (seen == NULL) goto bunins_failed; for (;;) { diff --git a/sql/backends/monet5/sql_result.c b/sql/backends/monet5/sql_result.c --- a/sql/backends/monet5/sql_result.c +++ b/sql/backends/monet5/sql_result.c @@ -1758,21 +1758,16 @@ mvc_export_head(backend *b, stream *s, i for (i = 0; i < t->nr_cols; i++) { res_col *c = t->cols + i; - if (strchr(c->name, ',') || strchr(c->name, ' ') || strchr(c->name , '\t') || strchr(c->name, '#')) { + if (strpbrk(c->name, ", \t#\"\\")) { + char *p; if (mnstr_write(s, "\"", 1, 1) != 1) return -1; - if (strchr(c->name, '"')) { - char *p; - for (p = c->name; *p; p++) { - if (*p == '"') { - if (mnstr_write(s, "\\", 1, 1) != 1) - return -1; - } - if (mnstr_write(s, p, 1, 1) != 1) + for (p = c->name; *p; p++) { + if (*p == '"' || *p == '\\') { + if (mnstr_write(s, "\\", 1, 1) != 1) return -1; } - } else { - if (mnstr_write(s, c->name, strlen(c->name), 1) != 1) + if (mnstr_write(s, p, 1, 1) != 1) return -1; } if (mnstr_write(s, "\"", 1, 1) != 1) diff --git a/sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.sql b/sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.sql --- a/sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.sql +++ b/sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.sql @@ -3,7 +3,7 @@ set optimizer='sequential_pipe'; start transaction; --- only explain output because not like's give to many rows. +-- only explain output because not like's give too many rows. explain select name,func from functions where name like '%optimizers%'; explain select name,func from functions where name not like '%optimizers%'; explain select name,func from functions where name ilike '%optimizers%'; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 613edeb4a419 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=613edeb4a419 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 2b220f90b233 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2b220f90b233 Added Files: debian/libmonetdb13.install Removed Files: debian/libmonetdb14.install Modified Files: .hgtags MonetDB.spec debian/changelog debian/control libversions Branch: default Log Message: Merge with Dec2016 branch. diffs (111 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -647,3 +647,5 @@ deeebb69952f76e3377664bb97997885b283f9d1 afc859894553ef804cded49a83b035d9d2cda73b Dec2016_3 ea0fe76e0095771bccca626b39e3e839a90ba320 Dec2016_release afc859894553ef804cded49a83b035d9d2cda73b Dec2016_release +bf4b58d202645774b75c7f508c84b30e3be78a49 Dec2016_5 +bf4b58d202645774b75c7f508c84b30e3be78a49 Dec2016_SP1_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -124,7 +124,7 @@ Vendor: MonetDB BV Group: Applications/Databases License: MPLv2.0 URL: http://www.monetdb.org/ -Source: http://dev.monetdb.org/downloads/sources/Dec2016/%{name}-%{version}.tar.bz2 +Source: http://dev.monetdb.org/downloads/sources/Dec2016-SP1/%{name}-%{version}.tar.bz2 # we need systemd for the _unitdir macro to exist %if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7 @@ -957,6 +957,21 @@ rm -f %{buildroot}%{_bindir}/Maddlog %postun -p /sbin/ldconfig %changelog +* Fri Jan 13 2017 Panagiotis Koutsourakis - 11.25.5-20170113 +- Rebuilt. +- BZ#4039: Slow mserver5 start after drop of tables (> 1 hour) +- BZ#4048: Segfault on vacuum with parallel updates +- BZ#6079: pushselect optimizer bug on MAL snippet +- BZ#6140: INNER JOIN gives the results of a CROSS JOIN +- BZ#6150: Query giving wrong results, extra records are appearing +- BZ#6175: The program can't start because python27.dll is missing from + your computer. +- BZ#6178: AVG + GROUP BY returns NULL for some records that should + have results +- BZ#6179: mergetable optimizer messes up sample +- BZ#6182: sys.shutdown triggers assertion in clients.c +- BZ#6184: Incorrect result set - Extra records in result set + * Sat Dec 17 2016 Sjoerd Mullender - 11.25.3-20161217 - Rebuilt. diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +monetdb (11.25.5) unstable; urgency=low + + * Rebuilt. + * BZ#4039: Slow mserver5 start after drop of tables (> 1 hour) + * BZ#4048: Segfault on vacuum with parallel updates + * BZ#6079: pushselect optimizer bug on MAL snippet + * BZ#6140: INNER JOIN gives the results of a CROSS JOIN + * BZ#6150: Query giving wrong results, extra records are appearing + * BZ#6175: The program can't start because python27.dll is missing from +your computer. + * BZ#6178: AVG + GROUP BY returns NULL for some records that should +have results + * BZ#6179: mergetable optimizer messes up sample + * BZ#6182: sys.shutdown triggers assertion in clients.c + * BZ#6184: Incorrect result set - Extra records in result set + + -- Panagiotis Koutsourakis Fri, 13 Jan 2017 11:15:52 +0100 + monetdb (11.25.3) unstable; urgency=low * Rebuilt. diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -13,7 +13,7 @@ Build-Depends: debhelper (>= 5), autotoo Standards-Version: 3.8.0 X-Python-Version: >= 2.6 -Package: libmonetdb14 +Package: libmonetdb13 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: libmonetdb5-server-geom (<< ${source:Version}) @@ -32,7 +32,7 @@ Description: MonetDB core library Package: libmonetdb-dev Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libatomic-ops-dev, - libmonetdb14, libmonetdb-stream-dev + libmonetdb13, libmonetdb-stream-dev Description: MonetDB development files MonetDB is a database management system that is developed from a main-memory perspective with use of a fully decomposed storage model, diff --git a/debian/libmonetdb14.install b/debian/libmonetdb13.install rename from debian/libmonetdb14.install rename to debian/libmonetdb13.install diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -36,13 +36,13 @@ # version of the GDK library (subdirectory gdk; also includes # common/options and common/utils) -GDK_VERSION=14:1:0 +GDK_VERSION=14:1:1 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=8:1:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras) -MONETDB5_VERSION=22:0:0 +MONETDB5_VERSION=22:0:1 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=9:0:1 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 5f58c827036a for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5f58c827036a Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 933363b389f7 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=933363b389f7 Added Files: sql/test/BugTracker-2017/Tests/all_dates.csv.gz sql/test/BugTracker-2017/Tests/empty-interval.Bug-6184.sql sql/test/BugTracker-2017/Tests/empty-interval.Bug-6184.stable.err sql/test/BugTracker-2017/Tests/empty-interval.Bug-6184.stable.out sql/test/BugTracker-2017/Tests/heapextend.Bug-6134.sql.in Modified Files: gdk/gdk_cross.c gdk/gdk_select.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_statement.c sql/storage/bat/bat_table.c sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.out sql/test/BugTracker-2016/Tests/decimal_vs_integer.Bug-3941.stable.out sql/test/BugTracker-2017/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 2363 to 300 lines): diff --git a/gdk/gdk_cross.c b/gdk/gdk_cross.c --- a/gdk/gdk_cross.c +++ b/gdk/gdk_cross.c @@ -9,49 +9,7 @@ #include "monetdb_config.h" #include "gdk.h" #include "gdk_private.h" - -static gdk_return -BATcross1(BAT **r1p, BAT **r2p, BAT *l, BAT *r) -{ - BAT *bn1, *bn2; - BUN i, j; - oid *restrict p1, *restrict p2; - - bn1 = COLnew(0, TYPE_oid, BATcount(l) * BATcount(r), TRANSIENT); - bn2 = COLnew(0, TYPE_oid, BATcount(l) * BATcount(r), TRANSIENT); - if (bn1 == NULL || bn2 == NULL) { - BBPreclaim(bn1); - BBPreclaim(bn2); - return GDK_FAIL; - } - p1 = (oid *) Tloc(bn1, 0); - p2 = (oid *) Tloc(bn2, 0); - for (i = 0; i < BATcount(l); i++) { - for (j = 0; j < BATcount(r); j++) { - *p1++ = i + l->hseqbase; - *p2++ = j + r->hseqbase; - } - } - BATsetcount(bn1, BATcount(l) * BATcount(r)); - BATsetcount(bn2, BATcount(l) * BATcount(r)); - bn1->tsorted = 1; - bn1->trevsorted = BATcount(l) <= 1; - bn1->tkey = BATcount(r) <= 1; - bn1->tdense = bn1->tkey != 0; - bn1->tnil = 0; - bn1->tnonil = 1; - bn2->tsorted = BATcount(l) <= 1; - bn2->trevsorted = BATcount(bn2) <= 1; - bn2->tkey = BATcount(l) <= 1; - bn2->tdense = bn2->tkey != 0; - bn2->tnil = 0; - bn2->tnonil = 1; - BATtseqbase(bn1, l->hseqbase); - BATtseqbase(bn2, r->hseqbase); - *r1p = bn1; - *r2p = bn2; - return GDK_SUCCEED; -} +#include "gdk_cand.h" /* Calculate a cross product between bats l and r with optional * candidate lists sl for l and sr for r. @@ -60,28 +18,75 @@ BATcross1(BAT **r1p, BAT **r2p, BAT *l, gdk_return BATsubcross(BAT **r1p, BAT **r2p, BAT *l, BAT *r, BAT *sl, BAT *sr) { - BAT *bn1, *bn2, *t; + BAT *bn1, *bn2; + BUN start1, start2; + BUN end1, end2; + BUN cnt1, cnt2; + const oid *restrict lcand, *restrict rcand; + const oid *lcandend, *rcandend; + oid seq; + oid *restrict p; + BUN i, j; - if (BATcross1(&bn1, &bn2, sl ? sl : l, sr ? sr : r) != GDK_SUCCEED) + CANDINIT(l, sl, start1, end1, cnt1, lcand, lcandend); + CANDINIT(r, sr, start2, end2, cnt2, rcand, rcandend); + if (lcand) + cnt1 = lcandend - lcand; + if (rcand) + cnt2 = rcandend - rcand; + + bn1 = COLnew(0, TYPE_oid, cnt1 * cnt2, TRANSIENT); + if (bn1 == NULL) return GDK_FAIL; - if (sl) { - t = BATproject(bn1, sl); - BBPunfix(bn1->batCacheid); - if (t == NULL) { - BBPunfix(bn2->batCacheid); - return GDK_FAIL; - } - bn1 = t; + BATsetcount(bn1, cnt1 * cnt2); + bn1->tsorted = 1; + bn1->trevsorted = cnt1 <= 1; + bn1->tkey = cnt2 <= 1; + bn1->tnil = 0; + bn1->tnonil = 1; + p = (oid *) Tloc(bn1, 0); + if (lcand) { + for (i = 0; i < cnt1; i++) + for (j = 0; j < cnt2; j++) + *p++ = lcand[i]; + bn1->tdense = 0; + } else { + seq = l->hseqbase + start1; + for (i = 0; i < cnt1; i++) + for (j = 0; j < cnt2; j++) + *p++ = i + seq; + bn1->tdense = bn1->tkey != 0; + if (bn1->tdense) + BATtseqbase(bn1, seq); } - if (sr) { - t = BATproject(bn2, sr); - BBPunfix(bn2->batCacheid); - if (t == NULL) { - BBPunfix(bn1->batCacheid); - return GDK_FAIL; - } - bn2 = t; + + bn2 = COLnew(0, TYPE_oid, cnt1 * cnt2, TRANSIENT); + if (bn2 == NULL) { +
MonetDB: default - Merge with Dec2016 branch.
Changeset: cab6171bd6f4 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cab6171bd6f4 Modified Files: gdk/gdk_batop.c gdk/gdk_hash.c gdk/gdk_imprints.c gdk/gdk_join.c gdk/gdk_orderidx.c gdk/gdk_project.c Branch: default Log Message: Merge with Dec2016 branch. diffs (237 lines): diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -1065,7 +1065,9 @@ BATkeyed(BAT *b) int BATordered(BAT *b) { - lng t0 = GDKusec(); + lng t0 = 0; + + ALGODEBUG t0 = GDKusec(); if (b->ttype == TYPE_void) return 1; @@ -1151,7 +1153,9 @@ BATordered(BAT *b) int BATordered_rev(BAT *b) { - lng t0 = GDKusec(); + lng t0 = 0; + + ALGODEBUG t0 = GDKusec(); if (b == NULL) return 0; diff --git a/gdk/gdk_hash.c b/gdk/gdk_hash.c --- a/gdk/gdk_hash.c +++ b/gdk/gdk_hash.c @@ -193,11 +193,11 @@ int BATcheckhash(BAT *b) { int ret; - lng t; + lng t = 0; - t = GDKusec(); + ALGODEBUG t = GDKusec(); MT_lock_set(&GDKhashLock(b->batCacheid)); - t = GDKusec() - t; + ALGODEBUG t = GDKusec() - t; if (b->thash == (Hash *) 1) { Hash *h; Heap *hp; @@ -285,9 +285,11 @@ BAThashsync(void *arg) struct hashsync *hs = arg; Heap *hp = hs->hp; int fd; - lng t0 = GDKusec(); + lng t0 = 0; const char *failed = " failed"; + ALGODEBUG t0 = GDKusec(); + if (HEAPsave(hp, hp->filename, NULL) == GDK_SUCCEED && (fd = GDKfdlocate(hp->farmid, hp->filename, "rb+", NULL)) >= 0) { ((size_t *) hp->base)[0] |= 1 << 24; @@ -391,7 +393,7 @@ BAThash(BAT *b, BUN masksize) p = q; } - t0 = GDKusec(); + ALGODEBUG t0 = GDKusec(); do { BUN nslots = mask >> 3; /* 1/8 full is too full */ @@ -519,9 +521,11 @@ BAThash(BAT *b, BUN masksize) ALGODEBUG fprintf(stderr, "#BAThash: NOT persisting hash %d\n", b->batCacheid); #endif b->thash = h; - t1 = GDKusec(); - ALGODEBUG fprintf(stderr, "#BAThash: hash construction " LLFMT " usec\n", t1 - t0); - ALGODEBUG HASHcollisions(b, b->thash); + ALGODEBUG { + t1 = GDKusec(); + fprintf(stderr, "#BAThash: hash construction " LLFMT " usec\n", t1 - t0); + HASHcollisions(b, b->thash); + } } MT_lock_unset(&GDKhashLock(b->batCacheid)); return GDK_SUCCEED; diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c --- a/gdk/gdk_imprints.c +++ b/gdk/gdk_imprints.c @@ -279,7 +279,7 @@ BATimprints(BAT *b) { BAT *o = NULL, *s1 = NULL, *s2 = NULL, *s3 = NULL, *s4 = NULL; Imprints *imprints; - lng t0 = 0, t1 = 0; + lng t0 = 0; /* we only create imprints for types that look like types we know */ switch (ATOMbasetype(b->ttype)) { @@ -316,7 +316,7 @@ BATimprints(BAT *b) assert(b->timprints == NULL); } MT_lock_set(&GDKimprintsLock(b->batCacheid)); - t0 = GDKusec(); + ALGODEBUG t0 = GDKusec(); if (b->timprints == NULL) { BUN cnt; str nme = BBP_physical(b->batCacheid); @@ -496,8 +496,7 @@ BATimprints(BAT *b) b->timprints = imprints; } - t1 = GDKusec(); - ALGODEBUG fprintf(stderr, "#BATimprints: imprints construction " LLFMT " usec\n", t1 - t0); + ALGODEBUG fprintf(stderr, "#BATimprints: imprints construction " LLFMT " usec\n", GDKusec() - t0); MT_lock_unset(&GDKimprintsLock(b->batCacheid)); /* BBPUnfix tries to get the imprints lock which might lead to a deadlock diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c --- a/gdk/gdk_join.c +++ b/gdk/gdk_join.c @@ -3821,7 +3821,8 @@ gdk_return BATleftjoin(BAT **r1p, BAT **r2p, BAT *l, BAT *r, BAT *sl, BAT *sr, int nil_matches, BUN estimate) { return subleftjoin(r1p, r2p, l, r, sl, sr, nil_matches, - 0, 0, 0, estimate, "BATleftjoin", GDKusec()); + 0, 0, 0, estimate, "BATleftjoin", + GDKdebug & ALGOMASK ? GDKusec() : 0); } /* Performs a left outer join over l and r. Returns two new, aligned, @@ -3833,7 +3834,8 @@ gdk_return BATouterjoin(BAT **r1p, BAT **r2p, BAT *l, BAT *r, BAT *sl, BAT *sr, int nil_matches, BUN estimate) { return subleftjoin(r1p, r2p, l, r, sl, sr, nil_matches, - 1, 0, 0, estimate, "BATouterjoin", GDKusec()); + 1, 0, 0, estimate, "BATouterjoin", + GDKdebug & ALGOMASK ? GDKusec() : 0); } /* Perform a semi-join over l and r. Returns two new, aligned, @@ -3844,
MonetDB: default - Merge with Dec2016 branch.
Changeset: c9b2bbc3e0c1 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c9b2bbc3e0c1 Added Files: sql/test/BugTracker-2017/Tests/semijoinunion.Bug-6150.sql sql/test/BugTracker-2017/Tests/semijoinunion.Bug-6150.stable.err sql/test/BugTracker-2017/Tests/semijoinunion.Bug-6150.stable.out Modified Files: sql/server/rel_optimizer.c sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out sql/test/BugTracker-2017/Tests/All sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.out sql/test/testdb/Tests/testdb-dump.stable.out.Windows Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 1213 to 300 lines): diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -4354,6 +4354,8 @@ rel_push_join_down_union(int *changes, m je && !find_prop(je->p, PROP_JOINIDX) && /* FKEY JOIN */ !rel_is_join_on_pkey(rel))) /* aligned PKEY JOIN */ return rel; + if (is_semi(rel->op) && is_union(l->op) && je && !find_prop(je->p, PROP_JOINIDX)) + return rel; ol->subquery = or->subquery = 0; if ((is_union(l->op) && !need_distinct(l)) && !is_union(r->op)){ 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 @@ -1,2 +1,3 @@ shutdown.Bug-6182 avggroupbysq.Bug-6178 +semijoinunion.Bug-6150 diff --git a/sql/test/BugTracker-2017/Tests/semijoinunion.Bug-6150.sql b/sql/test/BugTracker-2017/Tests/semijoinunion.Bug-6150.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2017/Tests/semijoinunion.Bug-6150.sql @@ -0,0 +1,1056 @@ +CREATE TABLE "test_join_right_table" ("r_c" VARCHAR(255), "d" VARCHAR(255)); + +INSERT INTO "test_join_right_table"("r_c", "d") values ('c1', 'd1'); +INSERT INTO "test_join_right_table"("r_c", "d") values ('c2', 'd2'); +INSERT INTO "test_join_right_table"("r_c", "d") values ('c5', 'd3'); +INSERT INTO "test_join_right_table"("r_c", "d") values (null, 'd4'); + +CREATE TABLE lineitem_denormalized_first1k +( + customer_gender char(1), + customer_region varchar(15) NOT NULL, + customer_country varchar(40) NOT NULL, + customer_state varchar(40), + customer_city varchar(50) NOT NULL, + customer_date_of_birth date, + customer_id integer NOT NULL, + product_family varchar(20) NOT NULL, + product_category varchar(30) NOT NULL, + product_subcategory varchar(30) NOT NULL, + product_name varchar(50) NOT NULL, + product_id integer NOT NULL, + store_id integer NOT NULL, + store_longitude decimal(12, 8) NOT NULL, + store_latitude decimal(12, 8) NOT NULL, + store_name varchar(50) NOT NULL, + store_manager varchar(50) NOT NULL, + store_phone_number varchar(20) NOT NULL, + store_region varchar(15) NOT NULL, + store_country varchar(40) NOT NULL, + store_state varchar(40), + store_city varchar(50) NOT NULL, + order_date date NOT NULL, + year_begin_date date, + quarter_begin_date date, + month_begin_date date, + mm integer, + mmdd integer, + ddmon varchar(9), + line_price decimal(12, 2) NOT NULL, + line_cost decimal(12, 2) NOT NULL, + line_margin decimal(13, 2) NOT NULL, + line_margin_percent decimal(12,8) NOT NULL +); + +copy 1000 records into lineitem_denormalized_first1k from stdin using delimiters ',','\n','\"'; +F,APAC,People's Republic of China,Sichuan,Yibin,1957-09-19,99425,Non-consumables,Clothing,Clothing,Croft & Barrow Velour Separates,1757,30,-3.2000,55.9500,"Edinburgh, United Kingdom",Melody J. Hambard,+44-875-777-1712,EUROPE,United Kingdom,Scotland,Edinburgh,2010-11-03,2010-01-01,2010-10-01,2010-11-01,201011,20101103,03NOV2010,482.70,354.87,127.83,26.482 +F,APAC,People's Republic of China,Sichuan,Yibin,1957-09-19,99425,Non-consumables,Clothing,Clothing,Men's Beanies,2951,30,-3.2000,55.9500,"Edinburgh, United Kingdom",Melody J. Hambard,+44-875-777-1712,EUROPE,United Kingdom,Scotland,Edinburgh,2010-11-03,2010-01-01,2010-10-01,2010-11-01,201011,20101103,03NOV2010,260.20,72.76,187.44,72.036 +F,APAC,People's Republic of China,Sichuan,Yibin,1957-09-19,99425,Non-consumables,Clothing,Clothing,Smartwool Ski Socks,3502,30,-3.2000,55.9500,"Edinburgh, United Kingdom",Melody J. Hambard,+44-875-777-1712,EUROPE,United Kingdom,Scotland,Edinburgh,2010-11-03,2010-01-01,2010-10-01,2010-11-01,201011,20101103,03NOV2010,384.87,287.16,97.71,25.387 +F,APAC,People's Republic of China,Sichuan,Yibin,1957-09-19,99425,Non-consumables,Electronics,Digital media,HP 8GB USB Flash Drive,4154,30,-3.2000,55.9500,"Edinburgh, United Kingdom",Melody J. Hambard,+44-875-777-1712,EUROPE,United Kingdom,Scotland,Edinburgh,2010-11-03,2010-01-01,2010-10-01,2010-11-0
MonetDB: default - Merge with Dec2016 branch.
Changeset: 799df9dace25 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=799df9dace25 Modified Files: gdk/gdk_system.c Branch: default Log Message: Merge with Dec2016 branch. diffs (12 lines): diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c --- a/gdk/gdk_system.c +++ b/gdk/gdk_system.c @@ -898,8 +898,6 @@ GDKusec(void) #ifdef HAVE_CLOCK_GETTIME #if defined(CLOCK_UPTIME_FAST) #define CLK_ID CLOCK_UPTIME_FAST /* FreeBSD */ -#elif defined(CLOCK_MONOTONIC_COARSE) -#define CLK_ID CLOCK_MONOTONIC_COARSE /* Linux >= 2.6.32 */ #else #define CLK_ID CLOCK_MONOTONIC /* Posix (fallback) */ #endif ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 3c8b4c3417e6 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3c8b4c3417e6 Modified Files: configure.ag gdk/gdk_system.c testing/Mtest.py.in Branch: default Log Message: Merge with Dec2016 branch. diffs (88 lines): diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -2561,6 +2561,7 @@ AC_CHECK_FUNCS([\ asctime_r \ backtrace \ cbrt \ + clock_gettime \ ctime_r \ fabsf \ fallocate \ diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c --- a/gdk/gdk_system.c +++ b/gdk/gdk_system.c @@ -895,16 +895,36 @@ GDKusec(void) return (lng) (((ctr.QuadPart - start.QuadPart) * 100) / freq.QuadPart); } #endif +#ifdef HAVE_CLOCK_GETTIME +#if defined(CLOCK_UPTIME_FAST) +#define CLK_ID CLOCK_UPTIME_FAST /* FreeBSD */ +#elif defined(CLOCK_MONOTONIC_COARSE) +#define CLK_ID CLOCK_MONOTONIC_COARSE /* Linux >= 2.6.32 */ +#else +#define CLK_ID CLOCK_MONOTONIC /* Posix (fallback) */ +#endif + { + static struct timespec tsbase; + struct timespec ts; + if (tsbase.tv_sec == 0) { + clock_gettime(CLK_ID, &tsbase); + return tsbase.tv_nsec / 1000; + } + if (clock_gettime(CLK_ID, &ts) == 0) + return (ts.tv_sec - tsbase.tv_sec) * 100 + ts.tv_nsec / 1000; + } +#endif #ifdef HAVE_GETTIMEOFDAY { static struct timeval tpbase; /* automatically initialized to 0 */ struct timeval tp; - if (tpbase.tv_sec == 0) + if (tpbase.tv_sec == 0) { gettimeofday(&tpbase, NULL); + return (lng) tpbase.tv_usec; + } gettimeofday(&tp, NULL); - tp.tv_sec -= tpbase.tv_sec; - return (lng) tp.tv_sec * 100 + (lng) tp.tv_usec; + return (lng) (tp.tv_sec - tpbase.tv_sec) * 100 + (lng) tp.tv_usec; } #else #ifdef HAVE_FTIME @@ -912,11 +932,12 @@ GDKusec(void) static struct timeb tbbase; /* automatically initialized to 0 */ struct timeb tb; - if (tbbase.time == 0) + if (tbbase.time == 0) { ftime(&tbbase); + return (lng) tbbase.millitm * 1000; + } ftime(&tb); - tb.time -= tbbase.time; - return (lng) tb.time * 100 + (lng) tb.millitm * 1000; + return (lng) (tb.time - tbbase.time) * 100 + (lng) tb.millitm * 1000; } #endif #endif diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -3126,14 +3126,6 @@ def Check(command, input) : STDERR.write("\n") STDERR.flush() #sys.exit(1) -if sys.platform == 'linux2': -proc = process.Popen(['netstat', '-ap'], - stdout = process.PIPE, - stderr = process.PIPE, - universal_newlines = True) -out, err = proc.communicate() -STDERR.write(err) -STDOUT.write(out) if noErr: STDOUT.flush() STDERR.writelines(noErr) ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 918e014c9388 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=918e014c9388 Added Files: sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.sql sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.err sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.out Modified Files: sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.stable.out sql/backends/monet5/UDF/pyapi/type_conversion.c sql/backends/monet5/UDF/pyapi/unicode.c sql/backends/monet5/UDF/pyapi/unicode.h sql/test/sys-schema/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 985 to 300 lines): diff --git a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.stable.out b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.stable.out --- a/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.stable.out +++ b/sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.stable.out @@ -180,8 +180,8 @@ Ready. #--# [ 0@0, 18042.895 ] [ 1@0, 846.9309] -[ 2@0, 16.816929 ] -[ 3@0, 1714637 ] +[ 2@0, 16.816927 ] +[ 3@0, 1714636.9 ] [ 4@0, nil ] #io.print(rstr); #--# diff --git a/sql/backends/monet5/UDF/pyapi/type_conversion.c b/sql/backends/monet5/UDF/pyapi/type_conversion.c --- a/sql/backends/monet5/UDF/pyapi/type_conversion.c +++ b/sql/backends/monet5/UDF/pyapi/type_conversion.c @@ -24,7 +24,7 @@ bool string_copy(char * source, char* de for(i = 0; i < max_size; i++) { dest[i] = source[i]; if (dest[i] == 0) return TRUE; -if (!allow_unicode && (*(unsigned char*)&source[i]) >= 128) return FALSE; +if (!allow_unicode && source[i] & 0x80) return FALSE; } dest[max_size] = '\0'; return TRUE; @@ -33,40 +33,9 @@ bool string_copy(char * source, char* de #ifdef HAVE_HGE int hge_to_string(char * str, hge x) { -int i = 0; -size_t size = 1; -hge cpy = x > 0 ? x : -x; -while(cpy > 0) { -cpy /= 10; -size++; -} -if (x < 0) size++; -if (x < 0) -{ -x *= -1; -str[0] = '-'; -} -str[size - 1] = '\0'; -i = size - 1; -while(x > 0) -{ -int v = x % 10; -i--; -if (i < 0) return FALSE; -if (v == 0) str[i] = '0'; -else if (v == 1) str[i] = '1'; -else if (v == 2) str[i] = '2'; -else if (v == 3) str[i] = '3'; -else if (v == 4) str[i] = '4'; -else if (v == 5) str[i] = '5'; -else if (v == 6) str[i] = '6'; -else if (v == 7) str[i] = '7'; -else if (v == 8) str[i] = '8'; -else if (v == 9) str[i] = '9'; -x = x / 10; -} - -return TRUE; + int len = 256; /* assume str is large enough */ + hgeToStr(&str, &len, &x); + return TRUE; } PyObject *PyLong_FromHge(hge h) @@ -173,85 +142,121 @@ wrapup: return msg; } +#define STRING_TO_NUMBER_FACTORY(tpe) \ +str str_to_##tpe(char *ptr, size_t maxsize, tpe *value) \ +{ \ + int len = sizeof(tpe); \ + char buf[256]; \ + if (maxsize > 0) { \ + if (maxsize >= sizeof(buf)) \ + maxsize = sizeof(buf) - 1; \ + strncpy(buf, ptr, maxsize); \ + buf[maxsize] = 0; \ + if (strlen(buf) >= sizeof(buf) - 1) \ + return GDKstrdup("string too long to convert."); \ + ptr = buf; \ + } \ + if (BATatoms[TYPE_##tpe].atomFromStr(ptr, &len, (void **) &value) == 0) \ + return GDKstrdup("Error converting string."); \ + return MAL_SUCCEED; \ +} + #ifndef IS_PY3K -#define PY_TO_(type, inttpe) \ -str pyobject_to_##type(PyObject **pyobj, size_t maxsize, type *value) \ -{ \ -PyObject *ptr = *pyobj; \ -str retval = MAL_SUCCEED; \ -(void) maxsize;
MonetDB: default - Merge with Dec2016 branch.
Changeset: 940183ddc2a0 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=940183ddc2a0 Added Files: README.rst Removed Files: README Modified Files: HowToStart.rst Makefile.ag monetdb5/extras/rapi/Tests/rapi08.malC sql/backends/monet5/vaults/bam/bam_wrapper.c sql/server/sql_parser.y Branch: default Log Message: Merge with Dec2016 branch. diffs (220 lines): diff --git a/HowToStart.rst b/HowToStart.rst --- a/HowToStart.rst +++ b/HowToStart.rst @@ -24,7 +24,7 @@ This document assumes that you are plann installing MonetDB on a Unix-like system (e.g., Linux, IRIX, Solaris, AIX, Mac OS X/Darwin, or CYGWIN). For compilation and installation on a native Windows system (NT, 2000, XP) see the instructions in the -file `../buildtools/doc/windowsbuild.rst`__. +file `buildtools/doc/windowsbuild.rst`__. __ http://dev.monetdb.org/downloads/ __ Windows-Installation.html diff --git a/Makefile.ag b/Makefile.ag --- a/Makefile.ag +++ b/Makefile.ag @@ -13,7 +13,7 @@ SUBDIRS = buildtools common clients \ HAVE_TESTING?testing \ EXTRA_DIST = bootstrap configure configure.ac configure.ag libversions \ -MonetDB.spec rpm.mk.in COPYING README license.txt HowToStart.rst +MonetDB.spec rpm.mk.in COPYING README.rst license.txt HowToStart.rst EXTRA_DIST_DIR = NT debian MacOSX diff --git a/README b/README deleted file mode 100644 --- a/README +++ /dev/null @@ -1,26 +0,0 @@ -The MonetDB Database System -=== - -The MonetDB database is developed by the CWI database research group -(see http://www.monetdb.org/). - -Via the MonetDB project we have brought the MonetDB system in open source, -where it is accessible at http://www.monetdb.org/Downloads/ - -The MonetDB database system is a high-performance database kernel for -query-intensive applications. The MonetDB kernel works together with an -SQL frontend that is in a separate CVS module. - -If you got a source distribution, please compile and install MonetDB first, -following the instructions in the file 'HowToStart.rst' (for Unix) -or 'buildtools/doc/windowsbuild.rst' (for Windows). - - -Copyright Notice - - -This Source Code Form is subject to the terms of the Mozilla Public -License, v. 2.0. If a copy of the MPL was not distributed with this -file, You can obtain one at http://mozilla.org/MPL/2.0/. - -Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. diff --git a/README.rst b/README.rst new file mode 100644 --- /dev/null +++ b/README.rst @@ -0,0 +1,34 @@ +The MonetDB Database System +=== + +The MonetDB database is developed by the CWI database research group +(see http://www.monetdb.org/). + +Via the MonetDB project we have brought the MonetDB system in open source, +where it is accessible at http://www.monetdb.org/Downloads/ + +The MonetDB database system is a high-performance database kernel for +query-intensive applications. The MonetDB source can be found at our `Mercurial +server`__. There is also a `github mirror`__ that is updated once a day. + +.. _MonetDB: http://dev.monetdb.org/hg/MonetDB/ +__ MonetDB_ + +.. _github: https://github.com/MonetDB/MonetDB +__ github_ + +If you got a source distribution, please compile and install MonetDB first, +following the instructions in the file `HowToStart.rst`__ (for Unix) +or `buildtools/doc/windowsbuild.rst`__ (for Windows). + +__ HowToStart.rst +__ buildtools/doc/windowsbuild.rst + +Copyright Notice + + +This Source Code Form is subject to the terms of the Mozilla Public +License, v. 2.0. If a copy of the MPL was not distributed with this +file, You can obtain one at http://mozilla.org/MPL/2.0/. + +Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. diff --git a/sql/backends/monet5/vaults/bam/bam_wrapper.c b/sql/backends/monet5/vaults/bam/bam_wrapper.c --- a/sql/backends/monet5/vaults/bam/bam_wrapper.c +++ b/sql/backends/monet5/vaults/bam/bam_wrapper.c @@ -1613,13 +1613,16 @@ bam1_t2alignment(bam_wrapper * bw, lng v a_out->cigar[1] = '\0'; } else { uint32_t *cigar_bin = bam1_cigar(a_in); + uint32_t c; int index = 0; for (i = 0; i < a_in->core.n_cigar; ++i) { + /* work around unaligned access */ + memcpy(&c, &cigar_bin[i], sizeof(c)); snprintf(&a_out->cigar[index], a_out->cigar_size - index, "%u%c", -cigar_bin[i] >> BAM_CIGAR_SHIFT, -bam_cigar_opchr(cigar_bin[i])); +c >> BAM_CIGAR_SHIFT, +bam_cigar_opchr(c)); index += strlen(&a_out->cigar[index]); } } @@ -1750,25 +1753,37 @@ write_aux_bam1_t(bam_wrapper * bw, bam1_
MonetDB: default - Merge with Dec2016 branch.
Changeset: a722eef5e949 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a722eef5e949 Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 monetdb5/modules/atoms/batxml.c monetdb5/modules/kernel/batcolor.c monetdb5/modules/kernel/batstr.c Branch: default Log Message: Merge with Dec2016 branch. diffs (50 lines): diff --git a/monetdb5/modules/atoms/batxml.c b/monetdb5/modules/atoms/batxml.c --- a/monetdb5/modules/atoms/batxml.c +++ b/monetdb5/modules/atoms/batxml.c @@ -13,10 +13,8 @@ * The collection of routines provided here are map operations * for the atom xml primitives. * - * In line with the batcalc module, we assume that - * if two bat operands are provided that they are already - * aligned on the head. Moreover, the head of the BATs - * are limited to :oid. + * In line with the batcalc module, we assume that if two bat operands + * are provided that they are aligned. * * The implementation is focussed on functionality. At a later stage * we may postpone string contstruction until it is really needed. diff --git a/monetdb5/modules/kernel/batcolor.c b/monetdb5/modules/kernel/batcolor.c --- a/monetdb5/modules/kernel/batcolor.c +++ b/monetdb5/modules/kernel/batcolor.c @@ -13,11 +13,8 @@ * The collection of routines provided here are map operations * for the color string primitives. * - * In line with the batcalc module, we assume that - * if two bat operands are provided that they are already - * aligned on the head. Moreover, the head of the BATs - * are limited to :oid, which can be cheaply realized using - * the GRPsplit operation. + * In line with the batcalc module, we assume that if two bat operands + * are provided that they are aligned. */ #include "monetdb_config.h" diff --git a/monetdb5/modules/kernel/batstr.c b/monetdb5/modules/kernel/batstr.c --- a/monetdb5/modules/kernel/batstr.c +++ b/monetdb5/modules/kernel/batstr.c @@ -13,11 +13,8 @@ * The collection of routines provided here are map operations * for the atom string primitives. * - * In line with the batcalc module, we assume that - * if two bat operands are provided that they are already - * aligned on the head. Moreover, the head of the BATs - * are limited to :void, which can be cheaply realized using - * the GRPsplit operation. + * In line with the batcalc module, we assume that if two bat operands + * are provided that they are aligned. */ #include "monetdb_config.h" #include ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 2eb35fb7f046 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2eb35fb7f046 Modified Files: monetdb5/mal/mal_module.c Branch: default Log Message: Merge with Dec2016 branch. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 32f47f6685cb for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=32f47f6685cb Removed Files: sql/test/BugTracker-2009/Tests/POWER_vs_prod.SF-2596114.sql sql/test/BugTracker-2009/Tests/POWER_vs_prod.SF-2596114.stable.err sql/test/BugTracker-2009/Tests/POWER_vs_prod.SF-2596114.stable.out Modified Files: monetdb5/mal/mal.c monetdb5/modules/atoms/inet.c sql/test/BugTracker-2009/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 515 to 300 lines): diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c --- a/monetdb5/mal/mal.c +++ b/monetdb5/mal/mal.c @@ -151,6 +151,7 @@ void mserver_reset(int exit) GDKfree(mal_clients->prompt); GDKfree(mal_clients->username); freeStack(mal_clients->glb); + freeSymbol(mal_clients->curprg); mal_client_reset(); mal_linker_reset(); mal_resource_reset(); diff --git a/monetdb5/modules/atoms/inet.c b/monetdb5/modules/atoms/inet.c --- a/monetdb5/modules/atoms/inet.c +++ b/monetdb5/modules/atoms/inet.c @@ -34,15 +34,30 @@ * */ typedef struct _inet { - unsigned char q1; - unsigned char q2; - unsigned char q3; - unsigned char q4; - unsigned char mask; - unsigned char filler1; - unsigned char filler2; - unsigned char isnil; + /* use a union to force alignment compatible with lng */ + union { + struct { + unsigned char _q1; + unsigned char _q2; + unsigned char _q3; + unsigned char _q4; + unsigned char _mask; + unsigned char _filler1; + unsigned char _filler2; + unsigned char _isnil; + } s; + lng alignment; + } u; } inet; +#define q1 u.s._q1 +#define q2 u.s._q2 +#define q3 u.s._q3 +#define q4 u.s._q4 +#define mask u.s._mask +#define filler1u.s._filler1 +#define filler2u.s._filler2 +#define isnil u.s._isnil + #ifdef WORDS_BIGENDIAN /* HACK ALERT: once upon a time, lng_nil was used as inet_nil, but on * big endian hardware, the byte that is not zero is on the other end; @@ -72,7 +87,7 @@ mal_export str INET_comp_CSE(bit *retval mal_export str INETbroadcast(inet *retval, const inet *val); mal_export str INEThost(str *retval, const inet *val); mal_export str INETmasklen(int *retval, const inet *val); -mal_export str INETsetmasklen(inet *retval, const inet *val, const int *mask); +mal_export str INETsetmasklen(inet *retval, const inet *val, const int *msk); mal_export str INETnetmask(inet *retval, const inet *val); mal_export str INEThostmask(inet *retval, const inet *val); mal_export str INETnetwork(inet *retval, const inet *val); @@ -82,7 +97,7 @@ mal_export str INET_inet(inet *d, const mal_export str INET_fromstr(inet *ret, str *s); mal_export inet *INETnull(void); -static inet inet_nil = {0,0,0,0,0,0,0,1}; +static inet inet_nil = {{{0,0,0,0,0,0,0,1}}}; /** * Creates a new inet from the given string. @@ -399,18 +414,18 @@ INET_comp_CW(bit *retval, const inet *va * be contained within */ *retval = 0; } else { - unsigned int mask; + unsigned int msk; unsigned char m[4]; if (val2->mask > 0) - mask = ~0U << (32 - val2->mask); + msk = ~0U << (32 - val2->mask); else - mask = 0; + msk = 0; - m[0] = (mask >> 24) & 0xFF; - m[1] = (mask >> 16) & 0xFF; - m[2] = (mask >> 8) & 0xFF; - m[3] = mask & 0xFF; + m[0] = (msk >> 24) & 0xFF; + m[1] = (msk >> 16) & 0xFF; + m[2] = (msk >> 8) & 0xFF; + m[3] = msk & 0xFF; /* all operations here are done byte based, to avoid byte sex * problems */ @@ -491,19 +506,19 @@ INETbroadcast(inet *retval, const inet * { *retval = *val; if (!in_isnil(val) && val->mask != 32) { - unsigned int mask; + unsigned int msk; unsigned char m[4]; if (val->mask > 0) - mask = ~0U << (32 - val->mask); + msk = ~0U << (32 - val->mask); else - mask = 0; + msk = 0; - mask = ~mask; /* invert the mask */ - m[0] = (mask >> 24) & 0xFF; - m[1] = (mask >> 16) & 0xFF; - m[2] = (mask >> 8) & 0xFF; - m[3] = mask & 0xFF; + msk = ~msk; /* invert the mask */ + m[0] = (msk >> 24) & 0xFF; + m[1] = (msk >> 16) & 0xFF; +
MonetDB: default - Merge with Dec2016 branch.
Changeset: 040e602e3444 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=040e602e3444 Modified Files: monetdb5/mal/mal_interpreter.c Branch: default Log Message: Merge with Dec2016 branch. diffs (96 lines): diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c --- a/monetdb5/mal/mal_interpreter.c +++ b/monetdb5/mal/mal_interpreter.c @@ -486,7 +486,7 @@ str runMALsequence(Client cntxt, MalBlkP if (startpc+1 == stoppc) { pci = getInstrPtr(mb, startpc); if (pci->argc > 16) { - backup = GDKzalloc(pci->argc * sizeof(ValRecord)); + backup = GDKmalloc(pci->argc * sizeof(ValRecord)); if( backup == NULL) throw(MAL, "mal.interpreter", MAL_MALLOC_FAIL); garbage = (int*)GDKzalloc(pci->argc * sizeof(int)); @@ -500,7 +500,7 @@ str runMALsequence(Client cntxt, MalBlkP memset(garbages, 0, sizeof(garbages)); } } else if ( mb->maxarg > 16 ){ - backup = GDKzalloc(mb->maxarg * sizeof(ValRecord)); + backup = GDKmalloc(mb->maxarg * sizeof(ValRecord)); if( backup == NULL) throw(MAL, "mal.interpreter", MAL_MALLOC_FAIL); garbage = (int*)GDKzalloc(mb->maxarg * sizeof(int)); @@ -588,25 +588,16 @@ str runMALsequence(Client cntxt, MalBlkP * garbage collected are identified. In the post-execution * phase they are removed. */ + for (i = 0; i < pci->retc; i++) + backup[i] = stk->stk[getArg(pci, i)]; + if (garbageControl(pci)) { for (i = 0; i < pci->argc; i++) { int a = getArg(pci, i); - backup[i].vtype = 0; - backup[i].len = 0; - backup[i].val.pval = 0; garbage[i] = -1; if (stk->stk[a].vtype == TYPE_bat && getEndScope(mb, a) == stkpc && isNotUsedIn(pci, i + 1, a)) garbage[i] = a; - - if (i < pci->retc && stk->stk[a].vtype == TYPE_bat) { - backup[i] = stk->stk[a]; - } else if (i < pci->retc && - 0 < stk->stk[a].vtype && - stk->stk[a].vtype < TYPE_any && - ATOMextern(stk->stk[a].vtype)) { - backup[i] = stk->stk[a]; - } } } @@ -812,6 +803,16 @@ str runMALsequence(Client cntxt, MalBlkP runtimeProfileFinish(cntxt, mb); /* check for strong debugging after each MAL statement */ if ( pci->token != FACcall && ret== MAL_SUCCEED) { + for (i = 0; i < pci->retc; i++) { + lhs = &backup[i]; + if (BATatoms[lhs->vtype].atomUnfix) + (*BATatoms[lhs->vtype].atomUnfix)(VALget(lhs)); + if (ATOMextern(lhs->vtype) && + lhs->val.pval && + lhs->val.pval != ATOMnilptr(lhs->vtype) && + lhs->val.pval != stk->stk[getArg(pci, i)].val.pval) + GDKfree(lhs->val.pval); + } if (GDKdebug & (CHECKMASK|PROPMASK) && exceptionVar < 0) { BAT *b; @@ -841,28 +842,12 @@ str runMALsequence(Client cntxt, MalBlkP if (isaBatType(getArgType(mb, pci, i))) { bat bid = stk->stk[a].val.bval; - if (i < pci->retc && backup[i].val.bval != bat_nil) { - bat bx = backup[i].val.bval; - backup[i].val.bval = bat_nil; - BBPrelease(bx); - } if (garbage[i] >= 0) { PARDEBUG mnstr_printf(GDKstdout, "#GC pc=%d bid=%d %s done\n", stkpc, bid, getVarName(mb, garbage[i])); bid = stk->stk[garbage[i]].val.bval; stk->stk[garbage[i]].val.bval = bat_nil;
MonetDB: default - Merge with Dec2016 branch.
Changeset: 03af37271b38 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=03af37271b38 Modified Files: testing/Mtest.py.in Branch: default Log Message: Merge with Dec2016 branch. diffs (18 lines): diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -4232,6 +4232,14 @@ def main(argv) : break if global_timeout and start_time + global_timeout < time.time(): break +if not testweb: +# after a directory has been tested, create +# the index file so that we can look at test +# results while the tests are running +env['TSTDIR'] = "" +env['TSTTRGDIR'] = os.path.join(TSTTRGBASE, TSTPREF) +body = body_bad + body_good +CreateHtmlIndex(env, *body) except KeyboardInterrupt: # if we get interrupted between directories, we still want output pass ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 6ea1caeb6147 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6ea1caeb6147 Added Files: sql/test/BugTracker-2017/Tests/All sql/test/BugTracker-2017/Tests/avggroupbysq.Bug-6178.sql sql/test/BugTracker-2017/Tests/avggroupbysq.Bug-6178.stable.err sql/test/BugTracker-2017/Tests/avggroupbysq.Bug-6178.stable.out sql/test/BugTracker-2017/Tests/shutdown.Bug-6182.sql sql/test/BugTracker-2017/Tests/shutdown.Bug-6182.stable.err sql/test/BugTracker-2017/Tests/shutdown.Bug-6182.stable.out Modified Files: gdk/gdk_aggr.c gdk/gdk_interprocess.c gdk/gdk_interprocess.h monetdb5/modules/mal/clients.c monetdb5/optimizer/opt_mergetable.c sql/backends/monet5/UDF/pyapi/connection.c sql/backends/monet5/UDF/pyapi/conversion.c sql/backends/monet5/UDF/pyapi/emit.c sql/backends/monet5/UDF/pyapi/formatinput.c sql/backends/monet5/UDF/pyapi/pyapi.c sql/backends/monet5/UDF/pyapi/pyapi.h sql/backends/monet5/UDF/pyapi/pyheader.h sql/backends/monet5/UDF/pyapi/pyloader.c sql/backends/monet5/UDF/pyapi/pytypes.c sql/backends/monet5/UDF/pyapi/type_conversion.c sql/backends/monet5/UDF/pyapi/unicode.c Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 514 to 300 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -1386,7 +1386,8 @@ BATgroupavg(BAT **bnp, BAT **cntsp, BAT return GDK_SUCCEED; } - if ((e == NULL || + if ((!skip_nils || cntsp == NULL || b->tnonil) && + (e == NULL || (BATcount(e) == BATcount(b) && e->hseqbase == b->hseqbase)) && (BATtdense(g) || (g->tkey && g->tnonil))) { /* trivial: singleton groups, so all results are equal diff --git a/gdk/gdk_interprocess.c b/gdk/gdk_interprocess.c --- a/gdk/gdk_interprocess.c +++ b/gdk/gdk_interprocess.c @@ -6,10 +6,11 @@ * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ -#include "gdk_interprocess.h" +#include "monetdb_config.h" #ifdef HAVE_FORK +#include "gdk_interprocess.h" #include "gdk.h" #include "gdk_private.h" diff --git a/gdk/gdk_interprocess.h b/gdk/gdk_interprocess.h --- a/gdk/gdk_interprocess.h +++ b/gdk/gdk_interprocess.h @@ -14,8 +14,6 @@ #ifndef _GDK_INTERPROCES_H_ #define _GDK_INTERPROCES_H_ -#include "monetdb_config.h" - #ifdef HAVE_FORK #include "gdk.h" diff --git a/monetdb5/modules/mal/clients.c b/monetdb5/modules/mal/clients.c --- a/monetdb5/modules/mal/clients.c +++ b/monetdb5/modules/mal/clients.c @@ -540,7 +540,7 @@ str CLTgetUsers(Client cntxt, MalBlkPtr str CLTshutdown(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) { str *ret = getArgReference_str(stk,pci,0); - int delay = *getArgReference_int(stk,pci,1); + int delay; bit force = FALSE; int leftover; char buf[1024]={"safe to stop last connection"}; @@ -551,11 +551,14 @@ CLTshutdown(Client cntxt, MalBlkPtr mb, (void) mb; switch( getArgType(mb,pci,1)){ case TYPE_bte: + delay = *getArgReference_bte(stk,pci,1); + break; case TYPE_sht: delay = *getArgReference_sht(stk,pci,1); break; default: delay = *getArgReference_int(stk,pci,1); + break; } if ( cntxt->user != mal_clients[0].user) diff --git a/monetdb5/optimizer/opt_mergetable.c b/monetdb5/optimizer/opt_mergetable.c --- a/monetdb5/optimizer/opt_mergetable.c +++ b/monetdb5/optimizer/opt_mergetable.c @@ -1045,10 +1045,7 @@ mat_group_aggr(MalBlkPtr mb, InstrPtr p, ai2 = pushArgument(mb, ai2, getArg(ai1, 0)); ai2 = pushArgument(mb, ai2, mat[g].mv); ai2 = pushArgument(mb, ai2, mat[e].mv); - if (isAvg) - ai2 = pushBit(mb, ai2, 0); /* do not skip nils */ - else - ai2 = pushBit(mb, ai2, 1); /* skip nils */ + ai2 = pushBit(mb, ai2, 1); /* skip nils */ if (getFunctionId(p) != subminRef && getFunctionId(p) != submaxRef) ai2 = pushBit(mb, ai2, 1); pushInstruction(mb, ai2); diff --git a/sql/backends/monet5/UDF/pyapi/connection.c b/sql/backends/monet5/UDF/pyapi/connection.c --- a/sql/backends/monet5/UDF/pyapi/connection.c +++ b/sql/backends/monet5/UDF/pyapi/connection.c @@ -6,6 +6,7 @@ * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ +#include "monetdb_config.h" #include "pyapi.h" #include "conversion.h" #include "connection.h" diff --git a/sql/backends/monet5/UDF/pyapi/conversion.c b/sql/backends/monet5/UDF/pyapi/conversion.c --- a/sql/backends/monet5/UDF/pyapi/conversion.c +++ b/sql/backends/monet5/UDF/pyapi/conversion.c @@ -1,4 +1,5 @@ +#include "monetdb_config.h" #include "conversion.h" #include "convert_loops.h" #include "pytyp
MonetDB: default - Merge with Dec2016 branch, but without change...
Changeset: bdb16f7ba744 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bdb16f7ba744 Modified Files: gdk/gdk_value.c monetdb5/mal/mal.h monetdb5/mal/mal_interpreter.c sql/backends/monet5/sql_gencode.c sql/common/sql_mem.c sql/include/sql_mem.h sql/server/sql_mvc.c Branch: default Log Message: Merge with Dec2016 branch, but without changeset d5069090bc64. diffs (204 lines): diff --git a/gdk/gdk_value.c b/gdk/gdk_value.c --- a/gdk/gdk_value.c +++ b/gdk/gdk_value.c @@ -115,7 +115,7 @@ VALget(ValPtr v) void VALclear(ValPtr v) { - if (v->vtype == TYPE_str || ATOMextern(v->vtype)) { + if (ATOMextern(v->vtype)) { if (v->val.pval && v->val.pval != ATOMnilptr(v->vtype)) GDKfree(v->val.pval); } diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h --- a/monetdb5/mal/mal.h +++ b/monetdb5/mal/mal.h @@ -167,7 +167,7 @@ typedef struct { bit barrier;/* flow of control modifier takes: BARRIER, LEAVE, REDO, EXIT, CATCH, RAISE */ bit typechk;/* type check status */ - bit gc; /* garbage control flags */ + bte gc; /* garbage control flags */ bit polymorphic;/* complex type analysis */ bit varargs;/* variable number of arguments */ int jump; /* controlflow program counter */ diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c --- a/monetdb5/mal/mal_interpreter.c +++ b/monetdb5/mal/mal_interpreter.c @@ -70,34 +70,34 @@ str malCommandCall(MalStkPtr stk, InstrP str ret= MAL_SUCCEED; switch (pci->argc) { - case 0: ret = (str)(*pci->fcn)(); + case 0: ret = (*pci->fcn)(); break; - case 1: ret = (str)(*pci->fcn)( + case 1: ret = (*pci->fcn)( getArgReference(stk, pci, 0)); break; - case 2: ret = (str)(*pci->fcn)( + case 2: ret = (*pci->fcn)( getArgReference(stk, pci, 0), getArgReference(stk, pci, 1)); break; - case 3: ret = (str)(*pci->fcn)( + case 3: ret = (*pci->fcn)( getArgReference(stk, pci, 0), getArgReference(stk, pci, 1), getArgReference(stk, pci, 2)); break; - case 4: ret = (str)(*pci->fcn)( + case 4: ret = (*pci->fcn)( getArgReference(stk, pci, 0), getArgReference(stk, pci, 1), getArgReference(stk, pci, 2), getArgReference(stk, pci, 3)); break; - case 5: ret = (str)(*pci->fcn)( + case 5: ret = (*pci->fcn)( getArgReference(stk, pci, 0), getArgReference(stk, pci, 1), getArgReference(stk, pci, 2), getArgReference(stk, pci, 3), getArgReference(stk, pci, 4)); break; - case 6: ret = (str)(*pci->fcn)( + case 6: ret = (*pci->fcn)( getArgReference(stk, pci, 0), getArgReference(stk, pci, 1), getArgReference(stk, pci, 2), @@ -105,7 +105,7 @@ str malCommandCall(MalStkPtr stk, InstrP getArgReference(stk, pci, 4), getArgReference(stk, pci, 5)); break; - case 7: ret = (str)(*pci->fcn)( + case 7: ret = (*pci->fcn)( getArgReference(stk, pci, 0), getArgReference(stk, pci, 1), getArgReference(stk, pci, 2), @@ -114,7 +114,7 @@ str malCommandCall(MalStkPtr stk, InstrP getArgReference(stk, pci, 5), getArgReference(stk, pci, 6)); break; - case 8: ret = (str)(*pci->fcn)( + case 8: ret = (*pci->fcn)( getArgReference(stk, pci, 0), getArgReference(stk, pci, 1), getArgReference(stk, pci, 2), @@ -124,7 +124,7 @@ str malCommandCall(MalStkPtr stk, InstrP getArgReference(stk, pci, 6), getArgReference(stk, pci, 7)); break; - case 9: ret = (str)(*pci->fcn)( + case 9: ret = (*pci->fcn)( getArgReference(stk, pci, 0), getArgReference(stk, pci, 1), getArgReference(stk, pci, 2), @@ -135,7 +135,7 @@ str malCommandCall(MalStkPtr stk, InstrP getArgReference(stk, pci, 7),
MonetDB: default - Merge with Dec2016 branch.
Changeset: 08862aea152a for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=08862aea152a Modified Files: HowToStart.rst Makefile.ag NT/Makefile NT/installer32/cv64-32.sh NT/installer64/cv32-64.sh NT/installer64/fixmsi.py NT/monetdb_config.h.in NT/rules.msc NT/updatecodes.py NT/wincompile.py NT/winconfig.py README bootstrap buildtools/Makefile.ag buildtools/autogen/autogen.py buildtools/autogen/autogen/am.py buildtools/autogen/autogen/codegen.py buildtools/autogen/autogen/filesplit.py buildtools/autogen/autogen/msc.py buildtools/autogen/autogen/var.py buildtools/autogen/setup.py buildtools/conf/Maddlog buildtools/conf/Makefile.ag buildtools/conf/fixlicense.py buildtools/conf/rules.mk buildtools/conf/website.html buildtools/doc/HowToRelease.rst buildtools/doc/windowsbuild.rst clients/Makefile.ag clients/NT/Makefile.ag clients/NT/mclient.bat clients/NT/msqldump.bat clients/NT/stethoscope.bat clients/examples/C/Makefile.ag clients/examples/C/sample0.c clients/examples/C/sample1.c clients/examples/C/sample4.c clients/examples/C/smack00.c clients/examples/C/smack01.c clients/examples/Makefile.ag clients/examples/perl/Makefile.ag clients/examples/perl/malsample.pl clients/examples/perl/sqlsample.pl clients/examples/php/Makefile.ag clients/examples/php/sqlsample.php clients/examples/python/basics.py clients/examples/python/mclient-python2.py clients/examples/python/mclient-python3.py clients/examples/python/perf.py clients/examples/python/sqlsample.py clients/mapiclient/Makefile.ag clients/mapiclient/ReadlineTools.c clients/mapiclient/ReadlineTools.h clients/mapiclient/dotfile.py clients/mapiclient/dotmonetdb.c clients/mapiclient/dotmonetdb.h clients/mapiclient/dump.c clients/mapiclient/eventparser.c clients/mapiclient/eventparser.h clients/mapiclient/mclient.c clients/mapiclient/mhelp.c clients/mapiclient/mhelp.h clients/mapiclient/mnc.c clients/mapiclient/msqldump.c clients/mapiclient/msqldump.h clients/mapiclient/stethoscope.c clients/mapiclient/tachograph.c clients/mapiclient/tomograph.c clients/mapilib/Makefile.ag clients/mapilib/mapi.c clients/mapilib/mapi.h clients/mapilib/mapi.rc clients/mapilib/monetdb-mapi.pc.in clients/odbc/Makefile.ag clients/odbc/doc/ExcelMonetDB.html clients/odbc/doc/unixODBC.html clients/odbc/driver/Makefile.ag clients/odbc/driver/ODBCConvert.c clients/odbc/driver/ODBCDbc.c clients/odbc/driver/ODBCDbc.h clients/odbc/driver/ODBCDesc.c clients/odbc/driver/ODBCDesc.h clients/odbc/driver/ODBCEnv.c clients/odbc/driver/ODBCEnv.h clients/odbc/driver/ODBCError.c clients/odbc/driver/ODBCError.h clients/odbc/driver/ODBCGlobal.h clients/odbc/driver/ODBCStmt.c clients/odbc/driver/ODBCStmt.h clients/odbc/driver/ODBCUtil.c clients/odbc/driver/ODBCUtil.h clients/odbc/driver/SQLAllocConnect.c clients/odbc/driver/SQLAllocEnv.c clients/odbc/driver/SQLAllocHandle.c clients/odbc/driver/SQLAllocStmt.c clients/odbc/driver/SQLBindCol.c clients/odbc/driver/SQLBindParameter.c clients/odbc/driver/SQLBrowseConnect.c clients/odbc/driver/SQLBulkOperations.c clients/odbc/driver/SQLCancel.c clients/odbc/driver/SQLCloseCursor.c clients/odbc/driver/SQLColAttribute.c clients/odbc/driver/SQLColAttributes.c clients/odbc/driver/SQLColumnPrivileges.c clients/odbc/driver/SQLColumns.c clients/odbc/driver/SQLConnect.c clients/odbc/driver/SQLCopyDesc.c clients/odbc/driver/SQLDataSources.c clients/odbc/driver/SQLDescribeCol.c clients/odbc/driver/SQLDescribeParam.c clients/odbc/driver/SQLDisconnect.c clients/odbc/driver/SQLDriverConnect.c clients/odbc/driver/SQLDrivers.c clients/odbc/driver/SQLEndTran.c clients/odbc/driver/SQLError.c clients/odbc/driver/SQLExecDirect.c clients/odbc/driver/SQLExecute.c clients/odbc/driver/SQLExtendedFetch.c clients/odbc/driver/SQLFetch.c clients/odbc/driver/SQLFetchScroll.c clients/odbc/driver/SQLForeignKeys.c clients/odbc/driver/SQLFreeConnect.c clients/odbc/driver/SQLFreeEnv.c clients/odbc/driver/SQLFreeHandle.c clients/odbc/driver/SQLFreeStmt.c clients/odbc/driver/SQLGetConnectAttr.c
MonetDB: default - Merge with Dec2016 branch.
Changeset: 668f5608c6da for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=668f5608c6da Added Files: sql/test/BugTracker-2016/Tests/inner_join_cross_join.Bug-6140.stable.out.int128 Removed Files: sql/benchmarks/wisconsin/Tests/All sql/benchmarks/wisconsin/Tests/load.prologue5 sql/benchmarks/wisconsin/Tests/load.sql.src sql/benchmarks/wisconsin/Tests/load.stable.err sql/benchmarks/wisconsin/Tests/load.stable.out sql/benchmarks/wisconsin/Tests/load.timeout sql/benchmarks/wisconsin/Tests/wisconsin-select.reqtests sql/benchmarks/wisconsin/Tests/wisconsin-select.sql.src sql/benchmarks/wisconsin/Tests/wisconsin-select.stable.err sql/benchmarks/wisconsin/Tests/wisconsin-select.stable.out sql/benchmarks/wisconsin/Tests/wisconsin-update.reqtests sql/benchmarks/wisconsin/Tests/wisconsin-update.sql.src sql/benchmarks/wisconsin/Tests/wisconsin-update.stable.err sql/benchmarks/wisconsin/Tests/wisconsin-update.stable.out sql/benchmarks/wisconsin/load.sql sql/benchmarks/wisconsin/wisconsin-select.sql sql/benchmarks/wisconsin/wisconsin-update.sql sql/benchmarks/wisconsin/wisconsin.sql Modified Files: gdk/gdk_bbp.c gdk/gdk_interprocess.h monetdb5/optimizer/opt_candidates.c sql/backends/monet5/UDF/pyapi/50_pyapi.mal sql/backends/monet5/UDF/pyapi/Makefile.ag sql/backends/monet5/UDF/pyapi/connection.c sql/backends/monet5/UDF/pyapi/connection.h sql/backends/monet5/UDF/pyapi/convert_loops.h sql/backends/monet5/UDF/pyapi/emit.c sql/backends/monet5/UDF/pyapi/emit.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/pyloader.c 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/undef.h sql/backends/monet5/UDF/pyapi/unicode.c sql/backends/monet5/UDF/pyapi/unicode.h sql/common/sql_list.c sql/test/BugTracker-2010/Tests/group-by_ordered_column.Bug-2564.stable.out sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128 sql/test/BugTracker-2016/Tests/inner_join_cross_join.Bug-6140.stable.out sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 78053 to 300 lines): diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -3174,11 +3174,15 @@ BBPrecover(int farmid) gdk_return BBPrecover_subdir(void) { - str subdirpath = GDKfilepath(0, NULL, SUBDIR, NULL); - DIR *dirp = opendir(subdirpath); + str subdirpath; + DIR *dirp; struct dirent *dent; gdk_return ret = GDK_SUCCEED; + subdirpath = GDKfilepath(0, NULL, SUBDIR, NULL); + if (subdirpath == NULL) + return GDK_FAIL; + dirp = opendir(subdirpath); GDKfree(subdirpath); if (dirp == NULL) { return GDK_SUCCEED; /* nothing to do */ diff --git a/gdk/gdk_interprocess.h b/gdk/gdk_interprocess.h --- a/gdk/gdk_interprocess.h +++ b/gdk/gdk_interprocess.h @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2008-2015 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. */ /* diff --git a/monetdb5/optimizer/opt_candidates.c b/monetdb5/optimizer/opt_candidates.c --- a/monetdb5/optimizer/opt_candidates.c +++ b/monetdb5/optimizer/opt_candidates.c @@ -27,47 +27,50 @@ OPTcandidatesImplementation(Client cntxt (void) stk; /* to fool compilers */ for (i = 0; i < mb->stop; i++) { p = getInstrPtr(mb,i); - if( p->token == ASSIGNsymbol && isVarCList(mb,getArg(p,1))) - setVarCList(mb,getArg(p,0)); + if( p->token == ASSIGNsymbol) { + int j; + for (j = 0; j < p->retc && j + p->retc < p->argc; j++) + if (isVarCList(mb,getArg(p,p->retc + j))) + setVarCList(mb,getArg(p,j)); + } if( getModuleId(p) == sqlRef){ if(getFunctionId(p) == tidRef) setVarCList(mb,getArg(p,0)); - if(getFunctionId(p) == subdeltaRef) + else if(getFunc
MonetDB: default - Merge with Dec2016 branch.
Changeset: 8202ff01e3b0 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8202ff01e3b0 Added Files: sql/test/sys-schema/Tests/All sql/test/sys-schema/Tests/check_AlternateKey_uniqueness.sql sql/test/sys-schema/Tests/check_AlternateKey_uniqueness.stable.err sql/test/sys-schema/Tests/check_AlternateKey_uniqueness.stable.out sql/test/sys-schema/Tests/check_PrimaryKey_uniqueness.sql sql/test/sys-schema/Tests/check_PrimaryKey_uniqueness.stable.err sql/test/sys-schema/Tests/check_PrimaryKey_uniqueness.stable.out Modified Files: monetdb5/optimizer/opt_mergetable.c sql/test/BugTracker-2016/Tests/All Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 684 to 300 lines): diff --git a/monetdb5/optimizer/opt_mergetable.c b/monetdb5/optimizer/opt_mergetable.c --- a/monetdb5/optimizer/opt_mergetable.c +++ b/monetdb5/optimizer/opt_mergetable.c @@ -1429,11 +1429,25 @@ mat_topn(MalBlkPtr mb, InstrPtr p, matli static void mat_sample(MalBlkPtr mb, InstrPtr p, matlist_t *ml, int m) { + /* transform +* a := sample.subuniform(b,n); +* into +* t1 := sample.subuniform(b1,n); +* t2 := sample.subuniform(b2,n); +* ... +* t0 := mat.pack(t1,t2,...); +* tn := sample.subuniform(t0,n); +* a := algebra.projection(tn,t0); +* +* Note that this does *not* give a uniform sample of the original +* bat b! +*/ + int tpe = getArgType(mb,p,0), k, piv; - InstrPtr pck, q; + InstrPtr pck, q, r; pck = newInstruction(mb,matRef,packRef); - getArg(pck,0) = getArg(p,0); + getArg(pck,0) = newTmpVariable(mb, tpe); for(k=1; k< ml->v[m].mi->argc; k++) { q = copyInstruction(p); @@ -1448,9 +1462,16 @@ mat_sample(MalBlkPtr mb, InstrPtr p, mat pushInstruction(mb,pck); q = copyInstruction(p); + getArg(q,0) = newTmpVariable(mb, tpe); getArg(q,q->retc) = getArg(pck,0); pushInstruction(mb,q); + r = newInstruction(mb, algebraRef, projectionRef); + getArg(r,0) = getArg(p,0); + pushArgument(mb, r, getArg(q, 0)); + pushArgument(mb, r, getArg(pck, 0)); + pushInstruction(mb, r); + ml->v[piv].packed = 1; ml->v[piv].type = mat_slc; } diff --git a/sql/test/sys-schema/Tests/All b/sql/test/sys-schema/Tests/All new file mode 100644 --- /dev/null +++ b/sql/test/sys-schema/Tests/All @@ -0,0 +1,2 @@ +check_PrimaryKey_uniqueness +check_AlternateKey_uniqueness diff --git a/sql/test/sys-schema/Tests/check_AlternateKey_uniqueness.sql b/sql/test/sys-schema/Tests/check_AlternateKey_uniqueness.sql new file mode 100644 --- /dev/null +++ b/sql/test/sys-schema/Tests/check_AlternateKey_uniqueness.sql @@ -0,0 +1,36 @@ +-- check all standard sys (and tmp) tables on Alternate Key uniqueness +-- All queries should return NO rows (so no duplicates found). +SELECT COUNT(*) AS duplicates, name FROM sys.schemas GROUP BY name HAVING COUNT(*) > 1; +SELECT COUNT(*) AS duplicates, table_type_name FROM sys.table_types GROUP BY table_type_name HAVING COUNT(*) > 1; +SELECT COUNT(*) AS duplicates, schema_id, name FROM sys._tables GROUP BY schema_id, name HAVING COUNT(*) > 1; +SELECT COUNT(*) AS duplicates, schema_id, name FROM tmp._tables GROUP BY schema_id, name HAVING COUNT(*) > 1; +SELECT COUNT(*) AS duplicates, schema_id, name FROM sys.tables GROUP BY schema_id, name HAVING COUNT(*) > 1; +SELECT COUNT(*) AS duplicates, table_id, name FROM sys._columns GROUP BY table_id, name HAVING COUNT(*) > 1; +SELECT COUNT(*) AS duplicates, table_id, name FROM tmp._columns GROUP BY table_id, name HAVING COUNT(*) > 1; +SELECT COUNT(*) AS duplicates, table_id, name FROM sys.columns GROUP BY table_id, name HAVING COUNT(*) > 1; + +-- the next query returns duplicates for overloaded functions (same function but with different args), hence it has been disabled +--SELECT COUNT(*) AS duplicates, schema_id, name, func, mod, language, type, side_effect, varres, vararg FROM sys.functions +-- GROUP BY schema_id, name, func, mod, language, type, side_effect, varres, vararg HAVING COUNT(*) > 1; +SELECT COUNT(*) AS duplicates, func_id, name FROM sys.args GROUP BY func_id, name HAVING COUNT(*) > 1; + +SELECT COUNT(*) AS duplicates, schema_id, systemname, sqlname FROM sys.types GROUP BY schema_id, systemname, sqlname HAVING COUNT(*) > 1; + +SELECT COUNT(*) AS duplicates, id, name FROM sys.objects GROUP BY id, name HAVING COUNT(*) > 1; +SELECT COUNT(*) AS duplicates, id, name FROM tmp.objects GROUP BY id, name HAVING COUNT(*) > 1; +SELECT COUNT(*) AS duplicates, table_id, name FROM sys.keys GROUP BY table_id, name HAVING COUNT(*) > 1; +SELECT COUNT(*) AS duplicates, table_id, name FROM tmp.keys GROUP BY table_id, name HAVING COUNT(*) > 1; +SELECT COUNT(*) AS duplicates, table_id, name FROM sys.idxs GROUP BY table_id, name HAVING COUNT(*) >
MonetDB: default - Merge with Dec2016 branch.
Changeset: e8f4830c7cc2 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e8f4830c7cc2 Added Files: monetdb5/tools/Tests/mserver5--help.stable.err.Windows sql/test/Tests/bincopycollist-prepare.py Removed Files: sql/test/Tests/bincopycollist-prepare.bat sql/test/Tests/bincopycollist-prepare.sh sql/test/Tests/bincopyint.bin Modified Files: monetdb5/mal/mal_parser.c sql/test/BugTracker-2016/Tests/All sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out.32bit sql/test/Tests/bincopycollist-prepare.stable.err sql/test/Tests/bincopycollist-prepare.stable.out Branch: default Log Message: Merge with Dec2016 branch. diffs (193 lines): diff --git a/monetdb5/mal/mal_parser.c b/monetdb5/mal/mal_parser.c --- a/monetdb5/mal/mal_parser.c +++ b/monetdb5/mal/mal_parser.c @@ -949,6 +949,15 @@ static str parseModule(Client cntxt) return ""; } + +static int +malLibraryEnabled(str name) { + if (strcmp(name, "pyapi") == 0) { + return GDKgetenv_istrue("embedded_py") || GDKgetenv_isyes("embedded_py"); + } + return 1; +} + /* * Include statement * An include statement is immediately taken into effect. This @@ -995,6 +1004,10 @@ parseInclude(Client cntxt) } skipToEnd(cntxt); + if (!malLibraryEnabled(modnme)) { + return ""; + } + s = loadLibrary(modnme, FALSE); if (s) { parseError(cntxt, s); diff --git a/monetdb5/tools/Tests/mserver5--help.stable.err.Windows b/monetdb5/tools/Tests/mserver5--help.stable.err.Windows new file mode 100644 --- /dev/null +++ b/monetdb5/tools/Tests/mserver5--help.stable.err.Windows @@ -0,0 +1,43 @@ +stderr of test 'mserver5--help` in directory 'monetdb5/tools` itself: + + +# 16:36:12 > +# 16:36:12 > Mtimeout -timeout 300 ./mserver5--help mserver5--help +# 16:36:12 > + + +# 16:36:12 > +# 16:36:12 > Mtimeout -timeout 60 mserver5 --config= --help +# 16:36:12 > + +Usage: mserver5.exe [options] [scripts] +--dbpath= Specify database location +--dbextra= Directory for transient BATs +--dbinit= Execute statement at startup +--config=Use config_file to read options from +--daemon=yes|no Do not read commands from standard input [no] +--single-user Allow only one user at a time +--readonlySafeguard database +--set =Set configuration option +--helpPrint this list of options +--version Print version and compile time info +The debug, testing & trace options: + --threads + --memory + --io + --heaps + --properties + --transactions + --modules + --algorithms + --performance + --optimizers + --trace + --forcemito + --recycler + --debug= + +# 10:03:11 > +# 10:03:11 > Done. +# 10:03:11 > + 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 @@ -21,7 +21,7 @@ rank_rewrite.Bug-3890 HAVE_LIBBZ2?min-max-uuid-column-wrong-results.Bug-3953 update_crash.Bug-3954 group_distinct_quantile.Bug-3927 -merge_project.Bug-3955 +HAVE_GEOM?merge_project.Bug-3955 decimal_vs_integer.Bug-3941 foreign_key.Bug-3938 invalidcolumns.Bug-3968 @@ -57,8 +57,8 @@ cast_and_floor.Bug-6071 union.Bug-6069 ifthenelse-void.Bug-6075 assert-on-table-producing-function.Bug-6076 -assert-on-push-project-up.Bug-6077 -assert-on-project.Bug-6078 +HAVE_NETCDF?assert-on-push-project-up.Bug-6077 +HAVE_SAMTOOLS?assert-on-project.Bug-6078 crash.Bug-6081 merge-table-edit.Bug-6084 dce.Bug-6114 diff --git a/sql/test/Tests/bincopycollist-prepare.bat b/sql/test/Tests/bincopycollist-prepare.bat deleted file mode 100755 --- a/sql/test/Tests/bincopycollist-prepare.bat +++ /dev/null @@ -1,4 +0,0 @@ -@prompt # $t $g -@echo on - -copy "%TSTSRCDIR%\bincopyint.bin" "%TSTTRGDIR%" diff --git a/sql/test/Tests/bincopycollist-prepare.py b/sql/test/Tests/bincopycollist-prepare.py new file mode 100644 --- /dev/null +++ b/sql/test/Tests/bincopycollist-prepare.py @@ -0,0 +1,9 @@ +import struct +import os + +f = open(os.path.join(os.getenv('TSTTRGDIR'), 'bincopyint.bin'), 'wb') + +for i in range(10): +f.write(struct.pack('@i', i)) + +f.close() diff --git a/sql/test/Tests/bincopycollist-prepare.sh b/sql/test/Tests/bincopycollist-prepare.sh deleted file mode 100755 --- a/sql/test/Tests/bincopycollist-prepare.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -Mlog -x "cp $TSTSRCDIR/bincopyint.bin $TSTTRGDIR" diff --git a/sql/test/Tests/bincopycollist-prepare.stable.err b/sql/test/Tests/bincopycollist-prepare.stable.err --- a/sql/test/Tests/bincopycollist-prepare.stable.err +++ b/sql/test/Tests/bincopycollist-prepare.stable.err @@ -1,17 +1,12 @@ stderr of test 'bincopycollist-prepare` in directory 'sql/test` itself: -# 17:0
MonetDB: default - Merge with Dec2016 branch.
Changeset: a72af0ac5512 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a72af0ac5512 Removed Files: sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit Modified Files: MonetDB.spec debian/control sql/storage/store.c sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/dump.stable.out sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/dump.stable.out sql/test/testdb-upgrade/Tests/dump.stable.out.Windows sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 3767 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -136,6 +136,7 @@ BuildRequires: bzip2-devel %if %{?with_fits:1}%{!?with_fits:0} BuildRequires: cfitsio-devel %endif +BuildRequires: gcc %if %{?with_geos:1}%{!?with_geos:0} BuildRequires: geos-devel >= 3.4.0 %endif @@ -389,7 +390,7 @@ Recommends: perl-DBD-monetdb >= 1.0 Recommends: php-monetdb >= 1.0 %endif Requires: %{name}-SQL-server5%{?_isa} = %{version}-%{release} -Requires: python-monetdb >= 1.0 +Requires: python-pymonetdb >= 1.0 %description client-tests MonetDB is a database management system that is developed from a @@ -864,6 +865,7 @@ Group: Applications/Databases Requires: %{name}-testing = %{version}-%{release} Requires: %{name}-client-tests = %{version}-%{release} Requires: python +BuildArch: noarch %description testing-python MonetDB is a database management system that is developed from a diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -137,7 +137,7 @@ Depends: ${shlibs:Depends}, libmonetdb-c monetdb5-server (= ${source:Version}), libdbd-monetdb-perl (>= 1.0), php-monetdb (>= 1.0), - python-monetdb (>= 1.0), + python-pymonetdb (>= 1.0), monetdb5-sql (= ${source:Version}) Description: MonetDB client testing tools MonetDB is a database management system that is developed from a diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -1729,12 +1729,10 @@ store_vacuum( sql_trans *tr ) for( n = s->tables.set->h; n; n = n->next) { sql_table *t = n->data; sql_column *c = t->columns.set->h->data; - int cnt = 0; if (!store_funcs.count_col(tr, c, 0) && !store_funcs.count_upd(tr, t) && - (cnt = store_funcs.count_del(tr, t)) > 128) { - /*printf("vacuum (%d) %s\n", cnt, t->base.name);*/ + store_funcs.count_del(tr, t) > 128) { table_funcs.table_vacuum(tr, t); } } diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 --- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 +++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 @@ -24,216 +24,10 @@ stdout of test 'upgrade` in directory 's # MonetDB/R module loaded Ready. -Running database upgrade commands: -set schema "sys"; -create procedure sys.createorderindex(sys string, tab string, col string) -external name sql.createorderindex; -create procedure sys.droporderindex(sys string, tab string, col string) -external name sql.droporderindex; -drop function sys.zorder_decode_y; -drop function sys.zorder_decode_x; -drop function sys.zorder_encode; -create function profiler.getprofilerlimit() returns integer external name profiler.getprofilerlimit; -create procedure profiler.setprofilerlimit(lim integer) external name profiler.setprofilerlimit; -drop view sys.tablestoragemodel; -drop view sys.storagemodel; -drop function sys.storagemodel(); -drop procedure sys.storagemodelinit(); -drop function sys."storage"(string, string, string); -drop function sys."storage"(string, string); -drop function sys."storage"(string); -drop view sys."storage"; -drop function sys."storage"(); -alter table sys.storagemodelinput add column "revsorted" boolean; -alter table sys.storagemodelinput add column "unique" boolean; -alter table sys.storagemodelinput add column "orde
MonetDB: default - Merge with Dec2016 branch.
Changeset: 1e56d65707c3 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1e56d65707c3 Modified Files: buildtools/autogen/autogen/msc.py monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows sql/backends/monet5/sql.c sql/backends/monet5/sql_scenario.c sql/server/sql_mvc.c sql/server/sql_mvc.h sql/storage/bat/bat_storage.c sql/storage/bat/bat_table.c sql/storage/sql_storage.h sql/storage/store.c Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 410 to 300 lines): diff --git a/buildtools/autogen/autogen/msc.py b/buildtools/autogen/autogen/msc.py --- a/buildtools/autogen/autogen/msc.py +++ b/buildtools/autogen/autogen/msc.py @@ -334,7 +334,7 @@ def msc_dep(fd, tar, deplist, msc): if target == "LIB": d, dext = split_filename(deplist[0]) if dext in ("c", "yy.c", "tab.c"): -fd.write('\t$(CC) $(CFLAGS) $(%s_CFLAGS) $(GENDLL) -D_CRT_SECURE_NO_WARNINGS -DLIB%s -Fo"%s" -c "%s"\n' % +fd.write('\t$(CC) $(CFLAGS) $(%s_CFLAGS) $(GENDLL) -D_CRT_SECURE_NO_WARNINGS -DLIB%s "-Fo%s" -c "%s"\n' % (split_filename(msc_basename(src))[0], name, t, src)) if ext == 'res': fd.write("\t$(RC) -fo%s %s\n" % (t, src)) diff --git a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows --- a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows +++ b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows @@ -61,16 +61,16 @@ Ready. % .explain # table_name % mal # name % clob # type -% 129 # length +% 149 # length function user.s8_1():void; -X_38:void := querylog.define("explain copy into ttt from \\'a:tmp/xyz\\';","default_pipe",10); -X_0 := sql.mvc(); -(X_21:bat[:int],X_22:bat[:int],X_23:bat[:int]) := sql.copy_from(nil,"|","\\n",nil:str,"null","a:\\tmp/xyz",-1,0,0,0,nil:str); -X_25 := sql.append(X_0,"sys","ttt","a",X_21); -X_30 := sql.append(X_25,"sys","ttt","b",X_22); -X_33 := sql.append(X_30,"sys","ttt","c",X_23); -X_35 := aggr.count(X_23); -sql.affectedRows(X_33,X_35); +X_0:void := querylog.define("explain copy into ttt from \\'a:tmp/xyz\\';","default_pipe",4:int); +X_3 := sql.mvc(); +(X_24:bat[:int],X_25:bat[:int],X_26:bat[:int]) := sql.copy_from(nil:ptr,"|","\\n",nil:str,"null","a:\\tmp/xyz",-1:lng,0:lng,0:int,0:int,nil:str); +X_28 := sql.append(X_3,"sys","ttt","a",X_24); +X_33 := sql.append(X_28,"sys","ttt","b",X_25); +X_36 := sql.append(X_33,"sys","ttt","c",X_26); +X_38 := aggr.count(X_26); +sql.affectedRows(X_36,X_38); end user.s8_1; #inline actions= 0 time=1 usec #remapactions= 0 time=5 usec @@ -115,16 +115,16 @@ end user.s8_1; % .explain # table_name % mal # name % clob # type -% 128 # length +% 148 # length function user.s24_1():void; -X_38:void := querylog.define("explain copy into ttt from \\'Z:/tmp/xyz\\';","user_1",10); -X_0 := sql.mvc(); -(X_21:bat[:int],X_22:bat[:int],X_23:bat[:int]) := sql.copy_from(nil,"|","\\n",nil:str,"null","Z:/tmp/xyz",-1,0,0,0,nil:str); -X_25 := sql.append(X_0,"sys","ttt","a",X_21); -X_30 := sql.append(X_25,"sys","ttt","b",X_22); -X_35 := aggr.count(X_23); -X_33 := sql.append(X_30,"sys","ttt","c",X_23); -sql.affectedRows(X_33,X_35); +X_0:void := querylog.define("explain copy into ttt from \\'Z:/tmp/xyz\\';","user_1",4:int); +X_3 := sql.mvc(); +(X_24:bat[:int],X_25:bat[:int],X_26:bat[:int]) := sql.copy_from(nil:ptr,"|","\\n",nil:str,"null","Z:/tmp/xyz",-1:lng,0:lng,0:int,0:int,nil:str); +X_28 := sql.append(X_3,"sys","ttt","a",X_24); +X_33 := sql.append(X_28,"sys","ttt","b",X_25); +X_38 := aggr.count(X_26); +X_36 := sql.append(X_33,"sys","ttt","c",X_26); +sql.affectedRows(X_36,X_38); end user.s24_1; #inline actions= 0 time=1 usec #remapactions= 0 time=4 usec diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -4800,6 +4800,7 @@ SQLvacuum(Client cntxt, MalBlkPtr mb, Ma node *o; int ordered = 0; BUN cnt = 0; + BUN dcnt; if ((msg = getSQLContext(cntxt, mb, &m, NULL)) != NULL) return msg; @@ -4841,17 +4842,17 @@ SQLvacuum(Client cntxt, MalBlkPtr mb, Ma if( del == NULL) throw(SQL, "sql.vacuum", "Can not access deletion column"); - if (BATcount(del) > 0) { + dcnt = BATcount(del); + BBPunfix(del->batCacheid); + if (dcnt > 0) { /* now decide on the algorithm */ - BBPunfix(del->batCacheid); if (ordered) { - if (BATcount(
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 6f063a2b1b19 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6f063a2b1b19 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: b4f78b80e346 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b4f78b80e346 Modified Files: .hgtags MonetDB.spec debian/changelog libversions Branch: default Log Message: Merge with Dec2016 branch. diffs (48 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -644,3 +644,6 @@ 0027cb04877b7687f45277a81a25253a63e9f21f ea0fe76e0095771bccca626b39e3e839a90ba320 Dec2016_1 ea0fe76e0095771bccca626b39e3e839a90ba320 Dec2016_release deeebb69952f76e3377664bb97997885b283f9d1 fix-bad-merge +afc859894553ef804cded49a83b035d9d2cda73b Dec2016_3 +ea0fe76e0095771bccca626b39e3e839a90ba320 Dec2016_release +afc859894553ef804cded49a83b035d9d2cda73b Dec2016_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -955,6 +955,9 @@ rm -f %{buildroot}%{_bindir}/Maddlog %postun -p /sbin/ldconfig %changelog +* Sat Dec 17 2016 Sjoerd Mullender - 11.25.3-20161217 +- Rebuilt. + * Wed Dec 14 2016 Panagiotis Koutsourakis - 11.25.1-20161214 - Rebuilt. - BZ#3357: Implement setQueryTimeout() diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +monetdb (11.25.3) unstable; urgency=low + + * Rebuilt. + + -- Sjoerd Mullender Sat, 17 Dec 2016 11:58:13 +0100 + monetdb (11.25.1) unstable; urgency=low * Rebuilt. diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -36,7 +36,7 @@ # version of the GDK library (subdirectory gdk; also includes # common/options and common/utils) -GDK_VERSION=14:0:0 +GDK_VERSION=14:1:0 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=8:1:0 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 6e44be643243 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6e44be643243 Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: b7f8f4c311e6 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b7f8f4c311e6 Modified Files: sql/storage/bat/bat_table.c Branch: default Log Message: Merge with Dec2016 branch. diffs (70 lines): diff --git a/sql/storage/bat/bat_table.c b/sql/storage/bat/bat_table.c --- a/sql/storage/bat/bat_table.c +++ b/sql/storage/bat/bat_table.c @@ -137,38 +137,6 @@ full_destroy(sql_column *c, BAT *b) } static oid -column_lookup_row(sql_trans *tr, sql_column *c, const void *value) -{ - BAT *b = NULL, *s = NULL; - oid rid = oid_nil; - - b = full_column(tr, c); - if (!b) - return oid_nil; - - if (store_funcs.count_del(tr, c->t)) - s = store_funcs.bind_del(tr, c->t, RD_INS); - - if (BAThash(b, 0) == GDK_SUCCEED) { - BATiter cni = bat_iterator(b); - BUN p; - - HASHloop(cni, cni.b->thash, p, value) { - oid pos = p; - - if (!s || BUNfnd(s, &pos) == BUN_NONE) { - rid = p; - break; - } - } - } - if (s) - bat_destroy(s); - full_destroy(c, b); - return rid; -} - -static oid column_find_row(sql_trans *tr, sql_column *c, const void *value, ...) { va_list va; @@ -177,9 +145,6 @@ column_find_row(sql_trans *tr, sql_colum sql_column *n = NULL; va_start(va, value); - if ((n = va_arg(va, sql_column *)) == NULL) - return column_lookup_row(tr, c, value); - s = delta_cands(tr, c->t); if (!s) return oid_nil; @@ -192,7 +157,7 @@ column_find_row(sql_trans *tr, sql_colum bat_destroy(s); s = r; full_destroy(c, b); - do { + while ((n = va_arg(va, sql_column *)) != NULL) { value = va_arg(va, void *); c = n; @@ -205,7 +170,7 @@ column_find_row(sql_trans *tr, sql_colum bat_destroy(s); s = r; full_destroy(c, b); - } while ((n = va_arg(va, sql_column *)) != NULL); + } va_end(va); if (BATcount(s) == 1) { BATiter ri = bat_iterator(s); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 3bc9a0d53f85 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3bc9a0d53f85 Added Files: debian/libmonetdb-stream8.install sql/test/emptydb-upgrade-chain-hge/Tests/check.stable.out-noapprove sql/test/emptydb-upgrade-chain-hge/Tests/dump.stable.err-noapprove sql/test/emptydb-upgrade-chain-hge/Tests/dump.stable.out-noapprove sql/test/emptydb-upgrade-chain/Tests/check.stable.out-noapprove sql/test/emptydb-upgrade-chain/Tests/dump.stable.err-noapprove sql/test/emptydb-upgrade-chain/Tests/dump.stable.out-noapprove sql/test/emptydb-upgrade-hge/Tests/check.stable.out-noapprove sql/test/emptydb-upgrade-hge/Tests/dump.stable.err-noapprove sql/test/emptydb-upgrade-hge/Tests/dump.stable.out-noapprove sql/test/emptydb-upgrade/Tests/check.stable.out-noapprove sql/test/emptydb-upgrade/Tests/dump.stable.err-noapprove sql/test/emptydb-upgrade/Tests/dump.stable.out-noapprove sql/test/emptydb/Tests/dump.stable.err-noapprove sql/test/emptydb/Tests/dump.stable.out-noapprove Removed Files: debian/libmonetdb-stream9.install Modified Files: debian/control monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out monetdb5/mal/Tests/tst661.stable.out monetdb5/mal/Tests/tst903.stable.out monetdb5/modules/mal/Tests/call00.stable.out monetdb5/optimizer/Tests/ARexample.stable.out monetdb5/optimizer/Tests/dataflow5.stable.out monetdb5/optimizer/Tests/inlineFunction2.stable.out monetdb5/optimizer/Tests/projectionchain.stable.out monetdb5/optimizer/Tests/reorder00.stable.out monetdb5/optimizer/Tests/tst4030.stable.out sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out sql/test/BugTracker-2009/Tests/POWER_vs_prod.SF-2596114.stable.out sql/test/BugTracker-2009/Tests/explain_gives_crash.SF-2741829.stable.out sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.stable.out sql/test/BugTracker-2010/Tests/group-by_ordered_column.Bug-2564.stable.out sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128 sql/test/BugTracker-2011/Tests/func_iter_vs_bulk.Bug-2826.stable.out sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out sql/test/BugTracker-2012/Tests/day-of-month-localization.Bug-2962.stable.out sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out sql/test/BugTracker-2013/Tests/between.Bug-3259.stable.out sql/test/BugTracker-2013/Tests/between.Bug-3259.stable.out.int128 sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.out sql/test/BugTracker-2016/Tests/decimal_vs_integer.Bug-3941.stable.out sql/test/BugTracker/Tests/explain.SF-1739353.stable.out sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out sql/test/emptydb-upgrade-chain-hge/Tests/dump.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/dump.stable.out sql/test/emptydb-upgrade-hge/Tests/dump.stable.out.int128 sql/test/emptydb-upgrade/Tests/dump.stable.out sql/test/emptydb/Tests/dump.stable.out sql/test/mapi/Tests/perl_dbi.stable.out sql/test/mapi/Tests/sql_int128.stable.out sql/test/mergetables/Tests/mergequery.stable.out sql/test/remote/Tests/partition_elim.stable.out Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 331 to 300 lines): diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -42,7 +42,7 @@ Description: MonetDB development files This package contains files needed to develop extensions to the core functionality of MonetDB. -Package: libmonetdb-stream9 +Package: libmonetdb-stream8 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: MonetDB stream library @@ -57,7 +57,7 @@ Description: MonetDB stream library Package: libmonetdb-stream-dev Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, - libmonetdb-stream9 (= ${source:Version}) + libmonetdb-stream8 (= ${source:Version}) Description: MonetDB stream library development files MonetDB is a database management system that is developed from a main-memory perspective with use of a fully decomposed storage model, @@ -65,7 +65,7 @@ Description: MonetDB stream library deve accelerators. It also has an SQL frontend.
MonetDB: default - Merge with Dec2016 branch.
Changeset: ade667955950 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ade667955950 Added Files: clients/Tests/exports.stable.err-noapprove clients/Tests/malcheck.stable.err-noapprove clients/Tests/malcheck.stable.out-noapprove Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/malcheck.stable.out monetdb5/optimizer/optimizer.mal testing/Mtest.py.in Branch: default Log Message: Merge with Dec2016 branch. diffs (109 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -7942,7 +7942,6 @@ Ready. [ "mdb", "start","pattern mdb.start(clientid:int):void ", "MDBstart;","Start interactive debugger on a client"] [ "mdb", "start","pattern mdb.start(mod:str, fcn:str):void ", "MDBstartFactory;", "Start interactive debugger on a running factory" ] [ "mdb", "stop", "pattern mdb.stop():void ", "MDBstop;", "Stop the interactive debugger" ] -[ "mdb", "traceOptimizer", "command mdb.traceOptimizer(flg:str):void ","OPTsetDebugStr;", "Otherwise it is considered a request to trace the optimizers,\nwhich requires a comma separated list or pipeline name."] [ "mdb", "var", "pattern mdb.var(M:str, F:str):void ", "MDBvar3;", "Dump the symboltable of routine M.F on standard out." ] [ "mdb", "var", "pattern mdb.var():void ", "MDBvar;", "Dump the symboltable of current routine on standard out." ] [ "mkey", "bulk_rotate_xor_hash", "command mkey.bulk_rotate_xor_hash(h:bat[:lng], nbits:int, b:bat[:any_1]):bat[:lng] ", "MKEYbulk_rotate_xor_hash;","pre: h and b should be synced on head\n post: [:xor=]([:rotate=](h, nbits), [hash](b))" ] @@ -7970,7 +7969,7 @@ Ready. [ "mmath", "cbrt", "command mmath.cbrt(y:flt):flt ", "MATHunary_CBRTflt;", "" ] [ "mmath", "ceil", "command mmath.ceil(y:dbl):dbl ", "MATHunary_CEILdbl;", "The ceil(x) function rounds x upwards to the nearest integer." ] [ "mmath", "ceil", "command mmath.ceil(y:flt):flt ", "MATHunary_CEILflt;", "" ] -[ "mmath", "cnrt", "command mmath.cnrt(y:dbl):dbl ", "MATHunary_CBRTdbl;", "The cbrt(x) function returns the non-negative cube root of x." ] +[ "mmath", "cnrt", "command mmath.cnrt(y:dbl):dbl ", "MATHunary_CBRTdbl;", "The cbrt(x) function returns the cube root of x." ] [ "mmath", "cos", "command mmath.cos(x:dbl):dbl ", "MATHunary_COSdbl;","The cos(x) function returns the cosine of x, where x is given in \nradians. The return value is between -1 and 1." ] [ "mmath", "cos", "command mmath.cos(x:flt):flt ", "MATHunary_COSflt;","" ] [ "mmath", "cosh", "command mmath.cosh(x:dbl):dbl ", "MATHunary_COSHdbl;", "The cosh() function returns the hyperbolic cosine of x, which is \n\tdefined mathematically as (exp(x) + exp(-x)) / 2." ] @@ -8007,7 +8006,7 @@ Ready. [ "mmath", "sinh", "command mmath.sinh(x:dbl):dbl ", "MATHunary_SINHdbl;", "The sinh() function returns the hyperbolic sine of x, which \nis defined mathematically as (exp(x) - exp(-x)) / 2." ] [ "mmath", "sinh", "command mmath.sinh(x:flt):flt ", "MATHunary_SINHflt;", "" ] [ "mmath", "sqlrand", "command mmath.sqlrand(seed:int):int ", "MATHsqlrandint;", "initialize the rand() function with a seed and call rand()"] -[ "mmath", "sqrt", "command mmath.sqrt(y:dbl):dbl ", "MATHunary_SQRTdbl;", "The cbrt(x) function returns the non-negative cube root of x." ] +[ "mmath", "sqrt", "command mmath.sqrt(y:dbl):dbl ", "MATHunary_SQRTdbl;", "The sqrt(x) function returns the non-negative root of x." ] [ "mmath", "sqrt", "command mmath.sqrt(y:flt):flt ", "MATHunary_SQRTflt;", "" ] [ "mmath", "srand","command mmath.srand(seed:int):void ", "MATHsrandint;","initialize the rand() function with a seed"] [ "mmath", "tan", "command mmath.tan(x:dbl):dbl ", "MATHunary_TANdbl;","The tan(x) function returns the tangent of x,\n where x is given in radians"] diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -10303,7 +10303,6 @@ Ready. [ "mdb", "start","pattern mdb.start(clientid:int):void ", "MDBstart;","Start interactive debugger on a client"] [ "mdb", "start","pattern mdb.start(mod:str, fcn:str):void ", "MDBstartFactory;", "Start intera
MonetDB: default - Merge with Dec2016 branch.
Changeset: 9d02dfed3b98 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9d02dfed3b98 Modified Files: .hgtags MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch. diffs (8 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -643,3 +643,4 @@ 293b452cd1e5964d820f7d6c538e06507e575d88 0027cb04877b7687f45277a81a25253a63e9f21f Dec2016_root ea0fe76e0095771bccca626b39e3e839a90ba320 Dec2016_1 ea0fe76e0095771bccca626b39e3e839a90ba320 Dec2016_release +deeebb69952f76e3377664bb97997885b283f9d1 fix-bad-merge ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: 29841dfa44ad for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=29841dfa44ad Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: 67e4fa30f848 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=67e4fa30f848 Added Files: debian/libmonetdb-stream9.install debian/libmonetdb14.install Removed Files: ChangeLog.Jun2016 buildtools/ChangeLog.Jun2016 clients/ChangeLog.Jun2016 clients/mapilib/ChangeLog.Jun2016 common/stream/ChangeLog.Jun2016 debian/libmonetdb-stream8.install debian/libmonetdb13.install gdk/ChangeLog.Jun2016 geom/ChangeLog.Jun2016 monetdb5/ChangeLog.Jun2016 sql/ChangeLog.Jun2016 testing/ChangeLog.Jun2016 tools/merovingian/ChangeLog.Jun2016 Modified Files: .hgtags ChangeLog-Archive ChangeLog.Dec2016 MonetDB.spec buildtools/ChangeLog-Archive buildtools/ChangeLog.Dec2016 debian/changelog debian/control gdk/ChangeLog-Archive gdk/ChangeLog.Dec2016 libversions monetdb5/ChangeLog-Archive monetdb5/ChangeLog.Dec2016 sql/ChangeLog-Archive sql/ChangeLog.Dec2016 Branch: default Log Message: Merge with Dec2016 branch. diffs (truncated from 962 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -641,3 +641,5 @@ 293b452cd1e5964d820f7d6c538e06507e575d88 f16cdfed96bdc0f3324f8ced85a8b74c67f4dc9b Jun2016_SP2_release 293b452cd1e5964d820f7d6c538e06507e575d88 Jun2016_SP2_release 0027cb04877b7687f45277a81a25253a63e9f21f Dec2016_root +ea0fe76e0095771bccca626b39e3e839a90ba320 Dec2016_1 +ea0fe76e0095771bccca626b39e3e839a90ba320 Dec2016_release diff --git a/ChangeLog-Archive b/ChangeLog-Archive --- a/ChangeLog-Archive +++ b/ChangeLog-Archive @@ -1,6 +1,16 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past ChangeLog entries +* Thu Sep 22 2016 Sjoerd Mullender - 11.25.1-20161214 +- The Perl, PHP, and Python clients, and the JDBC driver each now have + their own repositories and release cycles. The Python client is + maintained by Gijs Molenaar on Github + (https://github.com/gijzelaerr/pymonetdb), the other clients are + maintained by CWI/MonetDB on our own server + (https://dev.monetdb.org/hg/monetdb-java, + https://dev.monetdb.org/hg/monetdb-perl, + https://dev.monetdb.org/hg/monetdb-php). + * Fri Jul 1 2016 Sjoerd Mullender - 11.23.5-20160704 - Lots of memory leaks have been plugged across the whole system. diff --git a/ChangeLog.Dec2016 b/ChangeLog.Dec2016 --- a/ChangeLog.Dec2016 +++ b/ChangeLog.Dec2016 @@ -1,13 +1,3 @@ # ChangeLog file for devel # This file is updated with Maddlog -* Thu Sep 22 2016 Sjoerd Mullender -- The Perl, PHP, and Python clients, and the JDBC driver each now have - their own repositories and release cycles. The Python client is - maintained by Gijs Molenaar on Github - (https://github.com/gijzelaerr/pymonetdb), the other clients are - maintained by CWI/MonetDB on our own server - (https://dev.monetdb.org/hg/monetdb-java, - https://dev.monetdb.org/hg/monetdb-perl, - https://dev.monetdb.org/hg/monetdb-php). - diff --git a/ChangeLog.Jun2016 b/ChangeLog.Jun2016 deleted file mode 100644 --- a/ChangeLog.Jun2016 +++ /dev/null @@ -1,3 +0,0 @@ -# ChangeLog file for candidate -# This file is updated with Maddlog - diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -124,7 +124,7 @@ Vendor: MonetDB BV Group: Applications/Databases License: MPLv2.0 URL: http://www.monetdb.org/ -Source: http://dev.monetdb.org/downloads/sources/Jun2016-SP2/%{name}-%{version}.tar.bz2 +Source: http://dev.monetdb.org/downloads/sources/Dec2016/%{name}-%{version}.tar.bz2 # we need systemd for the _unitdir macro to exist %if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7 @@ -955,6 +955,182 @@ rm -f %{buildroot}%{_bindir}/Maddlog %postun -p /sbin/ldconfig %changelog +* Wed Dec 14 2016 Panagiotis Koutsourakis - 11.25.1-20161214 +- Rebuilt. +- BZ#3357: Implement setQueryTimeout() +- BZ#3445: Add support for database name to dotmonetdb file +- BZ#3973: JDBC hangs +- BZ#3976: Performance enhancement to LIKE without wildcards +- BZ#4005: Correlated update causes incorrect null constraint violation +- BZ#4016: merge table only optimises for point query +- BZ#4040: sys.storage call can take a long time +- BZ#4047: Segfault when updating a dropped table +- BZ#4050: Database corruption when running low on inode +- BZ#4057: missing bulk operations between constant and bat +- BZ#4061: SIGSEGV in candscan_lng +- BZ#4066: Deadlocked monetdbd +- BZ#6068: Error message about incompatible BBP version should be clearer +- BZ#6069: query with union all silently crashes +- BZ#6070: setting negative session query timeout should not be + possible/allowed +- BZ#6071: where clause with cast and floor fails to sigsegv +- BZ#6072: Bind to UPD delta column does not get/show type information + in EXPLAIN +- BZ#6073: Missing type information for constants in MAL explain +- BZ#6074: SET ROLE com
MonetDB: default - Merge with Dec2016 branch, not changing any f...
Changeset: c4ac21c01b0f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c4ac21c01b0f Modified Files: MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Dec2016 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch.
Changeset: dbb14e8bfafa for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dbb14e8bfafa Modified Files: gdk/gdk_bbp.c Branch: default Log Message: Merge with Dec2016 branch. diffs (12 lines): diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -1154,7 +1154,7 @@ BBPreadEntries(FILE *fp, int oidsize, in needcommit = 1; } } - if (bbpversion <= GDKLIBRARY && + if (bbpversion <= GDKLIBRARY_NOKEY && (bn->tnokey[0] != 0 || bn->tnokey[1] != 0)) { /* we don't trust the nokey values */ bn->tnokey[0] = bn->tnokey[1] = 0; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Dec2016 branch, skipping over bad ...
Changeset: 028584c8adda for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=028584c8adda 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 buildtools/autogen/autogen/msc.py clients/R/Tests/All clients/R/Tests/dbi.stable.err clients/R/Tests/deps-install.R clients/R/Tests/deps-test.R clients/R/Tests/install.R clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/SQL-dump.stable.out clients/Tests/SQL-dump.stable.out.int128 clients/Tests/exports.stable.out clients/examples/C/Makefile.ag clients/mapiclient/Makefile.ag clients/mapiclient/dump.c clients/mapiclient/mclient.c clients/mapiclient/msqldump.h clients/mapiclient/tomograph.c clients/mapilib/mapi.c clients/mapilib/mapi.h clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag debian/monetdb-client-testing.install gdk/gdk.h gdk/gdk_align.c gdk/gdk_atoms.c gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_bbp.c gdk/gdk_delta.c gdk/gdk_group.c gdk/gdk_logger.c gdk/gdk_orderidx.c gdk/gdk_private.h gdk/gdk_ssort_impl.h gdk/gdk_storage.c gdk/gdk_unique.c gdk/gdk_utils.c gdk/gdk_utils.h gdk/libbat.rc monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out monetdb5/extras/mal_optimizer_template/opt_sql_append.c monetdb5/extras/rapi/Tests/rapi08.malC monetdb5/mal/Tests/dataflow01.malC monetdb5/mal/Tests/performanceTests/join.malC monetdb5/mal/Tests/selecttest.malC monetdb5/mal/Tests/tst005.stable.out monetdb5/mal/Tests/tst006.stable.out monetdb5/mal/Tests/tst019.stable.err monetdb5/mal/Tests/tst023.malC monetdb5/mal/Tests/tst027.stable.err monetdb5/mal/Tests/tst033.malC monetdb5/mal/Tests/tst034.malC monetdb5/mal/Tests/tst038.stable.err monetdb5/mal/Tests/tst070.stable.err monetdb5/mal/Tests/tst071.stable.err monetdb5/mal/Tests/tst077.stable.out monetdb5/mal/Tests/tst1002.stable.out monetdb5/mal/Tests/tst102.stable.err monetdb5/mal/Tests/tst1500.malC monetdb5/mal/Tests/tst1502.malC monetdb5/mal/Tests/tst1503.malC monetdb5/mal/Tests/tst1602.malC monetdb5/mal/Tests/tst163.stable.err monetdb5/mal/Tests/tst200.malC monetdb5/mal/Tests/tst201.malC monetdb5/mal/Tests/tst220.malC monetdb5/mal/Tests/tst233.malC monetdb5/mal/Tests/tst234.malC monetdb5/mal/Tests/tst235.malC monetdb5/mal/Tests/tst272.malC monetdb5/mal/Tests/tst275.malC monetdb5/mal/Tests/tst275.stable.out monetdb5/mal/Tests/tst285.malC monetdb5/mal/Tests/tst303.stable.out monetdb5/mal/Tests/tst400.stable.out monetdb5/mal/Tests/tst401.stable.out monetdb5/mal/Tests/tst661.stable.out monetdb5/mal/Tests/tst662.stable.out monetdb5/mal/Tests/tst755.stable.err monetdb5/mal/Tests/tst760.stable.err monetdb5/mal/Tests/tst810.stable.out monetdb5/mal/Tests/tst819.stable.out monetdb5/mal/Tests/tst830.stable.out monetdb5/mal/Tests/tst840.stable.out monetdb5/mal/Tests/tst850.stable.out monetdb5/mal/Tests/tst866.stable.out monetdb5/mal/Tests/tst870.stable.out monetdb5/mal/Tests/tst880.stable.out monetdb5/mal/Tests/tst890.stable.out monetdb5/mal/Tests/tst901.stable.out monetdb5/mal/Tests/tst901a.stable.out monetdb5/mal/Tests/tst902.stable.out monetdb5/mal/Tests/tst903.malC monetdb5/mal/Tests/tst903.stable.out monetdb5/mal/Tests/tst904.stable.out monetdb5/mal/Tests/tst906.stable.out monetdb5/mal/Tests/tst907.stable.out monetdb5/mal/Tests/tst908.stable.out monetdb5/mal/Tests/tst911.malC monetdb5/mal/Tests/tst911.stable.out monetdb5/mal/Tests/tst912.malC monetdb5/mal/Tests/tst913.stable.out monetdb5/mal/Tests/tst920.stable.out monetdb5/mal/Tests/tst960.stable.out monetdb5/mal/mal.c 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_listi