Hi all,
Since I'm no longer really in the loop with MonetDB, I was wondering
what the state of the default branch is supposed to be. I just fixed a
configure error and now hit a redeclaration problem regarding gdk.h and
gdk_private.h. gdk_batop.c includes both headers so it seems like a
valid complaint to me. Is OSX still a supported platform, these days?
I guess there is little to no point in supporting it.
Fabian
The MonetDB team at CWI/MonetDB BV is pleased to announce the
Jan2014 feature release of the MonetDB suite of programs.
More information about MonetDB can be found on our website at
<http://www.monetdb.org/>.
For details on this release, please see the release notes at
<http://www.monetdb.org/Downloads/ReleaseNotes>.
As usual, the download location is <http://dev.monetdb.org/downloads/>.
Jan 2014 feature release
Build Environment
* Created development packages for RPM based systems and
Debian/Ubuntu containing the files needed to create extensions to
the SQL front end.
* Removed Mx, the literate programming tool. All code for the server
is now pure C.
* Created packages for RPM based systems and Debian/Ubunty containing
the MonetDB interface to the GNU Scientific Library (gsl).
* We no longer install the .la files in our Fedora/Debian/Ubuntu
packages.
Client Package
* ODBC: Implemented {fn scalar()} and {interval ...} escapes.
python2
* Changed defaults for connecting (defaults to unix socket now).
* Unix sockets partially working for control protocol.
* Add support for unix socket.
python3
* Changed defaults for connecting (defaults to unix socket now).
* Unix sockets partially working for control protocol.
* Add support for unix socket.
R
* The R connector is now distributed in the source code packages.
MonetDB Common
* The join code has been completely rewritten. It now optionally uses
candidate lists, like the select code that was introduced in the
previous release.
* A new indexing structure for range selections on unsorted data has
been added.
* The vmtrim thread is no longer started by default on 64 bit
architectures. The vmtrim thread monitors memory usage and drops
BATs from memory when memory gets tight. However, in the age of
large address spaces and virtual memory, the kernel does a good
enough job. And in addition to dropping BATs, the thread also
destroyed indexing structures which would have to be recreated the
next time they were needed.
* Cleaned up some of the parameters dealing with memory usage.
* If available on the system, we now use atomic instructions for
latching.
* Removed some unused fields in the atomDesc structure. This change
requires a complete recompilation of the whole suite.
* Replaced the mutex implementation for both GNU C and Visual Studio
with a home-grown implementation that uses atomic instructions
(__sync_*() in gcc, _Interlocked*() in VS).
SQL
* Added support for quantiles (generalization of median). Usage:
SELECT quantile(column_name,0.25) FROM table_name; The value should
be in the range 0..1.
Bug Fixes
* 3040: Wrong NULL behavior in EXCEPT and INTERSECT
* 3092: ODBC client doesn't support scalar function escape
* 3198: SIGSEGV insert_string_bat (b=0x7fffe419d0a0,
n=0x7fffc4006010, append=0) at gdk_batop.c:196
* 3210: Unexpected concurrency conflict when inserting to 2 tables
simultaneously and querying one of them
* 3273: Add support to Python DBAPI package for timetz, inet and url
types
* 3285: no such table 'queryHistory'
* 3298: GDKmmap messages and monetdb start db takes very long
* 3354: Introduce query time-out
* 3371: (i)like generates batloop instead of algebra.likesubselect
* 3372: Large group by queries never complete - server at 100%
cpu(all cores) until MonetDB stopped
* 3383: Bad performance with DISTINCT GROUP BY
* 3391: Bad performance with GROUP BY and FK with out aggregate
function
* 3393: "COPY .. INTO ..." - escape of string quotes
* 3399: server crashed on simple (malformed) query
* 3401: inconsistent/strange handling of invalid dates (e.g.
2013-02-29) in where clause
* 3403: NOT NULL constraint can't be applied after deleting rows with
null values
* 3404: Assertion `h->storage == STORE_MMAP' failed.
* 3408: nested concat query crashed server
* 3411: (disguised) BETWEEN clause not recognised. Hence no
rangejoin.
* 3412: Boolean expressions in WHERE clause, result in incorrect
resulsts
* 3417: Nested Common Table Expressions Crash
* 3418: Segmentation fault on a query from table expression
* 3419: Database does not start after upgrade
* 3420: Database does not start after upgrade
* 3423: Group by alias with distinct count doesn't work
* 3425: Temporal extraction glitches
* 3427: Consistent use of current_timestamp and now()
* 3428: Aggregation over two columns is broken
* 3429: SAMPLE on JOIN result crashes server
* 3430: Wrong temporary handling
* 3431: SQLGetInfo returns incorrect value for SQL_FN_NUM_TRUNCATE
* 3432: MonetDB SQL syntax incompatible with SQL-92 <delimited
identifier> syntax
* 3435: INDEX prevents JOIN from discovering matches
* 3436: COPY INTO from file containing leading Byte Order Mark (BOM)
causes corruption
Fabian,
when configured with --enable-strict, this fail to compile on my Fedora 20 desktop:
.../MonetDB/tools/merovingian/daemon/controlrunner.c: In function ‘ctl_handle_client’:
.../MonetDB/tools/merovingian/daemon/controlrunner.c:387:13: error: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Werror=unused-result]
chdir(q);
^
cc1: all warnings being treated as errors
I could not fix it quickly (i.e., checking and handling the return value of chdir()),
as I could not quickly grasp how to do proper error/exception handling in this case ...
Would be great, if you could have a look at it.
Thanks!
Stefan
----- Original Message -----
> Changeset: 6177dd32ac5d for MonetDB
> URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6177dd32ac5d
> Modified Files:
> tools/merovingian/ChangeLog.Jan2014
> tools/merovingian/client/monetdb.1
> tools/merovingian/client/monetdb.c
> tools/merovingian/daemon/Makefile.ag
> tools/merovingian/daemon/controlrunner.c
> Branch: Jan2014
> Log Message:
>
> monetdb: allow databases to be created with a password for monetdb user
>
> Creating a database with a custom password for the monetdb user makes it
> safer than when created with default/well-known credentials, hence it is
> not necessary to lock the database after creation.
>
>
> diffs (190 lines):
>
> diff --git a/tools/merovingian/ChangeLog.Jan2014
> b/tools/merovingian/ChangeLog.Jan2014
> --- a/tools/merovingian/ChangeLog.Jan2014
> +++ b/tools/merovingian/ChangeLog.Jan2014
> @@ -2,5 +2,7 @@
> # This file is updated with mchangelog
>
> * Sun Feb 16 2014 Fabian Groffen <fabian(a)monetdb.org>
> +- monetdb create: add -p flag to set monetdb user password on creation,
> + and therefore allow creating the database in unlocked state
> - monetdb destroy -f now also works on running databases
>
> diff --git a/tools/merovingian/client/monetdb.1
> b/tools/merovingian/client/monetdb.1
> --- a/tools/merovingian/client/monetdb.1
> +++ b/tools/merovingian/client/monetdb.1
> @@ -52,12 +52,14 @@ stopping a database inside the MonetDB D
> For all commands, database arguments can be glob-like expressions.
> This allows to do wildcard matches. For details on the syntax, see
> .IR EXPRESSIONS .
> -.IP "create [\-m pattern] database [database ...]"
> +.IP "create [\-m pattern] [\-p password] database [database ...]"
> Initialises a new database in the MonetDB Database Server. A database
> created with this command makes it available under its database name,
> but not yet for use by clients, as the database is put into maintenance
> mode. This allows the database administrator to perform initialisation
> -steps before releasing it to users. See also
> +steps before releasing it to users, unless the
> +.I \-p
> +argument is supplied. See also
> .BR "monetdb lock" .
> The name of the database must match the expression [A\-Za\-z0\-9\-_]+.
> .IP " \-m pattern"
> @@ -74,6 +76,14 @@ or discovery. Each parallel target for
> sequence, separated by commas. Here the pattern is an ordinary pattern
> as would be used for connecting to a database, and can hence also be
> just the name of a database.
> +.IP " \-p password"
> +The
> +.I \-p
> +flag allows to create a database with the given password for the monetdb
> +user. Since this protects the database from being accessed via
> +well-known credentials, the created database is not locked after
> +creation. This way, a new database can be created and used right away
> +using the password supplied.
> .IP "destroy [\-f] database [database ...]"
> Removes the given database, including all its data and logfiles. Once
> destroy has completed, all data is lost. Be careful when using this
> diff --git a/tools/merovingian/client/monetdb.c
> b/tools/merovingian/client/monetdb.c
> --- a/tools/merovingian/client/monetdb.c
> +++ b/tools/merovingian/client/monetdb.c
> @@ -1435,6 +1435,7 @@ command_create(int argc, char *argv[])
> {
> int i;
> char *mfunnel = NULL;
> + char *password = NULL;
> sabdb *orig = NULL;
> sabdb *stats = NULL;
>
> @@ -1464,6 +1465,19 @@ command_create(int argc, char *argv[])
> command_help(2, &argv[-1]);
> exit(1);
> }
> + } else if (argv[i][1] == 'p') {
> + if (argv[i][2] != '\0') {
> + password = &argv[i][2];
> + argv[i] = NULL;
> + } else if (i + 1 < argc && argv[i + 1][0] != '-') {
> + argv[i] = NULL;
> + password = argv[++i];
> + argv[i] = NULL;
> + } else {
> + fprintf(stderr, "create: -p needs an argument\n");
> + command_help(2, &argv[-1]);
> + exit(1);
> + }
> } else {
> fprintf(stderr, "create: unknown option: %s\n", argv[i]);
> command_help(argc + 1, &argv[-1]);
> @@ -1492,6 +1506,13 @@ command_create(int argc, char *argv[])
> simple_argv_cmd(argv[0], orig, cmd,
> "created multiplex-funnel in maintenance mode", NULL);
> free(cmd);
> + } else if (password != NULL) {
> + size_t len = strlen("create password=") + strlen(password) + 1;
> + char *cmd = malloc(len);
> + snprintf(cmd, len, "create password=%s", password);
> + simple_argv_cmd(argv[0], orig, cmd,
> + "created database with password for monetdb user", NULL);
> + free(cmd);
> } else {
> simple_argv_cmd(argv[0], orig, "create",
> "created database in maintenance mode", NULL);
> diff --git a/tools/merovingian/daemon/Makefile.ag
> b/tools/merovingian/daemon/Makefile.ag
> --- a/tools/merovingian/daemon/Makefile.ag
> +++ b/tools/merovingian/daemon/Makefile.ag
> @@ -27,7 +27,10 @@ monetdb_var_dbfarm_DATA = .merovingian_p
> INCLUDES = .. \
> ../../../common/stream \
> ../../../common/utils \
> + ../../../common/options \
> ../../../clients/mapilib \
> + ../../../gdk \
> + ../../../monetdb5/mal \
> $(MSGCONTROL_FLAGS)
>
> EXTRA_DIST = $(man_MANS) .merovingian_properties
> @@ -54,6 +57,8 @@ bin_monetdbd = {
> ../../../common/utils/libmsabaoth \
> ../../../common/utils/libmuuid \
> ../../../common/utils/libmutils \
> + ../../../monetdb5/tools/libmonetdb5 \
> + ../../../gdk/libbat \
> $(UUID_LIBS) \
> $(curl_LIBS) \
> $(SOCKET_LIBS) \
> diff --git a/tools/merovingian/daemon/controlrunner.c
> b/tools/merovingian/daemon/controlrunner.c
> --- a/tools/merovingian/daemon/controlrunner.c
> +++ b/tools/merovingian/daemon/controlrunner.c
> @@ -40,6 +40,10 @@
> #include <utils/database.h>
> #include <utils/control.h>
>
> +#include "gdk.h" /* these three for creation of dbs with password */
> +#include "gdk_private.h"
> +#include "mal_authorize.h"
> +
> #include "merovingian.h"
> #include "discoveryrunner.h" /* broadcast, remotedb */
> #include "forkmserver.h"
> @@ -353,8 +357,15 @@ static void ctl_handle_client(
> "database is not running: %s\n", q);
> send_client("!");
> }
> - } else if (strcmp(p, "create") == 0) {
> - err e = db_create(q);
> + } else if (strcmp(p, "create") == 0 ||
> + strncmp(p, "create password=", strlen("create password=")) == 0) {
> + err e;
> +
> + p += strlen("create");
> + if (*p == ' ')
> + p += strlen(" password=");
> +
> + e = db_create(q);
> if (e != NO_ERR) {
> Mfprintf(_mero_ctlerr, "%s: failed to create "
> "database '%s': %s\n", origin, q, getErrMsg(e));
> @@ -363,6 +374,43 @@ static void ctl_handle_client(
> send_client("!");
> free(e);
> } else {
> + if (*p != '\0') {
> + pid_t child;
> + if ((child = fork()) == 0) {
> + FILE *secretf;
> + size_t len;
> + char *err;
> + char *vaultkey;
> +
> + /* the child, pollute scope by loading BBP */
> + chdir(q);
> +
> + buf2[0] = '\0';
> + if ((secretf = fopen(".vaultkey", "r")) != NULL) {
> + len = fread(buf2, 1, sizeof(buf2), secretf);
> + buf2[len] = '\0';
> + len = strlen(buf2); /* secret can contain null-bytes */
> + fclose(secretf);
> + }
> + BBPinit();
> + vaultkey = buf2;
> + AUTHunlockVault(&vaultkey);
> + err = AUTHinitTables(&p);
> + if (err != NULL) {
> + Mfprintf(_mero_ctlerr, "%s: could not setup "
> + "database '%s': %s\n", origin, q, err);
> + } else {
> + /* don't start locked */
> + unlink(".maintenance");
> + }
> +
> + exit(0); /* return to the parent */
> + } else {
> + /* wait for the child to finish */
> + waitpid(child, NULL, 0);
> + }
> + }
> +
> Mfprintf(_mero_ctlout, "%s: created database '%s'\n",
> origin, q);
> len = snprintf(buf2, sizeof(buf2), "OK\n");
> _______________________________________________
> checkin-list mailing list
> checkin-list(a)monetdb.org
> https://www.monetdb.org/mailman/listinfo/checkin-list
>
--
| Stefan.Manegold(a)CWI.nl | DB Architectures (DA) |
| www.CWI.nl/~manegold/ | Science Park 123 (L321) |
| +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The MonetDB team at CWI/MonetDB BV is pleased to announce a new
release candidate for the upcoming Jan2014 feature release.
Many things have changed in this release compared to the previous
(Feb2013) release (that's why it took so long). For a smooth upgrade I
would urge you to try out this release candidate and to provide feedback
on our bug tracker (http://bugs.monetdb.org).
A number of bugs in the previous release candidate have been fixed.
We hope that this release candidate is good enough to be the new
release, but we will give it a few more days.
The release candidate can be found at
http://dev.monetdb.org/downloads/testing.
- --
Sjoerd Mullender
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQCVAwUBUviUtz7g04AjvIQpAQJy5wQArulRMgV7YWX1NoOJMoSSKINjEQLeneZC
vj4NqMJ0igxYMRxqBLd7EcSfLKvgDR3ElmP7HhDkXbmCDk6POD4PjxPRmh66AEwY
uYBhT3iIEe01PFzqjMhWm2HnDnfDOTzvn8Ai4n1/qCIVmW0p14kIYOkTRXWiNX5o
tcGfy384cx8=
=2un1
-----END PGP SIGNATURE-----