Changeset: c1a88d5dbb52 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c1a88d5dbb52
Modified Files:
monetdb5/mal/mal_profiler.c
monetdb5/mal/mal_runtime.c
sql/test/BugTracker-2017/Tests/sqlsmith02.stable.out
sql/test/BugTracker-2017/Tests/sqlsmith03.stable.out
Branch: wlcr
Log Message:
merge with default
diffs (193 lines):
diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -104,7 +104,6 @@ renderProfilerEvent(MalBlkPtr mb, MalStk
{
char logbuffer[LOGLEN], *logbase;
int loglen;
- lng clock;
str stmt, c;
str stmtq;
lng usec= GDKusec();
@@ -113,10 +112,6 @@ renderProfilerEvent(MalBlkPtr mb, MalStk
// ignore generation of events for instructions that are called too
often
if(highwatermark && highwatermark + (start == 0) < pci->calls)
return;
- if( start) // show when instruction was started
- clock = pci->clock;
- else
- clock = usec;
/* make profile event tuple */
lognew();
@@ -125,7 +120,6 @@ renderProfilerEvent(MalBlkPtr mb, MalStk
if( usrname)
logadd("\"user\":\"%s\",%s",usrname, prettify);
logadd("\"clk\":"LLFMT",%s",usec,prettify);
- logadd("\"ctime\":"LLFMT".%06ld,%s", clock / 1000000, (long) (clock %
1000000), prettify);
logadd("\"thread\":%d,%s", THRgettid(),prettify);
logadd("\"function\":\"%s.%s\",%s", getModuleId(getInstrPtr(mb, 0)),
getFunctionId(getInstrPtr(mb, 0)), prettify);
@@ -387,7 +381,6 @@ profilerHeartbeatEvent(char *alter)
char cpuload[BUFSIZ];
char logbuffer[LOGLEN], *logbase;
int loglen;
- lng clock;
if (ATOMIC_GET(hbdelay, mal_beatLock) == 0 || eventstream == NULL)
return;
@@ -395,12 +388,10 @@ profilerHeartbeatEvent(char *alter)
/* get CPU load on beat boundaries only */
if ( getCPULoad(cpuload) )
return;
- clock = GDKusec();
lognew();
logadd("{%s",prettify); // fill in later with the event counter
logadd("\"user\":\"heartbeat\",%s", prettify);
- logadd("\"ctime\":"LLFMT".%06ld,%s", clock / 1000000, (long) (clock %
1000000), prettify);
logadd("\"rss\":"SZFMT ",%s", MT_getrss()/1024/1024, prettify);
#ifdef HAVE_SYS_RESOURCE_H
getrusage(RUSAGE_SELF, &infoUsage);
diff --git a/monetdb5/mal/mal_runtime.c b/monetdb5/mal/mal_runtime.c
--- a/monetdb5/mal/mal_runtime.c
+++ b/monetdb5/mal/mal_runtime.c
@@ -79,16 +79,19 @@ runtimeProfileInit(Client cntxt, MalBlkP
return;
}
- // add new invokation
- QRYqueue[i].mb = mb;
- QRYqueue[i].tag = qtag++;
- QRYqueue[i].stk = stk; // for status pause
'p'/running '0'/ quiting 'q'
- QRYqueue[i].start = (lng)time(0);
- QRYqueue[i].runtime = mb->runtime; // the estimated execution time
- q = isaSQLquery(mb);
- QRYqueue[i].query = q? GDKstrdup(q):0;
- QRYqueue[i].status = "running";
- QRYqueue[i].cntxt = cntxt;
+ // add new invocation
+ if (i == qtop) {
+ QRYqueue[i].mb = mb;
+ QRYqueue[i].tag = qtag++;
+ QRYqueue[i].stk = stk; // for status
pause 'p'/running '0'/ quiting 'q'
+ QRYqueue[i].start = (lng)time(0);
+ QRYqueue[i].runtime = mb->runtime; // the estimated
execution time
+ q = isaSQLquery(mb);
+ QRYqueue[i].query = q? GDKstrdup(q):0;
+ QRYqueue[i].status = "running";
+ QRYqueue[i].cntxt = cntxt;
+ }
+ stk->tag = QRYqueue[i].tag;
qtop += i == qtop;
MT_lock_unset(&mal_delayLock);
}
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith02.stable.out
b/sql/test/BugTracker-2017/Tests/sqlsmith02.stable.out
--- a/sql/test/BugTracker-2017/Tests/sqlsmith02.stable.out
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith02.stable.out
@@ -1,1 +1,49 @@
-Causes a crash
+stdout of test 'sqlsmith02` in directory 'sql/test/BugTracker-2017` itself:
+
+
+# 23:02:59 >
+# 23:02:59 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=30090" "--set"
"mapi_usock=/var/tmp/mtest-6840/.s.monetdb.30090" "--set" "monet_prompt="
"--forcemito"
"--dbpath=/export/scratch1/mk/default//Linux/var/MonetDB/mTests_sql_test_BugTracker-2017"
+# 23:02:59 >
+
+# MonetDB 5 server v11.26.0
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2017', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
+# Found 15.589 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://vienna.da.cwi.nl:30090/
+# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-6840/.s.monetdb.30090
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 23:03:00 >
+# 23:03:00 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-6840" "--port=30090"
+# 23:03:00 >
+
+#select
+# ref_78.mod as c0,
+# ref_79.name as c1
+#from
+# sys.columns as ref_38
+# right join sys.args as ref_72
+# right join sys.spatial_ref_sys as ref_75
+# right join sys.geometry_columns as ref_76
+# on (ref_75.proj4text = ref_76.f_table_schema )
+# right join sys.spatial_ref_sys as ref_77
+# inner join sys.functions as ref_78
+# on (ref_77.proj4text = ref_78.name )
+# on (ref_76.srid = ref_78.id )
+# on (ref_72.id = ref_75.srid )
+% .L136, .L140 # table_name
+% c0, c1 # name
+% varchar, varchar # type
+% 0, 0 # length
+
+# 23:03:00 >
+# 23:03:00 > "Done."
+# 23:03:00 >
+
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith03.stable.out
b/sql/test/BugTracker-2017/Tests/sqlsmith03.stable.out
--- a/sql/test/BugTracker-2017/Tests/sqlsmith03.stable.out
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith03.stable.out
@@ -1,1 +1,50 @@
-Causes a crash
+stdout of test 'sqlsmith03` in directory 'sql/test/BugTracker-2017` itself:
+
+
+# 23:03:00 >
+# 23:03:00 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=30090" "--set"
"mapi_usock=/var/tmp/mtest-6840/.s.monetdb.30090" "--set" "monet_prompt="
"--forcemito"
"--dbpath=/export/scratch1/mk/default//Linux/var/MonetDB/mTests_sql_test_BugTracker-2017"
+# 23:03:00 >
+
+# MonetDB 5 server v11.26.0
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2017', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
+# Found 15.589 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://vienna.da.cwi.nl:30090/
+# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-6840/.s.monetdb.30090
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 23:03:00 >
+# 23:03:00 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-6840" "--port=30090"
+# 23:03:00 >
+
+#select
+# 8 as c0
+#from
+# tmp.keys as ref_68
+# left join sys.auths as ref_70
+# inner join sys._columns as ref_86
+# inner join tmp.keys as ref_101
+# inner join sys.querylog_calls as ref_102
+# on (ref_101.type = ref_102.cpu )
+# inner join sys.idxs as ref_103
+# on (ref_102.io = ref_103.id )
+# on (ref_86.table_id = ref_102.cpu )
+# right join sys.privileges as ref_111
+# left join sys.systemfunctions as ref_112
+# left join sys.querylog_calls as ref_113
+% .L152 # table_name
+% c0 # name
+% tinyint # type
+% 1 # length
+
+# 23:03:00 >
+# 23:03:00 > "Done."
+# 23:03:00 >
+
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list