Changeset: 91d2142cf3a3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=91d2142cf3a3
Modified Files:
NT/monetdb_config.h.in
clients/Tests/exports.stable.out
common/options/monet_options.c
common/utils/msabaoth.c
common/utils/msabaoth.h
configure.ag
monetdb5/mal/mal.c
monetdb5/mal/mal.h
monetdb5/mal/mal_client.c
monetdb5/mal/mal_client.h
monetdb5/mal/mal_debugger.c
monetdb5/mal/mal_profiler.c
monetdb5/mal/mal_resource.c
monetdb5/mal/mal_session.c
monetdb5/modules/atoms/uuid.c
monetdb5/modules/mal/clients.c
monetdb5/tools/Tests/mserver5--help.stable.err
monetdb5/tools/Tests/mserver5--help.stable.err.Windows
sql/backends/monet5/sql_gencode.c
sql/backends/monet5/vaults/bam/Tests/bam_lib_mal.stable.err
sql/backends/monet5/vaults/bam/Tests/bam_lib_mal.stable.out
testing/Mtest.py.in
tools/merovingian/daemon/forkmserver.c
tools/mserver/mserver5.c
Branch: mtime
Log Message:
Merge with default branch.
diffs (truncated from 1103 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
@@ -136,9 +136,6 @@
/* Define if you have the CommonCrypto library */
/* #undef HAVE_COMMONCRYPTO */
-/* If the console should be used */
-#define HAVE_CONSOLE 1
-
/* Define to 1 if you have the `ctime_r' function. */
#define HAVE_CTIME_R 1
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -2336,8 +2336,6 @@ str mal_quote(const char *msg, size_t si
MT_Lock mal_remoteLock;
void mal_resource_reset(void) __attribute__((__visibility__("hidden")));
void mal_runtime_reset(void) __attribute__((__visibility__("hidden")));
-str mal_session_uuid;
-int mal_trace;
void mal_unquote(char *msg);
str manifoldRef;
str mapiRef;
@@ -2393,6 +2391,7 @@ char *msab_getDBfarm(char **ret);
char *msab_getDBname(char **ret);
char *msab_getMyStatus(sabdb **ret);
char *msab_getStatus(sabdb **ret, char *dbname);
+char *msab_getUUID(char **ret);
char *msab_getUplogInfo(sabuplog *ret, const sabdb *db);
char *msab_marchConnection(const char *host, const int port);
char *msab_marchScenario(const char *lang);
diff --git a/common/options/monet_options.c b/common/options/monet_options.c
--- a/common/options/monet_options.c
+++ b/common/options/monet_options.c
@@ -219,7 +219,7 @@ mo_builtin_settings(opt **Set)
if (Set == NULL)
return 0;
-#define N_OPTIONS 9 /*MUST MATCH # OPTIONS BELOW */
+#define N_OPTIONS 8 /*MUST MATCH # OPTIONS BELOW */
set = malloc(sizeof(opt) * N_OPTIONS);
if (set == NULL)
return 0;
@@ -234,10 +234,6 @@ mo_builtin_settings(opt **Set)
set[i].value = strdup(">");
i++;
set[i].kind = opt_builtin;
- set[i].name = strdup("monet_daemon");
- set[i].value = strdup("no");
- i++;
- set[i].kind = opt_builtin;
set[i].name = strdup("mapi_port");
set[i].value = strdup("50000");
i++;
diff --git a/common/utils/msabaoth.c b/common/utils/msabaoth.c
--- a/common/utils/msabaoth.c
+++ b/common/utils/msabaoth.c
@@ -45,7 +45,7 @@ char *_sabaoth_internal_dbfarm = NULL;
/** the database which is "active" */
char *_sabaoth_internal_dbname = NULL;
/** identifier of the current process */
-char *_sabaoth_internal_uuid = NULL;
+static char *_sabaoth_internal_uuid = NULL;
/**
* Retrieves the dbfarm path plus an optional extra component added
@@ -242,6 +242,15 @@ msab_getDBname(char **ret)
return(NULL);
}
+char *
+msab_getUUID(char **ret)
+{
+ if (_sabaoth_internal_uuid == NULL)
+ return(strdup("sabaoth not initialized"));
+ *ret = strdup(_sabaoth_internal_uuid);
+ return NULL;
+}
+
#define SCENARIOFILE ".scen"
/**
diff --git a/common/utils/msabaoth.h b/common/utils/msabaoth.h
--- a/common/utils/msabaoth.h
+++ b/common/utils/msabaoth.h
@@ -65,6 +65,7 @@ msab_export void msab_dbpathinit(const c
msab_export void msab_dbfarminit(const char *dbfarm);
msab_export char *msab_getDBfarm(char **ret);
msab_export char *msab_getDBname(char **ret);
+msab_export char *msab_getUUID(char **ret);
msab_export char *msab_marchScenario(const char *lang);
msab_export char *msab_retreatScenario(const char *lang);
msab_export char *msab_marchConnection(const char *host, const int port);
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -300,21 +300,6 @@ AC_ARG_ENABLE(py3integration,
enable_py3integration=$enableval,
enable_py3integration=$dft_py3integration)
-# The console is a direct client hooked onto the kernel with full
-# administrative privileges, bypassing any security checks. It is
-# handy only during development.
-# We simply can't disable it for now because Testing gets hopelessly
-# upset about it, but we can offer to the user to disable it for
-# increased security.
-dft_console=yes
-AC_ARG_ENABLE([console],
- [AS_HELP_STRING([--enable-console],
- [enables direct console on the server (involves security risks)
(default=yes)])],
- [enable_console="$enableval"],
- [enable_console=$dft_console])
-AS_VAR_IF([enable_console], [no], [],
- [AC_DEFINE([HAVE_CONSOLE], 1, [If the console should be used])])
-
dft_int128=auto
AC_ARG_ENABLE([int128],
[AS_HELP_STRING([--enable-int128],
@@ -2955,7 +2940,6 @@ for comp in \
'monetdb5 ' \
'sql ' \
'geom ' \
- 'console ' \
'py2integration' \
'py3integration' \
'rintegration ' \
diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c
--- a/monetdb5/mal/mal.c
+++ b/monetdb5/mal/mal.c
@@ -13,8 +13,6 @@
char monet_cwd[FILENAME_MAX] = { 0 };
size_t monet_memory = 0;
char monet_characteristics[4096];
-int mal_trace; /* enable profile events on console */
-str mal_session_uuid; /* unique marker for the session */
#ifdef HAVE_HGE
int have_hge;
@@ -43,7 +41,7 @@ int have_hge;
MT_Lock mal_contextLock = MT_LOCK_INITIALIZER("mal_contextLock");
MT_Lock mal_namespaceLock = MT_LOCK_INITIALIZER("mal_namespaceLk");
MT_Lock mal_remoteLock = MT_LOCK_INITIALIZER("mal_remoteLock");
-MT_Lock mal_profileLock = MT_LOCK_INITIALIZER("mal_profileLock");
+MT_Lock mal_profileLock = MT_LOCK_INITIALIZER("mal_profileLock");
MT_Lock mal_copyLock = MT_LOCK_INITIALIZER("mal_copyLock");
MT_Lock mal_delayLock = MT_LOCK_INITIALIZER("mal_delayLock");
MT_Lock mal_beatLock = MT_LOCK_INITIALIZER("mal_beatLock");
@@ -92,8 +90,6 @@ int mal_init(void){
* activity first.
* This function should be called after you have issued sql_reset();
*/
-void cleanOptimizerPipe(void);
-
void mserver_reset(void)
{
str err = 0;
@@ -112,29 +108,8 @@ void mserver_reset(void)
fprintf(stderr, "!%s", err);
free(err);
}
- /* TODO: make sure this is still required
-#ifdef HAVE_EMBEDDED
- MTIMEreset();
-#endif
-*/
mal_factory_reset();
mal_dataflow_reset();
- THRdel(mal_clients->mythread);
- GDKfree(mal_clients->errbuf);
- mal_clients->fdin->s = NULL;
- bstream_destroy(mal_clients->fdin);
- GDKfree(mal_clients->prompt);
- GDKfree(mal_clients->username);
- freeStack(mal_clients->glb);
- if (mal_clients->usermodule/* &&
strcmp(mal_clients->usermodule->name,"user")==0*/)
- freeModule(mal_clients->usermodule);
-
- mal_clients->fdin = 0;
- mal_clients->prompt = 0;
- mal_clients->username = 0;
- mal_clients->curprg = 0;
- mal_clients->usermodule = 0;
-
mal_client_reset();
mal_linker_reset();
mal_resource_reset();
@@ -143,13 +118,10 @@ void mserver_reset(void)
mal_atom_reset();
opt_pipes_reset();
mdbExit();
- GDKfree(mal_session_uuid);
- mal_session_uuid = NULL;
- memset((char*)monet_cwd,0, sizeof(monet_cwd));
+ memset((char*)monet_cwd, 0, sizeof(monet_cwd));
monet_memory = 0;
memset((char*)monet_characteristics,0, sizeof(monet_characteristics));
- mal_trace = 0;
mal_namespace_reset();
/* No need to clean up the namespace, it will simply be extended
* upon restart mal_namespace_reset(); */
@@ -159,7 +131,7 @@ void mserver_reset(void)
/* stopping clients should be done with care, as they may be in the mids of
* transactions. One safe place is between MAL instructions, which would
- * abort the transaction by raising an exception. All non-console sessions are
+ * abort the transaction by raising an exception. All sessions are
* terminate this way.
* We should also ensure that no new client enters the scene while shutting
down.
* For this we mark the client records as BLOCKCLIENT.
diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h
--- a/monetdb5/mal/mal.h
+++ b/monetdb5/mal/mal.h
@@ -51,8 +51,6 @@ mal_export size_t monet_memory;
mal_export char monet_characteristics[4096];
mal_export lng memorypool; /* memory claimed by
concurrent threads */
mal_export int memoryclaims; /* number of threads active
with expensive operations */
-mal_export int mal_trace; /* enable profile events on
console */
-mal_export str mal_session_uuid; /* unique marker for the
session */
#ifdef HAVE_HGE
mal_export int have_hge;
#endif
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
@@ -7,11 +7,10 @@
*/
/*
- * Clients gain access to the Monet server through a internet connection
- * or through its server console. Access through the internet requires
- * a client program at the source, which addresses the default port of a
- * running server. The functionality of the server console is limited.
- * It is a textual interface for expert use.
+ * Clients gain access to the Monet server through a internet connection.
+ * Access through the internet requires a client program at the source,
+ * which addresses the default port of a running server. It is a textual
+ * interface for expert use.
*
* At the server side, each client is represented by a session record
* with the current status, such as name, file descriptors, namespace,
@@ -19,8 +18,7 @@
* control.
*
* The number of clients permitted concurrent access is a run time
- * option. The console is the first and is always present. It reads
- * from standard input and writes to standard output.
+ * option.
*
* Client sessions remain in existence until the corresponding
* communication channels break.
@@ -77,9 +75,7 @@ MCinit(void)
}
}
- MAL_MAXCLIENTS =
- /* console */ 1 +
- /* client connections */ maxclients;
+ MAL_MAXCLIENTS = /* client connections */ maxclients;
mal_clients = GDKzalloc(sizeof(ClientRec) * MAL_MAXCLIENTS);
if( mal_clients == NULL){
fprintf(stderr,"#MCinit:" MAL_MALLOC_FAIL);
@@ -138,11 +134,6 @@ MCnewClient(void)
{
Client c;
MT_lock_set(&mal_contextLock);
- if (mal_clients[CONSOLE].user && mal_clients[CONSOLE].mode ==
FINISHCLIENT) {
- /*system shutdown in progress */
- MT_lock_unset(&mal_contextLock);
- return NULL;
- }
for (c = mal_clients; c < mal_clients + MAL_MAXCLIENTS; c++) {
if (c->mode == FREECLIENT) {
c->mode = RUNCLIENT;
@@ -227,7 +218,6 @@ MCinitClientRecord(Client c, oid user, b
c->listing = 0;
c->fdout = fout ? fout : GDKstdout;
c->mdb = 0;
- c->history = 0;
c->curprg = c->backup = 0;
c->glb = 0;
@@ -474,9 +464,9 @@ MCstopClients(Client cntxt)
Client c = mal_clients;
MT_lock_set(&mal_contextLock);
- for(c= mal_clients +1; c < mal_clients+MAL_MAXCLIENTS; c++)
- if( cntxt != c){
- if ( c->mode == RUNCLIENT)
+ for(c = mal_clients; c < mal_clients+MAL_MAXCLIENTS; c++)
+ if (cntxt != c){
+ if (c->mode == RUNCLIENT)
c->mode = FINISHCLIENT;
else if (c->mode == FREECLIENT)
c->mode = BLOCKCLIENT;
@@ -491,13 +481,13 @@ MCactiveClients(void)
int freeclient=0, finishing=0, running=0, blocked = 0;
Client cntxt = mal_clients;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list