Changeset: b366f013782d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b366f013782d
Modified Files:
        monetdb5/mal/mal_authorize.h
        monetdb5/mal/mal_import.c
        monetdb5/mal/mal_session.c
        monetdb5/modules/mal/wlc.c
        tools/mserver/shutdowntest.c
Branch: pushdown
Log Message:

merged


diffs (94 lines):

diff --git a/monetdb5/mal/mal_authorize.h b/monetdb5/mal/mal_authorize.h
--- a/monetdb5/mal/mal_authorize.h
+++ b/monetdb5/mal/mal_authorize.h
@@ -14,7 +14,7 @@
 #include "mal_instruction.h"
 #include "mal_client.h"
 
-#define MAL_ADMIN 0
+#define MAL_ADMIN (oid) 0
 
 mal_export str AUTHcheckCredentials(oid *ret, Client c, const char *user, 
const char *passwd, const char *challenge, const char *algo);
 mal_export str AUTHaddUser(oid *ret, Client c, const char *user, const char 
*pass);
diff --git a/monetdb5/mal/mal_import.c b/monetdb5/mal/mal_import.c
--- a/monetdb5/mal/mal_import.c
+++ b/monetdb5/mal/mal_import.c
@@ -30,6 +30,7 @@
 #include "mal_linker.h"                /* for loadModuleLibrary() */
 #include "mal_scenario.h"
 #include "mal_parser.h"
+#include "mal_authorize.h"
 #include "mal_private.h"
 
 void
@@ -270,7 +271,7 @@ evalFile(str fname, int listing)
                throw(MAL,"mal.eval", "WARNING: could not open file '%s'\n", 
fname);
        }
 
-       c= MCinitClient((oid)0, bstream_create(fd, 128 * BLOCK),0);
+       c= MCinitClient(MAL_ADMIN, bstream_create(fd, 128 * BLOCK),0);
        if( c == NULL){
                throw(MAL,"mal.eval","Can not create user context");
        }
@@ -356,7 +357,7 @@ compileString(Symbol *fcn, Client cntxt,
        strncpy(fdin->buf, qry, len+1);
 
        // compile in context of called for
-       c= MCinitClient((oid)0, fdin, 0);
+       c= MCinitClient(MAL_ADMIN, fdin, 0);
        if( c == NULL){
                GDKfree(qry);
                GDKfree(b);
@@ -423,7 +424,7 @@ callString(Client cntxt, str s, int list
                GDKfree(qry);
                throw(MAL,"callstring", SQLSTATE(HY013) MAL_MALLOC_FAIL);
        }
-       c= MCinitClient((oid)0, bs, cntxt->fdout);
+       c= MCinitClient(MAL_ADMIN, bs, cntxt->fdout);
        if( c == NULL){
                GDKfree(b);
                GDKfree(qry);
diff --git a/monetdb5/mal/mal_session.c b/monetdb5/mal/mal_session.c
--- a/monetdb5/mal/mal_session.c
+++ b/monetdb5/mal/mal_session.c
@@ -33,7 +33,7 @@ malBootstrap(void)
        str msg = MAL_SUCCEED;
        str bootfile = "mal_init";
 
-       c = MCinitClient((oid) 0, NULL, NULL);
+       c = MCinitClient(MAL_ADMIN, NULL, NULL);
        if(c == NULL) {
                throw(MAL, "malBootstrap", "Failed to initialize client");
        }
diff --git a/monetdb5/modules/mal/wlc.c b/monetdb5/modules/mal/wlc.c
--- a/monetdb5/modules/mal/wlc.c
+++ b/monetdb5/modules/mal/wlc.c
@@ -270,6 +270,8 @@ str WLCsetConfig(void){
        mnstr_printf(fd,"state=%d\n", wlc_state );
        mnstr_printf(fd,"batches=%d\n", wlc_batches );
        mnstr_printf(fd,"beat=%d\n", wlc_beat );
+       (void) mnstr_flush(wlc_fd);
+       (void) mnstr_fsync(wlc_fd);
        close_stream(fd);
        return MAL_SUCCEED;
 }
@@ -577,6 +579,7 @@ WLCpreparewrite(Client cntxt)
                MT_lock_set(&wlc_lock);
                printFunction(wlc_fd, cntxt->wlc, 0, LIST_MAL_CALL );
                (void) mnstr_flush(wlc_fd);
+               (void) mnstr_fsync(wlc_fd);
                // close file if no delay is allowed
                if( wlc_beat == 0 )
                        msg = WLCcloselogger();
diff --git a/tools/mserver/shutdowntest.c b/tools/mserver/shutdowntest.c
--- a/tools/mserver/shutdowntest.c
+++ b/tools/mserver/shutdowntest.c
@@ -47,7 +47,7 @@ static void* monetdb_connect(void) {
        if (!monetdb_initialized) {
                return NULL;
        }
-       conn = MCinitClient((oid) 0, bstream_create(GDKstdin, 0), GDKstdout);
+       conn = MCinitClient(MAL_ADMIN, bstream_create(GDKstdin, 0), GDKstdout);
        if (!MCvalid(conn)) {
                return NULL;
        }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to