Changeset: 4b6c683a077b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4b6c683a077b Modified Files: clients/Tests/exports.stable.out configure.ag gdk/gdk_group.c monetdb5/mal/mal_authorize.c monetdb5/mal/mal_authorize.h sql/backends/monet5/embeddedclient.c.in tools/merovingian/ChangeLog.Jan2014 tools/merovingian/client/monetdb.1 tools/merovingian/client/monetdb.c tools/merovingian/daemon/Makefile.ag tools/merovingian/daemon/controlrunner.c tools/mserver/mserver5.c Branch: int128 Log Message:
Merge with Jan2014 branch. diffs (146 lines): diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -553,14 +553,16 @@ yes-*-*) MCHECK_ADD_FLAG([-Wmissing-include-dirs]) MCHECK_ADD_FLAG([-Wlogical-op]) - dnl With clang 2.8 (no other tested) and gcc < 4.5 (tested + dnl With clang 2.8 & 3.3 (which reports as 4.2.1 with -dumpversion) + dnl (no other tested) and gcc < 4.5 (tested dnl 3.4.6, 4.2.1, 4.3.2, 4.4.4, 4.4.5, 4.5.1, 4.5.2), dnl "-Wunreachable-code" triggers numerous "will never be dnl executed" (at least) in our stream code, mostly (if - dnl not all) false positives, though; thus, we do not use + dnl not all) false positives, though, as well as in + dnl YACC/BISON-generated code; thus, we do not use dnl "-Wunreachable-code" with clang 2.8 and gcc < 4.5 . case "$CC-$gcc_ver" in - *clang*-2.8|*gcc*-[[0-3]].*|*gcc*-4.[[0-4]].*) + *clang*-2.8|*clang*-3.3|*clang*-4.2.1|*gcc*-[[0-3]].*|*gcc*-4.[[0-4]].*) ;; *) MCHECK_ADD_FLAG([-Wunreachable-code]) diff --git a/gdk/gdk_group.c b/gdk/gdk_group.c --- a/gdk/gdk_group.c +++ b/gdk/gdk_group.c @@ -525,8 +525,8 @@ BATgroup_internal(BAT **groups, BAT **ex if (maxgrps < GROUPBATINCR) maxgrps = GROUPBATINCR; if (b->T->width <= 2 && - maxgrps > ((BUN) 1 << (8 << (b->T->width == 2 ? 1 : 0)))) - maxgrps = (BUN) 1 << (8 << (b->T->width == 2 ? 1 : 0)); + maxgrps > ((BUN) 1 << (8 << (b->T->width == 2)))) + maxgrps = (BUN) 1 << (8 << (b->T->width == 2)); if (extents) { en = BATnew(TYPE_void, TYPE_oid, maxgrps); if (en == NULL) @@ -684,6 +684,52 @@ BATgroup_internal(BAT **groups, BAT **ex } GDKfree(pgrp); + } else if (g == NULL && ATOMstorage(b->ttype) == TYPE_bte) { + /* byte-sized values, use 256 entry array to keep + * track of doled out group ids */ + unsigned char *bgrps = GDKmalloc(256); + unsigned char v, *w = (unsigned char *) Tloc(b, BUNfirst(b)); + memset(bgrps, 0xFF, 256); + if (histo) + memset(cnts, 0, maxgrps * sizeof(wrd)); + ngrp = 0; + gn->tsorted = 1; + for (p = 0, q = BATcount(b); p < q; p++) { + if ((v = bgrps[w[p]]) == 0xFF && ngrp < 256) { + bgrps[w[p]] = v = ngrp++; + if (extents) + exts[v] = b->hseqbase + (oid) p; + } + ngrps[p] = v; + if (p > 0 &&v < ngrps[p - 1]) + gn->tsorted = 0; + if (histo) + cnts[v]++; + } + GDKfree(bgrps); + } else if (g == NULL && ATOMstorage(b->ttype) == TYPE_sht) { + /* short-sized values, use 65536 entry array to keep + * track of doled out group ids */ + unsigned short *sgrps = GDKmalloc(65536 * sizeof(short)); + unsigned short v, *w = (unsigned short *) Tloc(b, BUNfirst(b)); + memset(sgrps, 0xFF, 65536 * sizeof(short)); + if (histo) + memset(cnts, 0, maxgrps * sizeof(wrd)); + ngrp = 0; + gn->tsorted = 1; + for (p = 0, q = BATcount(b); p < q; p++) { + if ((v = sgrps[w[p]]) == 0xFFFF && ngrp < 65536) { + sgrps[w[p]] = v = ngrp++; + if (extents) + exts[v] = b->hseqbase + (oid) p; + } + ngrps[p] = v; + if (p > 0 && v < ngrps[p - 1]) + gn->tsorted = 0; + if (histo) + cnts[v]++; + } + GDKfree(sgrps); } else if (b->T->hash) { /* we already have a hash table on b */ ALGODEBUG fprintf(stderr, "#BATgroup(b=%s#" BUNFMT "," diff --git a/tools/merovingian/ChangeLog.Jan2014 b/tools/merovingian/ChangeLog.Jan2014 --- a/tools/merovingian/ChangeLog.Jan2014 +++ b/tools/merovingian/ChangeLog.Jan2014 @@ -1,3 +1,6 @@ # ChangeLog file for sql/src/backends/monet5/merovingian # This file is updated with mchangelog +* Sun Feb 16 2014 Fabian Groffen <fab...@monetdb.org> +- 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 @@ -82,8 +82,8 @@ command. By default, a confirmation question is asked, however the .I \-f option, when provided, suppresses this question and removal is executed -right away. Note that you cannot destroy a running database, bring it -down first using the +right away. Note that without this option you cannot destroy a running +database, bring it down first using the .B stop command. .IP "lock database [database ...]" 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 @@ -1559,6 +1559,17 @@ command_destroy(int argc, char *argv[]) printf("aborted\n"); exit(1); } + } else { + char *ret; + char *out; + for (stats = orig; stats != NULL; stats = stats->next) { + if (stats->state == SABdbRunning) { + ret = control_send(&out, mero_host, mero_port, + stats->dbname, "stop", 0, mero_pass); + if (ret != NULL) + free(ret); + } + } } simple_argv_cmd(argv[0], orig, "destroy", "destroyed database", NULL); 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 @@ -23,6 +23,7 @@ #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> +#include <sys/wait.h> #include <netdb.h> #include <netinet/in.h> #include <time.h> _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list