Changeset: 4f6b0c7f7af7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/4f6b0c7f7af7
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
clients/Tests/exports.stable.out
monetdb5/mal/mal_client.h
monetdb5/mal/mal_scenario.c
monetdb5/mal/mal_scenario.h
monetdb5/mal/mal_session.c
monetdb5/modules/mal/clients.c
sql/scripts/22_clients.sql
Branch: simplify_scenario
Log Message:
more scenario cleanup, close to juse init/exit login/off and statement (or set
of statements).
diffs (truncated from 583 to 300 lines):
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
@@ -44719,11 +44719,6 @@ unsafe pattern clients.setquerytimeout(X
CLTqueryTimeout;
A query is aborted after q seconds (q=0 means run undisturbed).
clients
-setsession
-unsafe pattern clients.setsession(X_0:lng):void
-CLTsetSessionTimeout;
-Abort a session after n seconds.
-clients
setsessiontimeout
unsafe pattern clients.setsessiontimeout(X_0:int):void
CLTsessionTimeout;
@@ -44734,16 +44729,6 @@ unsafe pattern clients.setsessiontimeout
CLTsessionTimeout;
Set the session timeout for a particulat session id
clients
-settimeout
-unsafe pattern clients.settimeout(X_0:lng):void
-CLTsetTimeout;
-Abort a query after n seconds.
-clients
-settimeout
-unsafe pattern clients.settimeout(X_0:lng, X_1:lng):void
-CLTsetTimeout;
-Abort a query after q seconds (q=0 means run undisturbed).@The session timeout
aborts the connection after spending too@many seconds on query processing.
-clients
setworkerlimit
unsafe pattern clients.setworkerlimit(X_0:int):void
CLTsetworkerlimit;
@@ -47169,11 +47154,6 @@ pattern mdb.List():void
MDBlistDetail;
Dump the current routine on standard out.
mdb
-dump
-pattern mdb.dump():void
-MDBdump;
-Dump instruction, stacktrace, and stack
-mdb
getContext
command mdb.getContext(X_0:str):str
MDBgetExceptionContext;
@@ -47229,11 +47209,6 @@ pattern mdb.getVMsize():lng
MDBgetVMsize;
Retrieve the max VM size
mdb
-inspect
-pattern mdb.inspect(X_0:str, X_1:str):void
-MDBinspect;
-Run the debugger on a specific function
-mdb
list
pattern mdb.list(X_0:str, X_1:str):void
MDBlist3;
@@ -47254,11 +47229,6 @@ command mdb.modules():bat[:str]
CMDmodules;
List available modules
mdb
-setCatch
-pattern mdb.setCatch(X_0:bit):void
-MDBsetCatch;
-Turn on/off catching exceptions
-mdb
setDebug
pattern mdb.setDebug(X_0:int):int
MDBsetDebug;
@@ -47269,36 +47239,11 @@ pattern mdb.setDebug(X_0:str):int
MDBsetDebugStr;
Set the kernel debugging bit-set and return its previous value.@The recognized
options are: threads, memory, properties,@io, transactions, modules,
algorithms, estimates.
mdb
-setTrace
-pattern mdb.setTrace(X_0:bit):void
-MDBsetTrace;
-Turn on/off tracing of current routine
-mdb
-setTrace
-pattern mdb.setTrace(X_0:str):void
-MDBsetVarTrace;
-Turn on/off tracing of a variable
-mdb
setVMsize
pattern mdb.setVMsize(X_0:lng):lng
MDBsetVMsize;
Manipulate the VM max size in MBs
mdb
-start
-pattern mdb.start():void
-MDBstart;
-Start interactive debugger
-mdb
-start
-pattern mdb.start(X_0:int):void
-MDBstart;
-Start interactive debugger on a client
-mdb
-stop
-pattern mdb.stop():void
-MDBstop;
-Stop the interactive debugger
-mdb
var
pattern mdb.var(X_0:str, X_1:str):void
MDBvar3;
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
@@ -33214,11 +33214,6 @@ unsafe pattern clients.setquerytimeout(X
CLTqueryTimeout;
A query is aborted after q seconds (q=0 means run undisturbed).
clients
-setsession
-unsafe pattern clients.setsession(X_0:lng):void
-CLTsetSessionTimeout;
-Abort a session after n seconds.
-clients
setsessiontimeout
unsafe pattern clients.setsessiontimeout(X_0:int):void
CLTsessionTimeout;
@@ -33229,16 +33224,6 @@ unsafe pattern clients.setsessiontimeout
CLTsessionTimeout;
Set the session timeout for a particulat session id
clients
-settimeout
-unsafe pattern clients.settimeout(X_0:lng):void
-CLTsetTimeout;
-Abort a query after n seconds.
-clients
-settimeout
-unsafe pattern clients.settimeout(X_0:lng, X_1:lng):void
-CLTsetTimeout;
-Abort a query after q seconds (q=0 means run undisturbed).@The session timeout
aborts the connection after spending too@many seconds on query processing.
-clients
setworkerlimit
unsafe pattern clients.setworkerlimit(X_0:int):void
CLTsetworkerlimit;
@@ -35599,11 +35584,6 @@ pattern mdb.List():void
MDBlistDetail;
Dump the current routine on standard out.
mdb
-dump
-pattern mdb.dump():void
-MDBdump;
-Dump instruction, stacktrace, and stack
-mdb
getContext
command mdb.getContext(X_0:str):str
MDBgetExceptionContext;
@@ -35659,11 +35639,6 @@ pattern mdb.getVMsize():lng
MDBgetVMsize;
Retrieve the max VM size
mdb
-inspect
-pattern mdb.inspect(X_0:str, X_1:str):void
-MDBinspect;
-Run the debugger on a specific function
-mdb
list
pattern mdb.list(X_0:str, X_1:str):void
MDBlist3;
@@ -35684,11 +35659,6 @@ command mdb.modules():bat[:str]
CMDmodules;
List available modules
mdb
-setCatch
-pattern mdb.setCatch(X_0:bit):void
-MDBsetCatch;
-Turn on/off catching exceptions
-mdb
setDebug
pattern mdb.setDebug(X_0:int):int
MDBsetDebug;
@@ -35699,36 +35669,11 @@ pattern mdb.setDebug(X_0:str):int
MDBsetDebugStr;
Set the kernel debugging bit-set and return its previous value.@The recognized
options are: threads, memory, properties,@io, transactions, modules,
algorithms, estimates.
mdb
-setTrace
-pattern mdb.setTrace(X_0:bit):void
-MDBsetTrace;
-Turn on/off tracing of current routine
-mdb
-setTrace
-pattern mdb.setTrace(X_0:str):void
-MDBsetVarTrace;
-Turn on/off tracing of a variable
-mdb
setVMsize
pattern mdb.setVMsize(X_0:lng):lng
MDBsetVMsize;
Manipulate the VM max size in MBs
mdb
-start
-pattern mdb.start():void
-MDBstart;
-Start interactive debugger
-mdb
-start
-pattern mdb.start(X_0:int):void
-MDBstart;
-Start interactive debugger on a client
-mdb
-stop
-pattern mdb.stop():void
-MDBstop;
-Stop the interactive debugger
-mdb
var
pattern mdb.var(X_0:str, X_1:str):void
MDBvar3;
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
@@ -746,9 +746,7 @@ lng MALdebug;
str MALengine(Client c);
str MALexitClient(Client c);
str MALinitClient(Client c);
-str MALoptimizer(Client c);
str MALparser(Client c);
-str MALreader(Client c);
MALfcn MANIFOLDtypecheck(Client cntxt, MalBlkPtr mb, InstrPtr pci, int
checkprops);
int MCactiveClients(void);
str MCawakeClient(int id);
@@ -1201,7 +1199,6 @@ const char *row_numberRef;
const char *rpcRef;
const char *rsColumnRef;
str runMAL(Client c, MalBlkPtr mb, MalBlkPtr mbcaller, MalStkPtr env);
-str runMALDebugger(Client cntxt, MalBlkPtr mb);
str runMALsequence(Client cntxt, MalBlkPtr mb, int startpc, int stoppc,
MalStkPtr stk, MalStkPtr env, InstrPtr pcicaller);
oid runtimeProfileSetTag(Client cntxt);
const char *sampleRef;
diff --git a/monetdb5/mal/mal_client.h b/monetdb5/mal/mal_client.h
--- a/monetdb5/mal/mal_client.h
+++ b/monetdb5/mal/mal_client.h
@@ -44,6 +44,9 @@ typedef struct CLIENT_INPUT {
struct CLIENT_INPUT *next;
} ClientInput;
+typedef struct CLIENT *Client;
+typedef str (*init_client)(Client, const char *, const char *, const char *);
+
typedef struct CLIENT {
int idx; /* entry in mal_clients (-1 if free) */
oid user; /* user id in the auth administration */
@@ -57,7 +60,10 @@ typedef struct CLIENT {
* provided to temporarily switch to another scenario.
*/
str scenario; /* scenario management references */
- MALfcn phase[SCENARIO_PROPERTIES];
+ MALfcn engine;
+ MALfcn callback;
+ init_client initClient;
+ MALfcn exitClient;
/* if set to 'S' it will put
the process to sleep */
bit sqlprofiler; /* control off-line sql
performance monitoring */
/*
diff --git a/monetdb5/mal/mal_scenario.c b/monetdb5/mal/mal_scenario.c
--- a/monetdb5/mal/mal_scenario.c
+++ b/monetdb5/mal/mal_scenario.c
@@ -85,7 +85,7 @@ static struct SCENARIO scenarioRec[MAXSC
{ .name = "mal",
.language = "mal",
.initClient = "MALinitClient",
- .initClientCmd = (MALfcn) MALinitClient,
+ .initClientCmd = (init_client) MALinitClient,
.exitClient = "MALexitClient",
.exitClientCmd = (MALfcn) MALexitClient,
.engine = "MALengine",
@@ -197,7 +197,7 @@ str getScenarioLanguage(Client c){
* Before we initialize a scenario the client scenario is reset to
* the MAL scenario. This implies that all scenarios are initialized
* using the same scenario. After the scenario initialization file
- * has been processed, the scenario phases are replaced with the
+ * has been processed, the scenario functions are replaced with the
* proper ones.
*
* All client records should be initialized with a default
@@ -208,10 +208,10 @@ fillScenario(Client c, Scenario scen)
{
c->scenario = scen->name;
- c->phase[MAL_SCENARIO_CALLBACK] = scen->callbackCmd;
- c->phase[MAL_SCENARIO_ENGINE] = scen->engineCmd;
- c->phase[MAL_SCENARIO_INITCLIENT] = scen->initClientCmd;
- c->phase[MAL_SCENARIO_EXITCLIENT] = scen->exitClientCmd;
+ c->engine = scen->engineCmd;
+ c->callback = scen->callbackCmd;
+ c->initClient = scen->initClientCmd;
+ c->exitClient = scen->exitClientCmd;
return(MAL_SUCCEED);
}
@@ -222,7 +222,6 @@ fillScenario(Client c, Scenario scen)
str
setScenario(Client c, str nme)
{
- int i;
str msg;
Scenario scen;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]