Changeset: cfdf5c7237a1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cfdf5c7237a1
Added Files:
sql/include/sql_query.h
Removed Files:
sql/backends/monet5/embeddedclient.c.in
sql/backends/monet5/embeddedclient.h
Modified Files:
clients/Makefile.ag
clients/mapilib/mapi.h
configure.ag
monetdb5/mal/Makefile.ag
monetdb5/mal/mal_client.c
monetdb5/modules/mal/Makefile.ag
monetdb5/modules/mal/mal_mapi.c
monetdb5/modules/mal/mal_mapi.h
monetdb5/modules/mal/remote.c
monetdb5/modules/mal/remote.h
monetdb5/modules/mal/tablet.h
monetdb5/optimizer/Makefile.ag
monetdb5/scheduler/Makefile.ag
monetdb5/scheduler/srvpool.c
monetdb5/scheduler/srvpool.h
monetdb5/tools/Makefile.ag
sql/backends/monet5/LSST/Makefile.ag
sql/backends/monet5/Makefile.ag
sql/backends/monet5/UDF/Makefile.ag
sql/backends/monet5/generator/Makefile.ag
sql/backends/monet5/vaults/Makefile.ag
sql/backends/monet5/vaults/bam/Makefile.ag
sql/backends/monet5/vaults/fits/Makefile.ag
sql/backends/monet5/vaults/lidar/Makefile.ag
sql/backends/monet5/vaults/netcdf/Makefile.ag
sql/backends/monet5/vaults/shp/Makefile.ag
sql/include/Makefile.ag
sql/server/Makefile.ag
sql/server/sql_mvc.h
tools/embedded/Makefile.ag
tools/embedded/build-on-windows.bat
tools/embedded/build-rpkg.sh
tools/embedded/inlined_scripts.c
tools/embedded/inlined_scripts.py
tools/embedded/inlined_scripts.sh
tools/embedded/pkg-excludes
tools/embedded/rpackage/DESCRIPTION
tools/embedded/rpackage/configure
Branch: Jun2016
Log Message:
MonetDB no longer depending on MAPI
diffs (truncated from 3396 to 300 lines):
diff --git a/clients/Makefile.ag b/clients/Makefile.ag
--- a/clients/Makefile.ag
+++ b/clients/Makefile.ag
@@ -4,6 +4,6 @@
#
# Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
-SUBDIRS = mapilib mapiclient HAVE_ODBC?odbc HAVE_PERL?perl php examples
HAVE_PYTHON2?python2 HAVE_PYTHON3?python3 NATIVE_WIN32?NT
+SUBDIRS = HAVE_MAPI?mapilib HAVE_MAPI?mapiclient HAVE_ODBC?odbc HAVE_PERL?perl
php examples HAVE_PYTHON2?python2 HAVE_PYTHON3?python3 NATIVE_WIN32?NT
EXTRA_DIST_DIR = Tests R ruby
diff --git a/clients/mapilib/mapi.h b/clients/mapilib/mapi.h
--- a/clients/mapilib/mapi.h
+++ b/clients/mapilib/mapi.h
@@ -52,7 +52,7 @@ typedef int MapiMsg;
#define LANG_SQL 2
#define LANG_PROFILER 3
-/* prompts for MAPI protocol */
+/* prompts for MAPI protocol, also in monetdb_config.h.in */
#define PROMPTBEG '\001' /* start prompt bracket */
#define PROMPT1 "\001\001\n" /* prompt: ready for new query
*/
#define PROMPT2 "\001\002\n" /* prompt: more data needed */
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -218,6 +218,17 @@ no-auto)
;;
esac
+dft_mapi=yes
+AC_ARG_ENABLE(mapi,
+ AS_HELP_STRING([--enable-mapi],
+ [Enable MAPI (default=yes)]),
+ enable_mapi=$enableval,
+ enable_mapi=$dft_mapi)
+AM_CONDITIONAL(HAVE_MAPI, test x$enable_mapi != xno)
+if test "x$enable_mapi" != xno; then
+ AC_DEFINE(HAVE_MAPI, 1, [Enable MAPI])
+fi
+
dft_embedded=no
AC_ARG_ENABLE(embedded,
AS_HELP_STRING([--enable-embedded],
@@ -225,11 +236,9 @@ AC_ARG_ENABLE(embedded,
enable_embedded=$enableval,
enable_embedded=$dft_embedded)
AM_CONDITIONAL(HAVE_EMBEDDED, test x$enable_embedded != xno)
-
if test "x$enable_embedded" != xno; then
AC_DEFINE(HAVE_EMBEDDED, 1, [Support for MonetDB as a library])
fi
-AM_CONDITIONAL(HAVE_EMBEDDED, test x"$enable_embedded" != xno)
dft_embedded_r=no
AC_ARG_ENABLE(embedded-r,
@@ -238,11 +247,9 @@ AC_ARG_ENABLE(embedded-r,
enable_embedded_r=$enableval,
enable_embedded_r=$dft_embedded_r)
AM_CONDITIONAL(HAVE_EMBEDDED_R, test x$enable_embedded_r != xno)
-
if test "x$enable_embedded_r" != xno; then
AC_DEFINE(HAVE_EMBEDDED_R, 1, [Support for MonetDB as a library for R])
fi
-AM_CONDITIONAL(HAVE_EMBEDDED_R, test x"$enable_embedded_R" != xno)
dft_microhttpd=no
AC_ARG_ENABLE(microhttpd,
@@ -3511,6 +3518,9 @@ typedef lng ptrdiff_t;
#include "tools/embedded/undef.h"
#endif
+#define PROMPT1 "\001\001\n" /* prompt: ready for new query
*/
+#define PROMPT2 "\001\002\n" /* prompt: more data needed */
+
#endif /* _SEEN_MONETDB_CONFIG_H */
])
diff --git a/monetdb5/mal/Makefile.ag b/monetdb5/mal/Makefile.ag
--- a/monetdb5/mal/Makefile.ag
+++ b/monetdb5/mal/Makefile.ag
@@ -7,7 +7,7 @@
INCLUDES = ../../common/options \
../../common/stream \
../../common/utils \
- ../../clients/mapilib \
+ HAVE_MAPI?../../clients/mapilib \
../../gdk \
$(READLINE_INCS)
MTSAFE
diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c
--- a/monetdb5/mal/mal_client.c
+++ b/monetdb5/mal/mal_client.c
@@ -49,8 +49,6 @@
#include "mal_private.h"
#include "mal_runtime.h"
#include "mal_authorize.h"
-#include <mapi.h> /* for PROMPT1 */
-
/*
* This should be in src/mal/mal.h, as the function is implemented in
diff --git a/monetdb5/modules/mal/Makefile.ag b/monetdb5/modules/mal/Makefile.ag
--- a/monetdb5/modules/mal/Makefile.ag
+++ b/monetdb5/modules/mal/Makefile.ag
@@ -5,7 +5,7 @@
# Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
INCLUDES = ../../mal ../atoms ../kernel \
- ../../../clients/mapilib \
+ HAVE_MAPI?../../../clients/mapilib \
../../../common/options \
../../../common/stream \
../../../common/utils \
diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.c
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -28,6 +28,7 @@
* A cleaner and simplier interface for distributed processing is available in
* the module remote.
*/
+#ifdef HAVE_MAPI
#include "monetdb_config.h"
#include "mal_mapi.h"
#include <sys/types.h>
@@ -63,10 +64,6 @@
#define SOCKLEN int
#endif
-#ifdef HAVE_EMBEDDED
-#define printf(fmt,...) ((void) 0)
-#endif
-
static char seedChars[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
@@ -387,7 +384,6 @@ error:
fprintf(stderr, "!mal_mapi.listen: %s, terminating listener\n", msg);
}
-#ifndef HAVE_EMBEDDED
/**
* Small utility function to call the sabaoth marchConnection function
* with the right arguments. If the socket is bound to 0.0.0.0 the
@@ -675,18 +671,6 @@ SERVERlisten(int *Port, str *Usockfile,
GDKfree(usockfile);
return MAL_SUCCEED;
}
-#else
-str
-SERVERlisten(int *Port, str *Usockfile, int *Maxusers)
-{
- (void) Port;
- (void) Usockfile;
- (void) Maxusers;
- throw(MAL, "mal_mapi.listen", OPERATION_FAILED ": No MAPI server in
embedded mode");
-}
-#endif // HAVE_EMBEDDED
-
-
/*
* @- Wrappers
@@ -1780,3 +1764,5 @@ SERVERbindBAT(Client cntxt, MalBlkPtr mb
catchErrors("mapi.bind");
return MAL_SUCCEED;
}
+
+#endif // HAVE_MAPI
diff --git a/monetdb5/modules/mal/mal_mapi.h b/monetdb5/modules/mal/mal_mapi.h
--- a/monetdb5/modules/mal/mal_mapi.h
+++ b/monetdb5/modules/mal/mal_mapi.h
@@ -8,6 +8,7 @@
#ifndef SERVER_H
#define SERVER_H
+#ifdef HAVE_MAPI
/* #define DEBUG_SERVER */
#include "mal_client.h"
@@ -92,4 +93,5 @@ mal_mapi_export str SERVERbindBAT(Client
mal_mapi_export str SERVERclient(void *res, const Stream *In, const Stream
*Out);
mal_mapi_export str SERVERmapi_rpc_bat(Client cntxt, MalBlkPtr mb, MalStkPtr
stk, InstrPtr pci);
+#endif /* HAVE_MAPI */
#endif /* SERVER_H */
diff --git a/monetdb5/modules/mal/remote.c b/monetdb5/modules/mal/remote.c
--- a/monetdb5/modules/mal/remote.c
+++ b/monetdb5/modules/mal/remote.c
@@ -67,6 +67,7 @@
* Instead, we maintain a simple lock with each connection, which can be
* used to issue a safe, but blocking get/put/exec/register request.
*/
+#ifdef HAVE_MAPI
static connection conns = NULL;
static unsigned char localtype = 0;
@@ -1340,3 +1341,4 @@ RMTisalive(int *ret, str *conn)
return MAL_SUCCEED;
}
+#endif // HAVE_MAPI
diff --git a/monetdb5/modules/mal/remote.h b/monetdb5/modules/mal/remote.h
--- a/monetdb5/modules/mal/remote.h
+++ b/monetdb5/modules/mal/remote.h
@@ -5,9 +5,9 @@
*
* Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
*/
-
#ifndef _REMOTE_DEF
#define _REMOTE_DEF
+#ifdef HAVE_MAPI
#include <mal.h>
#include <mal_exception.h>
@@ -73,4 +73,6 @@ remote_export str RMTbincopyto(Client cn
remote_export str RMTbincopyfrom(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
remote_export str RMTbintype(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
remote_export str RMTisalive(int *ret, str *conn);
+#endif /* HAVE_MAPI */
#endif /* _REMOTE_DEF */
+
diff --git a/monetdb5/modules/mal/tablet.h b/monetdb5/modules/mal/tablet.h
--- a/monetdb5/modules/mal/tablet.h
+++ b/monetdb5/modules/mal/tablet.h
@@ -24,7 +24,6 @@
#include <mal_exception.h>
#include <mal_client.h>
#include <mal_interpreter.h>
-#include <mapi.h> /* for PROMPT1, PROMPT2 */
#ifdef WIN32
#if !defined(LIBMAL) && !defined(LIBATOMS) && !defined(LIBKERNEL) &&
!defined(LIBMAL) && !defined(LIBOPTIMIZER) && !defined(LIBSCHEDULER) &&
!defined(LIBMONETDB5)
diff --git a/monetdb5/optimizer/Makefile.ag b/monetdb5/optimizer/Makefile.ag
--- a/monetdb5/optimizer/Makefile.ag
+++ b/monetdb5/optimizer/Makefile.ag
@@ -5,7 +5,7 @@
# Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
INCLUDES = ../mal ../modules/atoms ../modules/mal ../modules/kernel \
- ../../clients/mapilib \
+ HAVE_MAPI?../../clients/mapilib \
../../common/options \
../../common/stream \
../../common/utils \
diff --git a/monetdb5/scheduler/Makefile.ag b/monetdb5/scheduler/Makefile.ag
--- a/monetdb5/scheduler/Makefile.ag
+++ b/monetdb5/scheduler/Makefile.ag
@@ -6,7 +6,7 @@
INCLUDES = ../mal ../optimizer \
../modules/atoms ../modules/mal ../modules/kernel \
- ../../clients/mapilib \
+ HAVE_MAPI?../../clients/mapilib \
../../common/options \
../../common/stream \
../../common/utils \
diff --git a/monetdb5/scheduler/srvpool.c b/monetdb5/scheduler/srvpool.c
--- a/monetdb5/scheduler/srvpool.c
+++ b/monetdb5/scheduler/srvpool.c
@@ -39,6 +39,8 @@
* since the last call. For the time being we assume the connection remains in
tact.
*
*/
+#ifdef HAVE_MAPI
+
#include "monetdb_config.h"
#include "mal_interpreter.h"
#include "mal_dataflow.h"
@@ -508,3 +510,7 @@ str SRVPOOLexec(Client cntxt, MalBlkPtr
(void) p;
throw(MAL,"srvpool.exec","Unexpected call");
}
+#else
+int SRVPOOLdummy = 42;
+#endif /* HAVE_MAPI */
+
diff --git a/monetdb5/scheduler/srvpool.h b/monetdb5/scheduler/srvpool.h
--- a/monetdb5/scheduler/srvpool.h
+++ b/monetdb5/scheduler/srvpool.h
@@ -13,6 +13,7 @@
*/
#ifndef _RUN_SRVPOOL
#define _RUN_SRVPOOL
+#ifdef HAVE_MAPI
#include "mal.h"
#include "mal_instruction.h"
#include "mal_client.h"
@@ -33,5 +34,6 @@ mpool_export str SRVPOOLreset(Client cnt
mpool_export str SRVPOOLconnect(str *c, str *dbname);
mpool_export str SRVPOOLlocal(void *res, bit *flag);
mpool_export str SRVsetServers(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
+#endif /* HAVE_MAPI */
#endif /* MAL_RUN_SRVPOOL */
diff --git a/monetdb5/tools/Makefile.ag b/monetdb5/tools/Makefile.ag
--- a/monetdb5/tools/Makefile.ag
+++ b/monetdb5/tools/Makefile.ag
@@ -18,7 +18,7 @@ lib_monetdb5 = {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list