Changeset: 4a251c948804 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a251c948804 Modified Files: NT/monetdb_config.h.in clients/mapilib/mapi.c common/stream/stream.c configure.ag gdk/gdk_bat.c gdk/gdk_bbp.c gdk/gdk_heap.c gdk/gdk_storage.c monetdb5/mal/mal.h monetdb5/mal/mal_client.h monetdb5/mal/mal_parser.c monetdb5/modules/kernel/bat5.c monetdb5/modules/kernel/mmath.h monetdb5/optimizer/opt_prelude.h sql/backends/monet5/sql.c sql/common/sql_mem.c sql/server/rel_select.h sql/server/sql_scan.c sql/storage/bat/bat_table.c sql/storage/store.c sql/test/pg_regress/Tests/float8.stable.err.Windows Branch: trails Log Message:
Merged with default diffs (truncated from 1384 to 300 lines): diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in --- a/NT/monetdb_config.h.in +++ b/NT/monetdb_config.h.in @@ -755,9 +755,6 @@ /* Release name or "unreleased" */ #define MONETDB_RELEASE "unreleased" -/* Suffix for C++ files */ -#define MX_CXX_SUFFIX "cxx" - /* Define if you do not want assertions */ /* #undef NDEBUG */ diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c --- a/clients/mapilib/mapi.c +++ b/clients/mapilib/mapi.c @@ -2385,7 +2385,7 @@ mapi_reconnect(Mapi mid) return mapi_setError(mid, errbuf, "mapi_reconnect", MERROR); } #ifdef HAVE_FCNTL - fcntl(s, F_SETFD, FD_CLOEXEC); + (void) fcntl(s, F_SETFD, FD_CLOEXEC); #endif memset(&userver, 0, sizeof(struct sockaddr_un)); userver.sun_family = AF_UNIX; @@ -2507,7 +2507,7 @@ mapi_reconnect(Mapi mid) return mapi_setError(mid, errbuf, "mapi_reconnect", MERROR); } #ifdef HAVE_FCNTL - fcntl(s, F_SETFD, FD_CLOEXEC); + (void) fcntl(s, F_SETFD, FD_CLOEXEC); #endif if (connect(s, serv, sizeof(server)) == SOCKET_ERROR) { @@ -2999,7 +2999,7 @@ close_connection(Mapi mid) /* finish channels */ /* Make sure that the write- (to-) stream is closed first, * as the related read- (from-) stream closes the shared - * socket; see also src/common/stream.mx:socket_close . + * socket; see also src/common/stream.c:socket_close . */ if (mid->to) { close_stream(mid->to); @@ -3391,7 +3391,18 @@ mapi_param_store(MapiHdl hdl) break; case MAPI_VARCHAR: val = mapi_quote((char *) src, hdl->params[i].sizeptr ? *hdl->params[i].sizeptr : -1); - checkSpace(strlen(val) + 3); + /* note: k==strlen(hdl->query) */ + if (k + strlen(val) + 3 >= lim) { + char *q = hdl->query; + lim = k + strlen(val) + 3 + MAPIBLKSIZE; + hdl->query = realloc(hdl->query, lim); + if (hdl->query == NULL) { + free(q); + free(val); + return; + } + hdl->query = q; + } sprintf(hdl->query + k, "'%s'", val); free(val); break; diff --git a/common/stream/stream.c b/common/stream/stream.c --- a/common/stream/stream.c +++ b/common/stream/stream.c @@ -2236,7 +2236,7 @@ socket_close(stream *s) * as Windows' dup doesn't work on sockets; * hence, only one of the streams must/may close that * socket; we choose to let the read socket do the - * job, since in mapi.mx it may happen that the read + * job, since in mapi.c it may happen that the read * stream is closed before the write stream was even * created. */ diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -151,7 +151,7 @@ AS_IF([test -f "$srcdir"/vertoo.data], AC_ARG_ENABLE([developer], [AS_HELP_STRING([--enable-developer], - [enable support for MonetDB development (default=yes for development sources)])], + [build and install programs that are only useful for MonetDB development (default=yes for development sources)])], [enable_developer=$enableval], [enable_developer=$dft_developer]) diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -1656,8 +1656,8 @@ BATroles(BAT *b, const char *tnme) * commit, because the commit may fail and then the more unsafe * transient mmap modes would be present on a persistent bat. * - * See dirty_bat() in BBPsync() -- gdk_bbp.mx and epilogue() in - * gdk_tm.mx + * See dirty_bat() in BBPsync() -- gdk_bbp.c and epilogue() in + * gdk_tm.c. * * Including the exception states, we have 11 of the 16 * combinations. As for the 5 avoided states, all four diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -3041,7 +3041,7 @@ file_exists(int farmid, const char *dir, static gdk_return heap_move(Heap *hp, const char *srcdir, const char *dstdir, const char *nme, const char *ext) { - /* see doc at BATsetaccess()/gdk_bat.mx for an expose on mmap + /* see doc at BATsetaccess()/gdk_bat.c for an expose on mmap * heap modes */ if (file_exists(hp->farmid, dstdir, nme, ext)) { /* dont overwrite heap with the committed state diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c --- a/gdk/gdk_heap.c +++ b/gdk/gdk_heap.c @@ -20,7 +20,7 @@ * small (or rather: not huge) heaps are allocated with GDKmalloc. * Notice that GDKmalloc may redirect big requests to anonymous * virtual memory to prevent @emph{memory fragmentation} in the malloc - * library (see gdk_utils.mx). + * library (see gdk_utils.c). * * @item STORE_MMAP: read-only mapped region * this is a file on disk that is mapped into virtual memory. This is @@ -40,7 +40,7 @@ * write into a file that has a mmap open on it (e.g. Windows). Such * X.new files take preference over X files when opening them. * @end table - * Read also the discussion in BATsetaccess (gdk_bat.mx). + * Read also the discussion in BATsetaccess (gdk_bat.c). */ #include "monetdb_config.h" #include "gdk.h" diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -786,7 +786,7 @@ BATsave(BAT *bd) /* - * TODO: move to gdk_bbp.mx + * TODO: move to gdk_bbp.c */ BAT * BATload_intern(bat bid, int lock) diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h --- a/monetdb5/mal/mal.h +++ b/monetdb5/mal/mal.h @@ -59,7 +59,7 @@ mal_export int have_hge; #endif /* - See gdk/gdk.mx for the definition of all debug masks. + See gdk/gdk.h for the definition of all debug masks. See `man mserver5` or tools/mserver/mserver5.1 for a documentation of all debug options. */ @@ -167,7 +167,7 @@ typedef struct VARRECORD { /* For performance analysis we keep track of the number of calls and * the total time spent while executing the instruction. (See - * mal_profiler.mx) + * mal_profiler.c) */ typedef struct { diff --git a/monetdb5/mal/mal_client.h b/monetdb5/mal/mal_client.h --- a/monetdb5/mal/mal_client.h +++ b/monetdb5/mal/mal_client.h @@ -41,7 +41,7 @@ enum clientmode { * simplifies recognition. The information between the prompt brackets * can be used to pass the mode to the front-end. Moreover, the prompt * can be dropped if a single stream of information is expected from the - * server (see mal_profiler.mx). + * server (see mal_profiler.c). * * The user can request server-side compilation as part of the * initialization string. See the documentation on Scenarios. 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 @@ -1746,7 +1746,7 @@ parseMAL(Client cntxt, Symbol curPrg, in nextChar(cntxt); continue; case '#': - { /* keep the full line comments unless it is a MX #line */ + { /* keep the full line comments */ char start[256], *e = start, c; MalBlkPtr curBlk = cntxt->curprg->def; InstrPtr curInstr; diff --git a/monetdb5/modules/kernel/bat5.c b/monetdb5/modules/kernel/bat5.c --- a/monetdb5/modules/kernel/bat5.c +++ b/monetdb5/modules/kernel/bat5.c @@ -11,7 +11,7 @@ * Binary Association Tables * This module contains the commands and patterns to manage Binary * Association Tables (BATs). The relational operations you can execute - * on BATs have the form of a neat algebra, described in algebra.mx + * on BATs have the form of a neat algebra, described in algebra.c * * But a database system needs more that just this algebra, since often it * is crucial to do table-updates (this would not be permitted in a strict diff --git a/monetdb5/modules/kernel/mmath.h b/monetdb5/modules/kernel/mmath.h --- a/monetdb5/modules/kernel/mmath.h +++ b/monetdb5/modules/kernel/mmath.h @@ -6,9 +6,6 @@ * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ -/* - * The constants defined in math.h are defined in const.mx - */ #ifndef __MMATH_H__ #define __MMATH_H__ #include "mal.h" diff --git a/monetdb5/optimizer/opt_prelude.h b/monetdb5/optimizer/opt_prelude.h --- a/monetdb5/optimizer/opt_prelude.h +++ b/monetdb5/optimizer/opt_prelude.h @@ -10,7 +10,7 @@ #define MAL_PRELUDE #include "opt_support.h" -/* cf., gdk/gdk.mx */ +/* cf., gdk/gdk.h */ #define DEBUGoptimizers if (GDKdebug & GRPoptimizers) mal_export str abortRef; 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 @@ -674,16 +674,16 @@ mvc_next_value(Client cntxt, MalBlkPtr m str msg; sql_schema *s; lng *res = getArgReference_lng(stk, pci, 0); - str *sname = getArgReference_str(stk, pci, 1); - str *seqname = getArgReference_str(stk, pci, 2); + str sname = *getArgReference_str(stk, pci, 1); + str seqname = *getArgReference_str(stk, pci, 2); if ((msg = getSQLContext(cntxt, mb, &m, NULL)) != NULL) return msg; if ((msg = checkSQLContext(cntxt)) != NULL) return msg; - s = mvc_bind_schema(m, *sname); + s = mvc_bind_schema(m, sname); if (s) { - sql_sequence *seq = find_sql_sequence(s, *seqname); + sql_sequence *seq = find_sql_sequence(s, seqname); if (seq && seq_next_value(seq, res)) { m->last_id = *res; @@ -707,15 +707,15 @@ mvc_bat_next_value(Client cntxt, MalBlkP seqbulk *sb = NULL; BATiter bi; bat *res = getArgReference_bat(stk, pci, 0); - bat *sid = getArgReference_bat(stk, pci, 1); - str *seqname = getArgReference_str(stk, pci, 2); + bat sid = *getArgReference_bat(stk, pci, 1); + str seqname = *getArgReference_str(stk, pci, 2); if ((msg = getSQLContext(cntxt, mb, &m, NULL)) != NULL) return msg; if ((msg = checkSQLContext(cntxt)) != NULL) return msg; - if ((b = BATdescriptor(*sid)) == NULL) + if ((b = BATdescriptor(sid)) == NULL) throw(SQL, "sql.next_value", SQLSTATE(HY005) "Cannot access column descriptor"); r = COLnew(b->hseqbase, TYPE_lng, BATcount(b), TRANSIENT); @@ -741,17 +741,17 @@ mvc_bat_next_value(Client cntxt, MalBlkP seqbulk_destroy(sb); s = mvc_bind_schema(m, sname); seq = NULL; - if (!s || (seq = find_sql_sequence(s, *seqname)) == NULL || !(sb = seqbulk_create(seq, BATcount(b)))) { + if (!s || (seq = find_sql_sequence(s, seqname)) == NULL || !(sb = seqbulk_create(seq, BATcount(b)))) { BBPunfix(b->batCacheid); BBPunfix(r->batCacheid); - throw(SQL, "sql.next_value", SQLSTATE(HY050) "Cannot find the sequence %s.%s", sname,*seqname); + throw(SQL, "sql.next_value", SQLSTATE(HY050) "Cannot find the sequence %s.%s", sname,seqname); } } if (!seqbulk_next_value(sb, &l)) { BBPunfix(b->batCacheid); BBPunfix(r->batCacheid); seqbulk_destroy(sb); - throw(SQL, "sql.next_value", SQLSTATE(HY050) "Cannot generate next seuqnce value %s.%s", sname, *seqname); + throw(SQL, "sql.next_value", SQLSTATE(HY050) "Cannot generate next seuqnce value %s.%s", sname, seqname); } if (BUNappend(r, &l, FALSE) != GDK_SUCCEED) { BBPunfix(b->batCacheid); @@ -776,21 +776,21 @@ mvc_get_value(Client cntxt, MalBlkPtr mb str msg; sql_schema *s; lng *res = getArgReference_lng(stk, pci, 0); - str *sname = getArgReference_str(stk, pci, 1); - str *seqname = getArgReference_str(stk, pci, 2); + str sname = *getArgReference_str(stk, pci, 1); + str seqname = *getArgReference_str(stk, pci, 2); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list