Changeset: 9acc44725036 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9acc44725036 Modified Files: sql/server/rel_select.c Branch: typing Log Message:
Merged with Oct2020 diffs (truncated from 1014 to 300 lines): diff --git a/ChangeLog.Oct2020 b/ChangeLog.Oct2020 --- a/ChangeLog.Oct2020 +++ b/ChangeLog.Oct2020 @@ -1,6 +1,22 @@ # ChangeLog file for devel # This file is updated with Maddlog +* Mon Aug 10 2020 Ying Zhang <y.zh...@cwi.nl> +- Finished a first version of the new monitoring function + user_statistics(), which is only intended for the DBAs. + For each database user who has logged in during the current mserver5 + session, it returns + "username": login name of the database user, + "querycount": the number of queries this user has executed since his/her + first login, + "totalticks": the total execution time (in microsecond) of the queries ran + by this user, + "maxquery": the query with the longest execution time (if two queries have + the same execution time, the newer overwrites the older), + "maxticks": the execution time of the 'maxquery' (in microsecond), + "started": the start timestamp of the 'maxquery', + "finished": the finish timestamp of the 'maxquery'. + * Wed Jun 10 2020 Sjoerd Mullender <sjo...@acm.org> - Removed support for LiDAR data, that is the SQL procedures sys.lidarattach, sys.lidarload, and sys.lidarexport. diff --git a/ChangeLog.userstats b/ChangeLog.userstats deleted file mode 100644 --- a/ChangeLog.userstats +++ /dev/null @@ -1,19 +0,0 @@ -# ChangeLog file for userstats -# This file is updated with Maddlog - -* Mon Aug 10 2020 Ying Zhang <y.zh...@cwi.nl> -- Finished a first version of the new monitoring function - user_statistics(), which is only intended for the DBAs. - For each database user who has logged in during the current mserver5 - session, it returns - "username": login name of the database user, - "querycount": the number of queries this user has executed since his/her - first login, - "totalticks": the total execution time (in microsecond) of the queries ran - by this user, - "maxquery": the query with the longest execution time (if two queries have - the same execution time, the newer overwrites the older), - "maxticks": the execution time of the 'maxquery' (in microsecond), - "started": the start timestamp of the 'maxquery', - "finished": the finish timestamp of the 'maxquery'. - diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -762,6 +762,11 @@ fi %setup -q %build +%if (0%{?fedora} >= 33) +# on Fedora 33 we get a crash of the compiler when using -flto, so disable it +CFLAGS="${CFLAGS:-%optflags} -fno-lto" +export CFLAGS +%endif %cmake3 \ -DRELEASE_VERSION=ON \ -DASSERT=OFF \ diff --git a/README.rst b/README.rst --- a/README.rst +++ b/README.rst @@ -8,12 +8,13 @@ shifted to the spin-off company `MonetDB Via the MonetDB project we have brought the MonetDB system in open source, where it is accessible at https://www.monetdb.org/Downloads/. Even though development happens mostly in a company, the MonetDB -database system will remain open source. +database system will remain open source. It is available under the +`Mozilla Public License 2.0`__. 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. +once an hour. .. _CWI: https://www.cwi.nl/ __ CWI_ @@ -24,19 +25,108 @@ once a day. .. _solutions: https://www.monetdbsolutions.com __ solutions_ +.. _mpl: http://mozilla.org/MPL/2.0/ +__ mpl_ + .. _MonetDB: https://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 `build.rst`__. +Building +-------- + +MonetDB is built using the ``cmake`` program. It is recommended to +build in a directory that is not inside the source tree. In order to +build, use the following commands when inside your build directory:: + + cmake [options] /path/to/monetdb/source + cmake --build . + cmake --build . --target install + +In order to install into a different directory than the default +``/usr/local``, add the option ``-DCMAKE_INSTALL_PREFIX``:: + + cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/monetdb /path/to/monetdb/source + cmake --build . + cmake --build . --target install + +Build Options +............. + +There are many options that can be used to select how MonetDB is to be +built. Options can be turned ``ON`` or ``OFF`` using a ``-D`` flag on +the first of the ``cmake`` command lines. Except when specified +otherwise, options are ``ON`` when the relevant libraries can be found. +Available options are: -__ documentation/source/build.rst +============== =============================================================================================== +Option Explanation +============== =============================================================================================== +ASSERT Enable asserts (default=ON for development sources, OFF for tarball installation) +CINTEGRATION Enable support for C UDFs (default=ON except on Windows) +CMAKE_SUMMARY Show a summary of the cmake configuration (for debug purposes, default=OFF) +CMAKE_UNITTEST Build and run the unittest for the build system (default=OFF) +FITS Enable support for FITS +GEOM Enable support for geom module +INT128 Enable support for 128-bit integers +NETCDF Enable support for netcdf +ODBC Compile the MonetDB ODBC driver +PY3INTEGRATION Enable support for Python 3 integration into MonetDB +RINTEGRATION Enable support for R integration into MonetDB +SANITIZER Enable support for the GCC address sanitizer (default=OFF) +SHP Enable support for ESRI Shapefiles +STRICT Enable strict compiler flags (default=ON for development sources, OFF for tarball installation) +TESTING Enable support for testing +WITH_BZ2 Include bz2 support +WITH_CMOCKA Include cmocka support (default=OFF) +WITH_CRYPTO Only in very some special cases we build without crypto dependencies +WITH_CURL Include curl support +WITH_LZMA Include lzma support +WITH_PCRE Include pcre support +WITH_PROJ Include proj support +WITH_READLINE Include readline support +WITH_UUID Include uuid support +WITH_VALGRIND Include valgrind support +WITH_XML2 Include xml2 support +WITH_ZLIB Include zlib support +============== =============================================================================================== + +Required packages +................. + +On Fedora, the following packages are required: +``bison``, ``cmake``, ``gcc``, ``openssl-devel``, ``pkgconf``, +``python3``. + +The following packages are optional but recommended: +``bzip2-devel``, ``libuuid-devel``, ``pcre-devel``, ``readline-devel``, +``xz-devel``, ``zlib-devel``. + +The following packages are optional: +``cfitsio-devel``, ``geos-devel``, ``libcurl-devel``, ``libxml2-devel``, +``python3-devel``, ``python3-numpy``, ``R-core-devel``, +``unixODBC-devel``. + +On Ubuntu and Debian the following packages are required: +``bison``, ``cmake``, ``gcc``, ``libssl-dev``, ``pkg-config``, +``python3``. + +The following packages are optional but recommended: +``libbz2-dev``, ``uuid-dev``, ``libpcre3-dev``, ``libreadline-dev``, +``liblzma-dev``, ``zlib1g-dev``. + +The following packages are optional: +``libcfitsio-dev``, ``libgeos-dev``, ``libcurl4-gnutls-dev``, +``libxml2-dev``, ``python3-dev``, ``python3-numpy``, ``r-base-dev``, +``unixodbc-dev``. + +``cmake`` must be at least version 3.12, ``python`` must be at least +version 3.5. Bugs -==== +---- We of course hope there aren't any, but if you do find one, you can report bugs in our `bugzilla`__ instance. diff --git a/buildtools/conf/CMakeLists.txt b/buildtools/conf/CMakeLists.txt --- a/buildtools/conf/CMakeLists.txt +++ b/buildtools/conf/CMakeLists.txt @@ -16,4 +16,11 @@ if(WIN32) COMPONENT server) endif() +if(DEVELOPMENT AND NOT WIN32) + install(FILES + Maddlog + PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT} + DESTINATION ${CMAKE_INSTALL_BINDIR}) +endif() + # vim: set ts=2:sw=2:et diff --git a/ctest/tools/monetdbe/CMakeLists.txt b/ctest/tools/monetdbe/CMakeLists.txt --- a/ctest/tools/monetdbe/CMakeLists.txt +++ b/ctest/tools/monetdbe/CMakeLists.txt @@ -18,7 +18,7 @@ target_link_libraries(example2 PRIVATE monetdb_config_header monetdbe) -#add_test(run_example2 example2) +add_test(run_example2 example2) add_executable(example_temporal example_temporal.c) target_link_libraries(example_temporal diff --git a/monetdb5/optimizer/opt_generator.c b/monetdb5/optimizer/opt_generator.c --- a/monetdb5/optimizer/opt_generator.c +++ b/monetdb5/optimizer/opt_generator.c @@ -71,14 +71,11 @@ OPTgeneratorImplementation(Client cntxt, char buf[256]; lng usec= GDKusec(); str msg = MAL_SUCCEED; + int needed = 0; - (void) cntxt; (void) stk; (void) pci; - series = (InstrPtr*) GDKzalloc(sizeof(InstrPtr) * mb->vtop); - if(series == NULL) - throw(MAL,"optimizer.generator", SQLSTATE(HY013) MAL_MALLOC_FAIL); old = mb->stmt; limit = mb->stop; slimit = mb->ssize; @@ -87,12 +84,16 @@ OPTgeneratorImplementation(Client cntxt, for( i=0; i < limit; i++){ p = old[i]; if ( getModuleId(p) == generatorRef && getFunctionId(p) == seriesRef) - break; + needed = 1; + if (p->token == RETURNsymbol || p->barrier == RETURNsymbol) + return 0; } - if (i == limit) { - GDKfree(series); + if (!needed) return 0; - } + + series = (InstrPtr*) GDKzalloc(sizeof(InstrPtr) * mb->vtop); + if(series == NULL) + throw(MAL,"optimizer.generator", SQLSTATE(HY013) MAL_MALLOC_FAIL); if (newMalBlkStmt(mb, mb->ssize) < 0) { GDKfree(series); 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 @@ -189,7 +189,7 @@ checkSQLContext(Client cntxt) return MAL_SUCCEED; } -static str +str getBackendContext(Client cntxt, backend **be) { str msg; @@ -4081,7 +4081,7 @@ vacuum(Client cntxt, MalBlkPtr mb, MalSt if (t->system) throw(SQL, name, SQLSTATE(42000) "%s not allowed on system tables", name + 4); if (!isTable(t)) - throw(SQL, name, SQLSTATE(42000) "%s: %s '%s' is not persistent", name + 4, + throw(SQL, name, SQLSTATE(42000) "%s: %s '%s' is not persistent", name + 4, TABLE_TYPE_DESCRIPTION(t->type, t->properties), t->base.name); if (has_snapshots(m->session->tr)) diff --git a/sql/backends/monet5/sql.h b/sql/backends/monet5/sql.h --- a/sql/backends/monet5/sql.h +++ b/sql/backends/monet5/sql.h @@ -286,4 +286,6 @@ sql5_export str SQLsession_prepared_stat sql5_export str SQLunionfunc(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); +sql5_export str getBackendContext(Client cntxt, backend **be); + #endif /* _SQL_H */ 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 @@ -480,32 +480,24 @@ stmt_varnr(backend *be, int nr, sql_subt stmt * _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list