Changeset: a8aadb539c93 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/a8aadb539c93 Modified Files: MonetDB.spec clients/Tests/MAL-signatures-hge.test clients/Tests/MAL-signatures.test clients/Tests/exports.stable.out sql/backends/monet5/sql_scenario.c sql/server/sql_mvc.c sql/test/emptydb/Tests/check.stable.out.32bit Branch: default Log Message:
Merge with Sep2022 branch. diffs (truncated from 709 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -906,11 +906,12 @@ fi minimize, simplify and optimize the process of generating and processing profiler output, only the events marking the end of an operation are emitted in most cases and the emitted json messages themselves are - trimmed down to their essential fields. Furthermore the MAL instruction - profiler.openstream now has an overload that takes a single string - argument which can be set to "min" to turn on the profiler in minimal - mode which causes it to only emit general events and excludes individual - MAL instruction execution events from the profiler streams. + trimmed down to their essential fields. Furthermore, the MAL instruction + profiler.openstream now requires an integer as a single argument, "0" for + default behaviour or "4" to turn on the profiler in minimal mode, + which causes it to only emit general events and excludes individual MAL + instruction execution events from the profiler streams. + The MAL instruction profiler.openstream with zero arguments is deprecated. * Thu Aug 25 2022 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> - 11.45.1-20220913 - sql: Extended system view sys.users with columns: schema_path, max_memory, diff --git a/clients/Tests/MAL-signatures-hge.test b/clients/Tests/MAL-signatures-hge.test --- a/clients/Tests/MAL-signatures-hge.test +++ b/clients/Tests/MAL-signatures-hge.test @@ -47770,7 +47770,7 @@ CMDopenProfilerStream; Start profiling the events, send to output stream profiler openstream -pattern profiler.openstream(X_0:str):void +pattern profiler.openstream(X_0:int):void CMDopenProfilerStream; Start profiling the events, send to output stream profiler diff --git a/clients/Tests/MAL-signatures.test b/clients/Tests/MAL-signatures.test --- a/clients/Tests/MAL-signatures.test +++ b/clients/Tests/MAL-signatures.test @@ -36195,7 +36195,7 @@ CMDopenProfilerStream; Start profiling the events, send to output stream profiler openstream -pattern profiler.openstream(X_0:str):void +pattern profiler.openstream(X_0:int):void CMDopenProfilerStream; Start profiling the events, send to output stream profiler 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 @@ -737,7 +737,7 @@ str AUTHdeleteRemoteTableCredentials(con str AUTHgetPasswordHash(str *ret, Client c, const char *username); str AUTHgetRemoteTableCredentials(const char *local_table, str *uri, str *username, str *password); str AUTHgetUsername(str *ret, Client c); -str AUTHinitTables(const char *passwd); +str AUTHinitTables(void); str AUTHrequireAdmin(Client c); str AUTHunlockVault(const char *password); str AUTHverifyPassword(const char *passwd); @@ -1093,13 +1093,13 @@ const char *lockRef; const char *lookupRef; str mal2str(MalBlkPtr mb, int first, int last); int malAtomSize(int size, const char *name); -str malBootstrap(char *modules[], bool embedded); +str malBootstrap(char *modules[], bool embedded, const char *initpasswd); str malEmbeddedBoot(int workerlimit, int memorylimit, int querytimeout, int sessionlimit, bool with_mapi_server); void malEmbeddedReset(void); _Noreturn void malEmbeddedStop(int status); str malExtraModulesBoot(Client c, str extraMalModules[], char *mal_scripts); str malInclude(Client c, const char *name, int listing); -str malIncludeModules(Client c, char *modules[], int listing, bool embedded); +str malIncludeModules(Client c, char *modules[], int listing, bool embedded, const char *initpasswd); str malIncludeString(Client c, const char *name, str mal, int listing, MALfcn address); int malLibraryEnabled(const char *name); char *malLibraryHowToEnable(const char *name); @@ -1110,7 +1110,7 @@ MT_Lock mal_contextLock; MT_Lock mal_copyLock; MT_Lock mal_delayLock; _Noreturn void mal_exit(int status); -int mal_init(char *modules[], bool embedded); +int mal_init(char *modules[], bool embedded, const char *initpasswd); void mal_instruction_reset(void); void mal_module(const char *name, mel_atom *atoms, mel_func *funcs); void mal_module2(const char *name, mel_atom *atoms, mel_func *funcs, mel_init initfunc, const char *code); @@ -1202,7 +1202,7 @@ const char *not_uniqueRef; const char *nth_valueRef; const char *ntileRef; const char *oidRef; -str openProfilerStream(Client cntxt, str s); +str openProfilerStream(Client cntxt, int m); const char *openRef; str operatorName(int i); void opt_pipes_reset(void); diff --git a/ctest/monetdb5/mal/test_malInclude.c b/ctest/monetdb5/mal/test_malInclude.c --- a/ctest/monetdb5/mal/test_malInclude.c +++ b/ctest/monetdb5/mal/test_malInclude.c @@ -25,6 +25,6 @@ main(void) char *modules[2]; modules[0] = "sql"; modules[1] = 0; - mal_init(modules, true); + mal_init(modules, true, NULL); return 0; } diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -74,11 +74,12 @@ monetdb (11.45.1) unstable; urgency=low minimize, simplify and optimize the process of generating and processing profiler output, only the events marking the end of an operation are emitted in most cases and the emitted json messages themselves are - trimmed down to their essential fields. Furthermore the MAL instruction - profiler.openstream now has an overload that takes a single string - argument which can be set to "min" to turn on the profiler in minimal - mode which causes it to only emit general events and excludes individual - MAL instruction execution events from the profiler streams. + trimmed down to their essential fields. Furthermore, the MAL instruction + profiler.openstream now requires an integer as a single argument, "0" for + default behaviour or "4" to turn on the profiler in minimal mode, + which causes it to only emit general events and excludes individual MAL + instruction execution events from the profiler streams. + The MAL instruction profiler.openstream with zero arguments is deprecated. -- Lucas Pereira <lucas.pere...@monetdbsolutions.com> Fri, 26 Aug 2022 11:15:27 +0200 diff --git a/misc/packages/deb/changelog b/misc/packages/deb/changelog --- a/misc/packages/deb/changelog +++ b/misc/packages/deb/changelog @@ -74,11 +74,12 @@ monetdb (11.45.1) unstable; urgency=low minimize, simplify and optimize the process of generating and processing profiler output, only the events marking the end of an operation are emitted in most cases and the emitted json messages themselves are - trimmed down to their essential fields. Furthermore the MAL instruction - profiler.openstream now has an overload that takes a single string - argument which can be set to "min" to turn on the profiler in minimal - mode which causes it to only emit general events and excludes individual - MAL instruction execution events from the profiler streams. + trimmed down to their essential fields. Furthermore, the MAL instruction + profiler.openstream now requires an integer as a single argument, "0" for + default behaviour or "4" to turn on the profiler in minimal mode, + which causes it to only emit general events and excludes individual MAL + instruction execution events from the profiler streams. + The MAL instruction profiler.openstream with zero arguments is deprecated. -- Lucas Pereira <lucas.pere...@monetdbsolutions.com> Fri, 26 Aug 2022 11:15:27 +0200 diff --git a/misc/packages/rpm/changelog b/misc/packages/rpm/changelog --- a/misc/packages/rpm/changelog +++ b/misc/packages/rpm/changelog @@ -49,11 +49,12 @@ minimize, simplify and optimize the process of generating and processing profiler output, only the events marking the end of an operation are emitted in most cases and the emitted json messages themselves are - trimmed down to their essential fields. Furthermore the MAL instruction - profiler.openstream now has an overload that takes a single string - argument which can be set to "min" to turn on the profiler in minimal - mode which causes it to only emit general events and excludes individual - MAL instruction execution events from the profiler streams. + trimmed down to their essential fields. Furthermore, the MAL instruction + profiler.openstream now requires an integer as a single argument, "0" for + default behaviour or "4" to turn on the profiler in minimal mode, + which causes it to only emit general events and excludes individual MAL + instruction execution events from the profiler streams. + The MAL instruction profiler.openstream with zero arguments is deprecated. * Thu Aug 25 2022 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> - 11.45.1-20220913 - sql: Extended system view sys.users with columns: schema_path, max_memory, diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c --- a/monetdb5/mal/mal.c +++ b/monetdb5/mal/mal.c @@ -139,7 +139,7 @@ mal_version(void) */ int -mal_init(char *modules[], bool embedded) +mal_init(char *modules[], bool embedded, const char *initpasswd) { /* Any error encountered here terminates the process * with a message sent to stderr @@ -161,7 +161,7 @@ mal_init(char *modules[], bool embedded) if (initialize_tl_client_key() != 0) return -1; - if ((err = AUTHinitTables(NULL)) != MAL_SUCCEED) { + if ((err = AUTHinitTables()) != MAL_SUCCEED) { freeException(err); return -1; } @@ -177,7 +177,7 @@ mal_init(char *modules[], bool embedded) initNamespace(); initParser(); - err = malBootstrap(modules, embedded); + err = malBootstrap(modules, embedded, initpasswd); if (err != MAL_SUCCEED) { mal_client_reset(); #ifndef NDEBUG diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h --- a/monetdb5/mal/mal.h +++ b/monetdb5/mal/mal.h @@ -72,7 +72,7 @@ mal_export MT_Lock mal_profileLock ; mal_export MT_Lock mal_copyLock ; mal_export MT_Lock mal_delayLock ; -mal_export int mal_init(char *modules[], bool embedded); +mal_export int mal_init(char *modules[], bool embedded, const char *initpasswd); mal_export _Noreturn void mal_exit(int status); mal_export void mal_reset(void); mal_export const char *mal_version(void); diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c --- a/monetdb5/mal/mal_authorize.c +++ b/monetdb5/mal/mal_authorize.c @@ -98,13 +98,11 @@ AUTHcommit(void) * after the GDK kernel has been initialized. */ str -AUTHinitTables(const char *passwd) { +AUTHinitTables(void) { bat bid; int isNew = 1; str msg = MAL_SUCCEED; - (void) passwd; - /* skip loading if already loaded */ if (rt_key != NULL && rt_deleted != NULL) return(MAL_SUCCEED); 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 @@ -20,7 +20,7 @@ mal_export str AUTHcheckCredentials(oid mal_export str AUTHgetUsername(str *ret, Client c); mal_export str AUTHgetPasswordHash(str *ret, Client c, const char *username); -mal_export str AUTHinitTables(const char *passwd); +mal_export str AUTHinitTables(void); mal_export str AUTHaddRemoteTableCredentials(const char *local_table, const char *localuser, const char *uri, const char *remoteuser, const char *pass, bool pw_encrypted); mal_export str AUTHgetRemoteTableCredentials(const char *local_table, str *uri, str *username, str *password); diff --git a/monetdb5/mal/mal_embedded.c b/monetdb5/mal/mal_embedded.c --- a/monetdb5/mal/mal_embedded.c +++ b/monetdb5/mal/mal_embedded.c @@ -83,7 +83,7 @@ malEmbeddedBoot(int workerlimit, int mem return msg; } } - if ((msg = AUTHinitTables(NULL)) != MAL_SUCCEED) + if ((msg = AUTHinitTables()) != MAL_SUCCEED) return msg; if (!MCinit()) @@ -124,7 +124,7 @@ malEmbeddedBoot(int workerlimit, int mem return msg; } char *modules[5] = { "embedded", "sql", "generator", "udf" }; - if ((msg = malIncludeModules(c, modules, 0, !with_mapi_server)) != MAL_SUCCEED) { + if ((msg = malIncludeModules(c, modules, 0, !with_mapi_server, NULL)) != MAL_SUCCEED) { MCcloseClient(c); setClientContext(c_old); // restore context return msg; diff --git a/monetdb5/mal/mal_prelude.c b/monetdb5/mal/mal_prelude.c --- a/monetdb5/mal/mal_prelude.c +++ b/monetdb5/mal/mal_prelude.c @@ -71,7 +71,7 @@ mal_module(const char *name, mel_atom *a } static char * -initModule(Client c, const char *name) +initModule(Client c, const char *name, const char *initpasswd) { char *msg = MAL_SUCCEED; @@ -92,6 +92,12 @@ initModule(Client c, const char *name) (void)ret; } else if (pci && pci->token == PATTERNsymbol) { assert(pci->fcn != NULL); + if (strcmp(name, "sql") == 0) { + /* HACK ALERT: temporarily use sqlcontext to pass + * the initial password to the prelude function */ + assert(c->sqlcontext == NULL); + c->sqlcontext = (void *) initpasswd; + } msg = (*pci->fcn)(c, NULL, NULL, NULL); } } @@ -454,7 +460,7 @@ malPrelude(Client c, int listing, int *s continue; } if (!mel_module[i].inits) { - msg = initModule(c, mel_module[i].name); + msg = initModule(c, mel_module[i].name, NULL); if (msg) return msg; } @@ -472,7 +478,7 @@ malPrelude(Client c, int listing, int *s } str -malIncludeModules(Client c, char *modules[], int listing, bool no_mapi_server) +malIncludeModules(Client c, char *modules[], int listing, bool no_mapi_server, const char *initpasswd) { str msg; _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org