Changeset: d2ffbb567850 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d2ffbb567850
Modified Files:
        monetdb5/modules/mal/querylog.c
        monetdb5/modules/mal/querylog.h
        monetdb5/modules/mal/querylog.mal
        sql/backends/monet5/sql.mx
        sql/scripts/15_querylog.sql
Branch: default
Log Message:

Change querylog naming to {enable/disable/empty}


diffs (173 lines):

diff --git a/monetdb5/modules/mal/querylog.c b/monetdb5/modules/mal/querylog.c
--- a/monetdb5/modules/mal/querylog.c
+++ b/monetdb5/modules/mal/querylog.c
@@ -222,7 +222,7 @@ initQlog(void)
 }
 
 str
-QLOGinit(int *ret)
+QLOGenable(int *ret)
 {
        (void) ret;
        QLOGtrace = TRUE;
@@ -230,7 +230,7 @@ QLOGinit(int *ret)
 }
 
 str
-QLOGinitThreshold(int *ret, int *threshold)
+QLOGenableThreshold(int *ret, int *threshold)
 {
        (void) ret;
        QLOGthreshold = *threshold;
@@ -238,7 +238,7 @@ QLOGinitThreshold(int *ret, int *thresho
 }
 
 str
-QLOGdone(int *ret)
+QLOGdisable(int *ret)
 {
        (void) ret;
        QLOGtrace = FALSE;
@@ -259,7 +259,7 @@ QLOGissetFcn(int *ret)
 }
 
 str
-QLOGreset(int *ret)
+QLOGempty(int *ret)
 {
        (void) ret;
        initQlog();
diff --git a/monetdb5/modules/mal/querylog.h b/monetdb5/modules/mal/querylog.h
--- a/monetdb5/modules/mal/querylog.h
+++ b/monetdb5/modules/mal/querylog.h
@@ -34,12 +34,12 @@
 qlog_export int initQlog(void);
 qlog_export void QLOGcatalog(BAT **r);
 qlog_export void QLOGcalls(BAT **r);
-qlog_export str QLOGinit(int *ret);
-qlog_export str QLOGinitThreshold(int *ret, int *threshold);
-qlog_export str QLOGdone(int *ret);
+qlog_export str QLOGenable(int *ret);
+qlog_export str QLOGenableThreshold(int *ret, int *threshold);
+qlog_export str QLOGdisable(int *ret);
 qlog_export int QLOGisset(void);
 qlog_export str QLOGissetFcn(int *ret);
-qlog_export str QLOGreset(int *ret);
+qlog_export str QLOGempty(int *ret);
 qlog_export str QLOGdefine(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
 qlog_export str QLOGcall(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
 
diff --git a/monetdb5/modules/mal/querylog.mal 
b/monetdb5/modules/mal/querylog.mal
--- a/monetdb5/modules/mal/querylog.mal
+++ b/monetdb5/modules/mal/querylog.mal
@@ -1,23 +1,23 @@
 module querylog;
 
-command init(threshold:int)
-address QLOGinitThreshold
+command enable(threshold:int)
+address QLOGenableThreshold
 comment "Turn on the query logger";
 
-command init()
-address QLOGinit
+command enable()
+address QLOGenable
 comment "Turn on the query logger";
 
-command done()
-address QLOGdone
+command disable()
+address QLOGdisable
 comment "Turn off the query logger";
 
 command isset():int
 address QLOGissetFcn
 comment "Return status of query logger";
 
-command reset()
-address QLOGreset
+command empty()
+address QLOGempty
 comment "Clear the query log tables";
 
 pattern define(q:str, pipe:str, optimize:lng, usr:str, tick:timestamp):oid
diff --git a/sql/backends/monet5/sql.mx b/sql/backends/monet5/sql.mx
--- a/sql/backends/monet5/sql.mx
+++ b/sql/backends/monet5/sql.mx
@@ -568,15 +568,15 @@ space:bat[:oid,:lng]
 address sql_querylog_calls
 comment "Obtain the query log calls";
 
-pattern querylog_reset()
-address sql_querylog_reset;
-
-command querylog_init()
-address QLOGinit;
-command querylog_init(thres:int)
-address QLOGinitThreshold;
-command querylog_done()
-address QLOGdone;
+pattern querylog_empty()
+address sql_querylog_empty;
+
+command querylog_enable()
+address QLOGenable;
+command querylog_enable(thres:int)
+address QLOGenablehreshold;
+command querylog_disable()
+address QLOGdisable;
 
 
 pattern sysmon_queue()(qtag:bat[:oid,:lng], 
user:bat[:oid,:str],started:bat[:oid,:timestamp],estimate:bat[:oid,:timestamp],progress:bat[:oid,:int],
 status:bat[:oid,:str], tag:bat[:oid,:oid], query:bat[:oid,:str])
@@ -1455,7 +1455,7 @@ sql5_export str dump_trace(Client cntxt,
 sql5_export str sql_storage(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 sql5_export str sql_querylog_catalog(Client cntxt, MalBlkPtr mb, MalStkPtr 
stk, InstrPtr pci);
 sql5_export str sql_querylog_calls(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
-sql5_export str sql_querylog_reset(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
+sql5_export str sql_querylog_empty(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 sql5_export str sql_rowid(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
 sql5_export str sql_rank_grp(bat *rid, bat *bid, bat *gid, bat *gpe);
 sql5_export str sql_rank(bat *rid, bat *bid);
@@ -6510,14 +6510,14 @@ sql_querylog_calls(Client cntxt, MalBlkP
        return MAL_SUCCEED;
 }
 str
-sql_querylog_reset(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
+sql_querylog_empty(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
        int *ret= (int*) getArgReference(stk,pci,0);
        (void) cntxt;
        (void) mb;
        (void) stk;
        (void) pci;
-       QLOGreset(ret);
+       QLOGempty(ret);
        return MAL_SUCCEED;
 }
 
diff --git a/sql/scripts/15_querylog.sql b/sql/scripts/15_querylog.sql
--- a/sql/scripts/15_querylog.sql
+++ b/sql/scripts/15_querylog.sql
@@ -70,13 +70,13 @@ update sys._tables
                and schema_id = (select id from sys.schemas where name = 'sys');
 
 -- reset history for a particular user
-create procedure sys.querylog_reset()
-external name sql.querylog_reset;
+create procedure sys.querylog_empty()
+external name sql.querylog_empty;
 
 -- manipulate the query logger
-create procedure sys.querylog_init()
-external name sql.querylog_init;
-create procedure sys.querylog_init(threshold smallint)
-external name sql.querylog_init_threshold;
-create procedure sys.querylog_done()
-external name sql.querylog_done;
+create procedure sys.querylog_enable()
+external name sql.querylog_enable;
+create procedure sys.querylog_enable(threshold smallint)
+external name sql.querylog_enable_threshold;
+create procedure sys.querylog_disable()
+external name sql.querylog_disable;
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to