Changeset: 1ff258f4636f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1ff258f4636f
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
monetdb5/modules/mal/clients.c
monetdb5/modules/mal/clients.mal
Branch: default
Log Message:
Use right types to match SQL definitions
diffs (288 lines):
diff --git a/clients/Tests/MAL-signatures.stable.out
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -10750,34 +10750,40 @@ stdout of test 'MAL-signatures` in direc
[ "clients", "getLogins", "command clients.getLogins() (user:bat[:oid],
start:bat[:str]) ", "CLTLogin;", "Pseudo bat of client id and login
time." ]
[ "clients", "getPasswordHash", "pattern
clients.getPasswordHash(user:str):str ", "CLTgetPasswordHash;", "Return
the password hash of the given user" ]
[ "clients", "getScenario", "pattern clients.getScenario():str ",
"CLTgetScenario;", "Retrieve current scenario name." ]
-[ "clients", "getTimeout", "pattern clients.getTimeout() (q:lng, s:lng) ",
"CLTgetTimeout;", "A query is aborted after q milliseconds (q=0 means run
undisturbed).\nThe session timeout aborts the connection after spending
too\nmany seconds on query processing." ]
[ "clients", "getUsername", "pattern clients.getUsername():str ",
"CLTgetUsername;", "Return the username of the currently logged in user"
]
[ "clients", "getUsers", "pattern clients.getUsers() (X_0:bat[:oid],
X_1:bat[:str]) ", "CLTgetUsers;", "return a BAT with user id and one with
name available in the system" ]
+[ "clients", "getprofile", "pattern clients.getprofile() (opt:str, q:lng,
s:lng, w:int, m:lng) ", "CLTgetProfile;", "Retrieve the profile settings
for a client" ]
[ "clients", "md5sum", "command clients.md5sum(pw:str):str ",
"CLTmd5sum;", "Return hex string representation of the MD5 hash of the given
string" ]
-[ "clients", "querytimeout", "pattern clients.querytimeout(sid:bte,
n:lng):void ", "CLTqueryTimeout;", "" ]
-[ "clients", "querytimeout", "pattern clients.querytimeout(sid:int,
n:lng):void ", "CLTqueryTimeout;", "" ]
-[ "clients", "querytimeout", "pattern clients.querytimeout(sid:sht,
n:lng):void ", "CLTqueryTimeout;", "" ]
[ "clients", "quit", "pattern clients.quit():void ", "CLTquit;",
"Terminate the client session." ]
[ "clients", "quit", "pattern clients.quit(idx:int):void ", "CLTquit;",
"Terminate the session for a single client using a soft error.\nIt is the
privilige of the console user." ]
[ "clients", "removeUser", "pattern clients.removeUser(nme:str):void ",
"CLTremoveUser;", "Remove the given user from the system" ]
[ "clients", "ripemd160sum", "command clients.ripemd160sum(pw:str):str ",
"CLTripemd160sum;", "Return hex string representation of the RIPEMD160 hash
of the given string" ]
-[ "clients", "sessiontimeout", "pattern
clients.sessiontimeout(sid:bte, n:lng):void ", "CLTsessionTimeout;", "Set the
session timeout for a particulat session id" ]
-[ "clients", "sessiontimeout", "pattern
clients.sessiontimeout(sid:int, n:lng):void ", "CLTsessionTimeout;", "Set the
session timeout for a particulat session id" ]
-[ "clients", "sessiontimeout", "pattern
clients.sessiontimeout(sid:sht, n:lng):void ", "CLTsessionTimeout;", "Set the
session timeout for a particulat session id" ]
[ "clients", "setListing", "pattern clients.setListing(flag:int):int ",
"CLTsetListing;", "Turn on/off echo of MAL instructions:\n\t1 - echo
input,\n\t2 - show mal instruction,\n\t4 - show details of type resolutoin,
\n\t8 - show binding information." ]
[ "clients", "setPassword", "pattern clients.setPassword(user:str,
pass:str):void ", "CLTsetPassword;", "Set the password for the
given user" ]
[ "clients", "setScenario", "pattern clients.setScenario(msg:str):str ",
"CLTsetScenario;", "Switch to other scenario handler, return previous
one." ]
+[ "clients", "setmemorylimit", "pattern
clients.setmemorylimit(n:lng):void ", "CLTsetmemorylimit;", "" ]
+[ "clients", "setmemorylimit", "pattern
clients.setmemorylimit(sid:int, n:lng):void ", "CLTsetmemorylimit;", "Limit
the memory claim in MB per query" ]
+[ "clients", "setoptimizer", "pattern clients.setoptimizer(opt:str):void ",
"CLTsetoptimizer;", "" ]
+[ "clients", "setoptimizer", "pattern clients.setoptimizer(sid:int,
opt:str):void ", "CLTsetoptimizer;", "Set the session optimizer" ]
[ "clients", "setprinttimeout", "command
clients.setprinttimeout(n:int):void ", "CLTsetPrintTimeout;", "Print running
query every so many seconds." ]
-[ "clients", "setsession", "pattern clients.setsession(n:lng):void ",
"CLTsetSessionTimeout;", "Abort a session after n seconds." ]
-[ "clients", "settimeout", "pattern clients.settimeout(n:lng):void ",
"CLTsetTimeout;", "Abort a query after q seconds (q=0 means run
undisturbed).\nThe session timeout aborts the connection after spending
too\nmany seconds on query processing." ]
+[ "clients", "setquerytimeout", "pattern
clients.setquerytimeout(n:lng):void ", "CLTqueryTimeout;", "" ]
+[ "clients", "setquerytimeout", "pattern
clients.setquerytimeout(sid:bte, n:lng):void ", "CLTqueryTimeout;",
"" ]
+[ "clients", "setquerytimeout", "pattern
clients.setquerytimeout(sid:int, n:lng):void ", "CLTqueryTimeout;",
"A query is aborted after q milliseconds (q=0 means run undisturbed)." ]
+[ "clients", "setquerytimeout", "pattern
clients.setquerytimeout(sid:sht, n:lng):void ", "CLTqueryTimeout;",
"" ]
+[ "clients", "setsessiontimeout", "pattern
clients.setsessiontimeout(n:lng):void ", "CLTsessionTimeout;", "" ]
+[ "clients", "setsessiontimeout", "pattern
clients.setsessiontimeout(sid:bte, n:lng):void ", "CLTsessionTimeout;",
"" ]
+[ "clients", "setsessiontimeout", "pattern
clients.setsessiontimeout(sid:int, n:lng):void ", "CLTsessionTimeout;",
"Set the session timeout for a particulat session id" ]
+[ "clients", "setsessiontimeout", "pattern
clients.setsessiontimeout(sid:sht, n:lng):void ", "CLTsessionTimeout;",
"" ]
+[ "clients", "setworkerlimit", "pattern
clients.setworkerlimit(n:int):void ", "CLTsetworkerlimit;", "" ]
+[ "clients", "setworkerlimit", "pattern
clients.setworkerlimit(sid:int, n:int):void ", "CLTsetworkerlimit;", "Limit
the number of worker threads per query" ]
[ "clients", "sha1sum", "command clients.sha1sum(pw:str):str ",
"CLTsha1sum;", "Return hex string representation of the SHA-1 hash of the
given string" ]
[ "clients", "sha2sum", "command clients.sha2sum(pw:str, bits:int):str
", "CLTsha2sum;", "Return hex string representation of the SHA-2 hash
with bits of the given string" ]
[ "clients", "shutdown", "pattern clients.shutdown(delay:int):str ",
"CLTshutdown;", "" ]
[ "clients", "shutdown", "pattern clients.shutdown(delay:int,
forced:bit):str ", "CLTshutdown;", "Close all other client connections. Return
if it succeeds.\nIf forced is set then always stop the system the hard way" ]
[ "clients", "stop", "pattern clients.stop(id:int):void ", "CLTstop;",
"Stop the query execution at the next eligble statement." ]
-[ "clients", "stopsession", "pattern clients.stopsession(sid:bte):void ",
"CLTstopSession;", "Stop a particular session" ]
+[ "clients", "stopsession", "pattern clients.stopsession(sid:bte):void ",
"CLTstopSession;", "" ]
[ "clients", "stopsession", "pattern clients.stopsession(sid:int):void ",
"CLTstopSession;", "Stop a particular session" ]
-[ "clients", "stopsession", "pattern clients.stopsession(sid:sht):void ",
"CLTstopSession;", "Stop a particular session" ]
+[ "clients", "stopsession", "pattern clients.stopsession(sid:sht):void ",
"CLTstopSession;", "" ]
[ "clients", "suspend", "pattern clients.suspend(id:int):void ",
"CLTsuspend;", "Put a client process to sleep for some time.\nIt will simple
sleep for a second at a time, until\nthe awake bit has been set in its
descriptor" ]
[ "clients", "wakeup", "command clients.wakeup(id:int):void ",
"CLTwakeup;", "Wakeup a client process" ]
[ "color", "#fromstr", "command color.#fromstr():void ",
"color_fromstr;", "" ]
@@ -11762,7 +11768,7 @@ stdout of test 'MAL-signatures` in direc
[ "sql", "round", "command sql.round(v:sht, d:int, s:int,
r:bte):sht ", "sht_round_wrap;", "round off the decimal v(d,s) to r
digits behind the dot (if r < 0, before the dot)" ]
[ "sql", "row_number", "pattern sql.row_number(b:any_1, p:bit,
o:bit):int ", "SQLrow_number;", "return the row_numer-ed groups"
]
[ "sql", "rt_credentials", "pattern
sql.rt_credentials(tablename:str) (uri:bat[:str], username:bat[:str],
hash:bat[:str]) ", "sql_rt_credentials_wrap;", "Return the remote
table credentials for the given table" ]
-[ "sql", "sessions", "pattern sql.sessions() (id:bat[:int],
user:bat[:str], start:bat[:timestamp], stimeout:bat[:lng],
lastcmd:bat[:timestamp], qtimeout:bat[:lng], idle:bat[:int]) ",
"sql_sessions_wrap;", "SQL export table of active sessions, their timeouts
and idle status" ]
+[ "sql", "sessions", "pattern sql.sessions() (id:bat[:int],
user:bat[:str], start:bat[:timestamp], idle:bat[:timestamp],
optmizer:bat[:str], stimeout:bat[:lng], qtimeout:bat[:lng], wlimit:bat[:int],
mlimit:bat[:lng]) ", "sql_sessions_wrap;", "SQL export table of active
sessions, their timeouts and idle status" ]
[ "sql", "setVariable", "pattern sql.setVariable(mvc:int, varname:str,
value:any_1):int ", "setVariable;", "Set the value of a session variable"
]
[ "sql", "shrink", "pattern sql.shrink(sch:str, tbl:str):void ",
"SQLshrink;", "Consolidate the deletion table over all columns using
shrinking" ]
[ "sql", "shutdown", "pattern sql.shutdown(delay:bte):str ",
"SQLshutdown_wrap;", "" ]
diff --git a/clients/Tests/MAL-signatures.stable.out.int128
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -15138,34 +15138,40 @@ stdout of test 'MAL-signatures` in direc
[ "clients", "getLogins", "command clients.getLogins() (user:bat[:oid],
start:bat[:str]) ", "CLTLogin;", "Pseudo bat of client id and login
time." ]
[ "clients", "getPasswordHash", "pattern
clients.getPasswordHash(user:str):str ", "CLTgetPasswordHash;", "Return
the password hash of the given user" ]
[ "clients", "getScenario", "pattern clients.getScenario():str ",
"CLTgetScenario;", "Retrieve current scenario name." ]
-[ "clients", "getTimeout", "pattern clients.getTimeout() (q:lng, s:lng) ",
"CLTgetTimeout;", "A query is aborted after q milliseconds (q=0 means run
undisturbed).\nThe session timeout aborts the connection after spending
too\nmany seconds on query processing." ]
[ "clients", "getUsername", "pattern clients.getUsername():str ",
"CLTgetUsername;", "Return the username of the currently logged in user"
]
[ "clients", "getUsers", "pattern clients.getUsers() (X_0:bat[:oid],
X_1:bat[:str]) ", "CLTgetUsers;", "return a BAT with user id and one with
name available in the system" ]
+[ "clients", "getprofile", "pattern clients.getprofile() (opt:str, q:lng,
s:lng, w:int, m:lng) ", "CLTgetProfile;", "Retrieve the profile settings
for a client" ]
[ "clients", "md5sum", "command clients.md5sum(pw:str):str ",
"CLTmd5sum;", "Return hex string representation of the MD5 hash of the given
string" ]
-[ "clients", "querytimeout", "pattern clients.querytimeout(sid:bte,
n:lng):void ", "CLTqueryTimeout;", "" ]
-[ "clients", "querytimeout", "pattern clients.querytimeout(sid:int,
n:lng):void ", "CLTqueryTimeout;", "" ]
-[ "clients", "querytimeout", "pattern clients.querytimeout(sid:sht,
n:lng):void ", "CLTqueryTimeout;", "" ]
[ "clients", "quit", "pattern clients.quit():void ", "CLTquit;",
"Terminate the client session." ]
[ "clients", "quit", "pattern clients.quit(idx:int):void ", "CLTquit;",
"Terminate the session for a single client using a soft error.\nIt is the
privilige of the console user." ]
[ "clients", "removeUser", "pattern clients.removeUser(nme:str):void ",
"CLTremoveUser;", "Remove the given user from the system" ]
[ "clients", "ripemd160sum", "command clients.ripemd160sum(pw:str):str ",
"CLTripemd160sum;", "Return hex string representation of the RIPEMD160 hash
of the given string" ]
-[ "clients", "sessiontimeout", "pattern
clients.sessiontimeout(sid:bte, n:lng):void ", "CLTsessionTimeout;", "Set the
session timeout for a particulat session id" ]
-[ "clients", "sessiontimeout", "pattern
clients.sessiontimeout(sid:int, n:lng):void ", "CLTsessionTimeout;", "Set the
session timeout for a particulat session id" ]
-[ "clients", "sessiontimeout", "pattern
clients.sessiontimeout(sid:sht, n:lng):void ", "CLTsessionTimeout;", "Set the
session timeout for a particulat session id" ]
[ "clients", "setListing", "pattern clients.setListing(flag:int):int ",
"CLTsetListing;", "Turn on/off echo of MAL instructions:\n\t1 - echo
input,\n\t2 - show mal instruction,\n\t4 - show details of type resolutoin,
\n\t8 - show binding information." ]
[ "clients", "setPassword", "pattern clients.setPassword(user:str,
pass:str):void ", "CLTsetPassword;", "Set the password for the
given user" ]
[ "clients", "setScenario", "pattern clients.setScenario(msg:str):str ",
"CLTsetScenario;", "Switch to other scenario handler, return previous
one." ]
+[ "clients", "setmemorylimit", "pattern
clients.setmemorylimit(n:lng):void ", "CLTsetmemorylimit;", "" ]
+[ "clients", "setmemorylimit", "pattern
clients.setmemorylimit(sid:int, n:lng):void ", "CLTsetmemorylimit;", "Limit
the memory claim in MB per query" ]
+[ "clients", "setoptimizer", "pattern clients.setoptimizer(opt:str):void ",
"CLTsetoptimizer;", "" ]
+[ "clients", "setoptimizer", "pattern clients.setoptimizer(sid:int,
opt:str):void ", "CLTsetoptimizer;", "Set the session optimizer" ]
[ "clients", "setprinttimeout", "command
clients.setprinttimeout(n:int):void ", "CLTsetPrintTimeout;", "Print running
query every so many seconds." ]
-[ "clients", "setsession", "pattern clients.setsession(n:lng):void ",
"CLTsetSessionTimeout;", "Abort a session after n seconds." ]
-[ "clients", "settimeout", "pattern clients.settimeout(n:lng):void ",
"CLTsetTimeout;", "Abort a query after q seconds (q=0 means run
undisturbed).\nThe session timeout aborts the connection after spending
too\nmany seconds on query processing." ]
+[ "clients", "setquerytimeout", "pattern
clients.setquerytimeout(n:lng):void ", "CLTqueryTimeout;", "" ]
+[ "clients", "setquerytimeout", "pattern
clients.setquerytimeout(sid:bte, n:lng):void ", "CLTqueryTimeout;",
"" ]
+[ "clients", "setquerytimeout", "pattern
clients.setquerytimeout(sid:int, n:lng):void ", "CLTqueryTimeout;",
"A query is aborted after q milliseconds (q=0 means run undisturbed)." ]
+[ "clients", "setquerytimeout", "pattern
clients.setquerytimeout(sid:sht, n:lng):void ", "CLTqueryTimeout;",
"" ]
+[ "clients", "setsessiontimeout", "pattern
clients.setsessiontimeout(n:lng):void ", "CLTsessionTimeout;", "" ]
+[ "clients", "setsessiontimeout", "pattern
clients.setsessiontimeout(sid:bte, n:lng):void ", "CLTsessionTimeout;",
"" ]
+[ "clients", "setsessiontimeout", "pattern
clients.setsessiontimeout(sid:int, n:lng):void ", "CLTsessionTimeout;",
"Set the session timeout for a particulat session id" ]
+[ "clients", "setsessiontimeout", "pattern
clients.setsessiontimeout(sid:sht, n:lng):void ", "CLTsessionTimeout;",
"" ]
+[ "clients", "setworkerlimit", "pattern
clients.setworkerlimit(n:int):void ", "CLTsetworkerlimit;", "" ]
+[ "clients", "setworkerlimit", "pattern
clients.setworkerlimit(sid:int, n:int):void ", "CLTsetworkerlimit;", "Limit
the number of worker threads per query" ]
[ "clients", "sha1sum", "command clients.sha1sum(pw:str):str ",
"CLTsha1sum;", "Return hex string representation of the SHA-1 hash of the
given string" ]
[ "clients", "sha2sum", "command clients.sha2sum(pw:str, bits:int):str
", "CLTsha2sum;", "Return hex string representation of the SHA-2 hash
with bits of the given string" ]
[ "clients", "shutdown", "pattern clients.shutdown(delay:int):str ",
"CLTshutdown;", "" ]
[ "clients", "shutdown", "pattern clients.shutdown(delay:int,
forced:bit):str ", "CLTshutdown;", "Close all other client connections. Return
if it succeeds.\nIf forced is set then always stop the system the hard way" ]
[ "clients", "stop", "pattern clients.stop(id:int):void ", "CLTstop;",
"Stop the query execution at the next eligble statement." ]
-[ "clients", "stopsession", "pattern clients.stopsession(sid:bte):void ",
"CLTstopSession;", "Stop a particular session" ]
+[ "clients", "stopsession", "pattern clients.stopsession(sid:bte):void ",
"CLTstopSession;", "" ]
[ "clients", "stopsession", "pattern clients.stopsession(sid:int):void ",
"CLTstopSession;", "Stop a particular session" ]
-[ "clients", "stopsession", "pattern clients.stopsession(sid:sht):void ",
"CLTstopSession;", "Stop a particular session" ]
+[ "clients", "stopsession", "pattern clients.stopsession(sid:sht):void ",
"CLTstopSession;", "" ]
[ "clients", "suspend", "pattern clients.suspend(id:int):void ",
"CLTsuspend;", "Put a client process to sleep for some time.\nIt will simple
sleep for a second at a time, until\nthe awake bit has been set in its
descriptor" ]
[ "clients", "wakeup", "command clients.wakeup(id:int):void ",
"CLTwakeup;", "Wakeup a client process" ]
[ "color", "#fromstr", "command color.#fromstr():void ",
"color_fromstr;", "" ]
@@ -16174,7 +16180,7 @@ stdout of test 'MAL-signatures` in direc
[ "sql", "round", "command sql.round(v:sht, d:int, s:int,
r:bte):sht ", "sht_round_wrap;", "round off the decimal v(d,s) to r
digits behind the dot (if r < 0, before the dot)" ]
[ "sql", "row_number", "pattern sql.row_number(b:any_1, p:bit,
o:bit):int ", "SQLrow_number;", "return the row_numer-ed groups"
]
[ "sql", "rt_credentials", "pattern
sql.rt_credentials(tablename:str) (uri:bat[:str], username:bat[:str],
hash:bat[:str]) ", "sql_rt_credentials_wrap;", "Return the remote
table credentials for the given table" ]
-[ "sql", "sessions", "pattern sql.sessions() (id:bat[:int],
user:bat[:str], start:bat[:timestamp], stimeout:bat[:lng],
lastcmd:bat[:timestamp], qtimeout:bat[:lng], idle:bat[:int]) ",
"sql_sessions_wrap;", "SQL export table of active sessions, their timeouts
and idle status" ]
+[ "sql", "sessions", "pattern sql.sessions() (id:bat[:int],
user:bat[:str], start:bat[:timestamp], idle:bat[:timestamp],
optmizer:bat[:str], stimeout:bat[:lng], qtimeout:bat[:lng], wlimit:bat[:int],
mlimit:bat[:lng]) ", "sql_sessions_wrap;", "SQL export table of active
sessions, their timeouts and idle status" ]
[ "sql", "setVariable", "pattern sql.setVariable(mvc:int, varname:str,
value:any_1):int ", "setVariable;", "Set the value of a session variable"
]
[ "sql", "shrink", "pattern sql.shrink(sch:str, tbl:str):void ",
"SQLshrink;", "Consolidate the deletion table over all columns using
shrinking" ]
[ "sql", "shutdown", "pattern sql.shutdown(delay:bte):str ",
"SQLshutdown_wrap;", "" ]
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
@@ -924,8 +924,8 @@ str CLTchangeUsername(Client cntxt, MalB
str CLTcheckPermission(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
pci);
str CLTgetClientId(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CLTgetPasswordHash(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
pci);
+str CLTgetProfile(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CLTgetScenario(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CLTgetTimeout(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CLTgetUsername(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CLTgetUsers(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CLTmd5sum(str *ret, str *pw);
@@ -939,8 +939,9 @@ str CLTsetListing(Client cntxt, MalBlkPt
str CLTsetPassword(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CLTsetPrintTimeout(void *ret, int *secs);
str CLTsetScenario(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CLTsetSessionTimeout(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
pci);
-str CLTsetTimeout(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+str CLTsetmemorylimit(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+str CLTsetoptimizer(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+str CLTsetworkerlimit(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CLTsha1sum(str *ret, str *pw);
str CLTsha2sum(str *ret, str *pw, int *bits);
str CLTshutdown(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
diff --git a/monetdb5/modules/mal/clients.c b/monetdb5/modules/mal/clients.c
--- a/monetdb5/modules/mal/clients.c
+++ b/monetdb5/modules/mal/clients.c
@@ -237,12 +237,12 @@ CLTstop(Client cntxt, MalBlkPtr mb, MalS
str
CLTsetoptimizer(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
{
- int idx;
+ int idx;
str opt;
- (void) mb;
+ (void) mb;
if( pci->argc == 3){
- idx = *getArgReference_sht(stk,pci,1);
+ idx = *getArgReference_int(stk,pci,1);
opt = *getArgReference_str(stk,pci,2);
} else {
idx = cntxt->idx;
@@ -253,20 +253,20 @@ CLTsetoptimizer(Client cntxt, MalBlkPtr
throw(MAL,"setoptimizer","Illegal session id");
if (mal_clients[idx].mode == FREECLIENT)
throw(MAL,"setoptimizer","Session not active anymore ");
- if (cntxt->user == mal_clients[idx].user || cntxt->user == MAL_ADMIN){
- strncpy(mal_clients[idx].optimizer, opt, IDLENGTH);
+ if (cntxt->user == mal_clients[idx].user || cntxt->user == MAL_ADMIN){
+ strncpy(mal_clients[idx].optimizer, opt, IDLENGTH);
}
- return MAL_SUCCEED;
+ return MAL_SUCCEED;
}
str
CLTsetworkerlimit(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
{
- int idx, limit;
+ int idx, limit;
- (void) mb;
+ (void) mb;
if(pci->argc == 3){
- idx = *getArgReference_sht(stk,pci,1);
+ idx = *getArgReference_int(stk,pci,1);
limit = *getArgReference_int(stk,pci,2);
} else {
idx = cntxt->idx;
@@ -277,34 +277,35 @@ CLTsetworkerlimit(Client cntxt, MalBlkPt
throw(MAL,"setworkerlimit","Illegal session id");
if (mal_clients[idx].mode == FREECLIENT)
throw(MAL,"setworkerlimit","Session not active anymore ");
- if (cntxt->user == mal_clients[idx].user || cntxt->user == MAL_ADMIN){
- mal_clients[idx].workerlimit = limit;
+ if (cntxt->user == mal_clients[idx].user || cntxt->user == MAL_ADMIN){
+ mal_clients[idx].workerlimit = limit;
}
- return MAL_SUCCEED;
+ return MAL_SUCCEED;
}
str
CLTsetmemorylimit(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
{
- int idx, limit;
+ int idx;
+ lng limit;
- (void) mb;
+ (void) mb;
if(pci->argc == 3){
idx = *getArgReference_sht(stk,pci,1);
- limit = *getArgReference_int(stk,pci,2);
+ limit = *getArgReference_lng(stk,pci,2);
} else{
idx = cntxt->idx;
- limit = *getArgReference_int(stk,pci,1);
+ limit = *getArgReference_lng(stk,pci,1);
}
if( idx < 0 || idx > MAL_MAXCLIENTS)
throw(MAL,"setmemorylimit","Illegal session id");
if (mal_clients[idx].mode == FREECLIENT)
throw(MAL,"setmemorylimit","Session not active anymore ");
- if (cntxt->user == mal_clients[idx].user || cntxt->user == MAL_ADMIN){
- mal_clients[idx].memorylimit = limit;
+ if (cntxt->user == mal_clients[idx].user || cntxt->user == MAL_ADMIN){
+ mal_clients[idx].memorylimit = limit;
}
- return MAL_SUCCEED;
+ return MAL_SUCCEED;
}
str
diff --git a/monetdb5/modules/mal/clients.mal b/monetdb5/modules/mal/clients.mal
--- a/monetdb5/modules/mal/clients.mal
+++ b/monetdb5/modules/mal/clients.mal
@@ -67,7 +67,7 @@ pattern setquerytimeout(sid:bte, n:lng):
address CLTqueryTimeout;
pattern setquerytimeout(sid:sht, n:lng):void
address CLTqueryTimeout;
-pattern setquerytimeout(sid:sht, n:lng):void
+pattern setquerytimeout(sid:int, n:lng):void
address CLTqueryTimeout
comment "A query is aborted after q milliseconds (q=0 means run undisturbed).";
@@ -77,25 +77,25 @@ pattern setsessiontimeout(sid:bte, n:lng
address CLTsessionTimeout;
pattern setsessiontimeout(sid:sht, n:lng):void
address CLTsessionTimeout;
-pattern setsessiontimeout(sid:sht, n:lng):void
+pattern setsessiontimeout(sid:int, n:lng):void
address CLTsessionTimeout
comment "Set the session timeout for a particulat session id";
pattern setoptimizer(opt:str):void
address CLTsetoptimizer;
-pattern setoptimizer(sid:sht, opt:str):void
+pattern setoptimizer(sid:int, opt:str):void
address CLTsetoptimizer
comment "Set the session optimizer";
pattern setworkerlimit(n:int):void
address CLTsetworkerlimit;
-pattern setworkerlimit(sid:sht, n:int):void
+pattern setworkerlimit(sid:int, n:int):void
address CLTsetworkerlimit
comment "Limit the number of worker threads per query";
-pattern setmemorylimit(n:int):void
+pattern setmemorylimit(n:lng):void
address CLTsetmemorylimit;
-pattern setmemorylimit(sid:sht, n:int):void
+pattern setmemorylimit(sid:int, n:lng):void
address CLTsetmemorylimit
comment "Limit the memory claim in MB per query";
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list