Changeset: 453766acf066 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=453766acf066
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/common/sql_mem.c
sql/server/rel_select.h
sql/server/sql_scan.c
sql/storage/bat/bat_table.c
Branch: default
Log Message:
Merge with Jul2017 branch.
diffs (282 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
@@ -2222,7 +2222,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
@@ -58,7 +58,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.
*/
@@ -166,7 +166,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
@@ -37,7 +37,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/common/sql_mem.c b/sql/common/sql_mem.c
--- a/sql/common/sql_mem.c
+++ b/sql/common/sql_mem.c
@@ -7,14 +7,6 @@
*/
#include "monetdb_config.h"
-
-/* Stefan:
- * "Fake-include" to make msc.py create the proper dependencies;
- * otherwise, query.h doesn't get extracted from query.mx on Windows.
- * TODO: fix msc.py instead...
-#include "query.h"
-*/
-
#include <sql_mem.h>
sql_ref *
diff --git a/sql/server/rel_select.h b/sql/server/rel_select.h
--- a/sql/server/rel_select.h
+++ b/sql/server/rel_select.h
@@ -22,7 +22,7 @@ extern sql_exp *rel_column_exp(mvc *sql,
extern sql_exp * rel_value_exp(mvc *sql, sql_rel **rel, symbol *se, int f,
exp_kind ek);
extern sql_exp * rel_value_exp2(mvc *sql, sql_rel **rel, symbol *se, int f,
exp_kind ek, int *is_last);
-/* TODO rename to exp_check_type + move to rel_exp.mx */
+/* TODO rename to exp_check_type + move to rel_exp.c */
extern sql_exp *rel_check_type(mvc *sql, sql_subtype *t, sql_exp *exp, int
tpe);
extern sql_exp *rel_unop_(mvc *sql, sql_exp *e, sql_schema *s, char *fname,
int card);
extern sql_exp *rel_binop_(mvc *sql, sql_exp *l, sql_exp *r, sql_schema *s,
char *fname, int card);
diff --git a/sql/server/sql_scan.c b/sql/server/sql_scan.c
--- a/sql/server/sql_scan.c
+++ b/sql/server/sql_scan.c
@@ -1212,7 +1212,7 @@ sql_get_next_token(YYSTYPE *yylval, void
yylval->sval = (lc->rs->buf + (int)lc->rs->pos + lc->yysval);
/* This is needed as ALIAS and aTYPE get defined too late, see
- sql_keyword.mx */
+ sql_keyword.h */
if (token == KW_ALIAS)
token = ALIAS;
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
@@ -574,7 +574,7 @@ table_vacuum(sql_trans *tr, sql_table *t
BBPunfix(cols[c->colnr]->batCacheid);
}
_DELETE(cols);
- return LOG_OK;
+ return SQL_OK;
}
void
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list