Changeset: b57a4466e7dc for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b57a4466e7dc
Modified Files:
Branch: jacqueline
Log Message:
Merged from default
diffs (truncated from 457 to 300 lines):
diff --git a/clients/NT/Makefile.ag b/clients/NT/Makefile.ag
--- a/clients/NT/Makefile.ag
+++ b/clients/NT/Makefile.ag
@@ -18,5 +18,5 @@
scripts_bat = {
EXT = bat
DIR = prefix
- SOURCES = mclient.bat msqldump.bat
+ SOURCES = mclient.bat msqldump.bat stethoscope.bat
}
diff --git a/clients/NT/stethoscope.bat b/clients/NT/stethoscope.bat
new file mode 100755
--- /dev/null
+++ b/clients/NT/stethoscope.bat
@@ -0,0 +1,15 @@
+@echo off
+rem figure out the folder name
+set MONETDB=%~dp0
+
+rem remove the final backslash from the path
+set MONETDB=%MONETDB:~0,-1%
+
+rem extend the search path with our EXE and DLL folders
+rem we depend on pthreadVCE.dll having been copied to the lib folder
+set PATH=%MONETDB%\bin;%MONETDB%\lib;%MONETDB%\lib\bin;%PATH%
+
+rem start the real client
+"%MONETDB%\bin\stethoscope.exe" %1 %2 %3 %4 %5 %6 %7 %8
+
+if ERRORLEVEL 1 pause
diff --git a/clients/mapiclient/stethoscope.c b/clients/mapiclient/stethoscope.c
--- a/clients/mapiclient/stethoscope.c
+++ b/clients/mapiclient/stethoscope.c
@@ -187,8 +187,9 @@ doProfile(void *d)
wthread *wthr = (wthread*)d;
int i;
size_t a;
+ ssize_t n;
char *response, *x;
- char buf[BUFSIZ];
+ char buf[BUFSIZ + 1];
char *e;
char *mod, *fcn;
char *host;
@@ -282,7 +283,8 @@ doProfile(void *d)
fflush(NULL);
i = 0;
- while (mnstr_read(wthr->s, buf, 1, BUFSIZ)) {
+ while ((n = mnstr_read(wthr->s, buf, 1, BUFSIZ)) > 0) {
+ buf[n] = 0;
response = buf;
while ((e = strchr(response, '\n')) != NULL) {
*e = 0;
@@ -477,6 +479,7 @@ main(int argc, char **argv)
* the function never terminates... at least on Linux */
#if !defined(HAVE_PTHREAD_H) && defined(_MSC_VER)
walk->id = CreateThread(NULL, 0, doProfile, walk, 0, NULL);
+ WaitForSingleObject(walk->id, INFINITE);
CloseHandle(walk->id);
#else
pthread_create(&walk->id, NULL, &doProfile, walk);
@@ -510,6 +513,7 @@ main(int argc, char **argv)
free(oalts);
for (walk = thds; walk != NULL; walk = walk->next) {
#if !defined(HAVE_PTHREAD_H) && defined(_MSC_VER)
+ WaitForSingleObject(walk->id, INFINITE);
CloseHandle(walk->id);
#else
pthread_join(walk->id, NULL);
diff --git a/monetdb5/modules/mal/Tests/inspect05.stable.out
b/monetdb5/modules/mal/Tests/inspect05.stable.out
--- a/monetdb5/modules/mal/Tests/inspect05.stable.out
+++ b/monetdb5/modules/mal/Tests/inspect05.stable.out
@@ -277,6 +277,7 @@ end main;
[ "init", "pattern", "sql", "():void ",
"SQLinitEnvironment;" ]
[ "keepquery", "function", "sql",
"(qid:int,qry:str,parse:lng,optimize:lng):void;",
"nil"
]
[ "logfile", "pattern", "sql",
"(filename:str):void ",
"mvc_logfile;" ]
+[ "middle", "command", "sql",
"(val:bat[:oid,:oid],hist:bat[:oid,:wrd]):bat[:oid,:oid] ",
"SQLmiddle;" ]
[ "ms_trunc", "command", "sql",
"(v:dbl,r:int):dbl ",
"dbl_trunc_wrap;" ]
[ "ms_trunc", "command", "sql",
"(v:flt,r:int):flt ",
"flt_trunc_wrap;" ]
[ "mvc", "pattern", "sql", "():int ",
"SQLmvc;" ]
@@ -4856,6 +4857,8 @@ end main;
[ "count", "command", "aggr",
"(b:bat[:any_1,:any]):wrd ",
"ALGcount_bat;"
]
[ "exist", "command", "aggr",
"(b:bat[:any_1,:any_2],h:any_1):bit ",
"ALGexist;" ]
[ "histogram", "command", "aggr",
"(b:bat[:any_1,:any_2]):bat[:any_2,:int] ",
"ALGhistogram;"
]
+[ "median", "function", "aggr",
"(a:bat[:oid,:any_1],g:bat[:oid,:oid],e:bat[:oid,:any_2]):bat[:oid,:any_1];",
"nil" ]
+[ "median", "function", "aggr",
"(a:bat[:oid,:any_1]):any_1;",
"nil" ]
[ "max", "command", "aggr",
"(b:bat[:oid,:any_1],g:bat[:oid,:oid],e:bat[:oid,:any_2]):bat[:oid,:any_1] ",
"AX3aggrX3_max3;"
]
[ "min", "command", "aggr",
"(b:bat[:oid,:any_1],g:bat[:oid,:oid],e:bat[:oid,:any_2]):bat[:oid,:any_1] ",
"AX3aggrX3_min3;"
]
[ "max", "command", "aggr",
"(b:bat[:oid,:any_1],e:bat[:oid,:any_2]):bat[:oid,:any_1] ",
"AX3aggrX3_max;"
]
diff --git a/monetdb5/modules/mal/Tests/inspect05.stable.out.Windows
b/monetdb5/modules/mal/Tests/inspect05.stable.out.Windows
--- a/monetdb5/modules/mal/Tests/inspect05.stable.out.Windows
+++ b/monetdb5/modules/mal/Tests/inspect05.stable.out.Windows
@@ -271,6 +271,7 @@ end main;
[ "init", "pattern", "sql", "():void ",
"SQLinitEnvironment;" ]
[ "keepquery", "function", "sql",
"(qid:int,qry:str,parse:lng,optimize:lng):void;",
"nil"
]
[ "logfile", "pattern", "sql",
"(filename:str):void ",
"mvc_logfile;" ]
+[ "middle", "command", "sql",
"(val:bat[:oid,:oid],hist:bat[:oid,:wrd]):bat[:oid,:oid] ",
"SQLmiddle;" ]
[ "ms_trunc", "command", "sql",
"(v:dbl,r:int):dbl ",
"dbl_trunc_wrap;" ]
[ "ms_trunc", "command", "sql",
"(v:flt,r:int):flt ",
"flt_trunc_wrap;" ]
[ "mvc", "pattern", "sql", "():int ",
"SQLmvc;" ]
@@ -4850,6 +4851,8 @@ end main;
[ "count", "command", "aggr",
"(b:bat[:any_1,:any]):wrd ",
"ALGcount_bat;"
]
[ "exist", "command", "aggr",
"(b:bat[:any_1,:any_2],h:any_1):bit ",
"ALGexist;" ]
[ "histogram", "command", "aggr",
"(b:bat[:any_1,:any_2]):bat[:any_2,:int] ",
"ALGhistogram;"
]
+[ "median", "function", "aggr",
"(a:bat[:oid,:any_1],g:bat[:oid,:oid],e:bat[:oid,:any_2]):bat[:oid,:any_1];",
"nil" ]
+[ "median", "function", "aggr",
"(a:bat[:oid,:any_1]):any_1;",
"nil" ]
[ "max", "command", "aggr",
"(b:bat[:oid,:any_1],g:bat[:oid,:oid],e:bat[:oid,:any_2]):bat[:oid,:any_1] ",
"AX3aggrX3_max3;"
]
[ "min", "command", "aggr",
"(b:bat[:oid,:any_1],g:bat[:oid,:oid],e:bat[:oid,:any_2]):bat[:oid,:any_1] ",
"AX3aggrX3_min3;"
]
[ "max", "command", "aggr",
"(b:bat[:oid,:any_1],e:bat[:oid,:any_2]):bat[:oid,:any_1] ",
"AX3aggrX3_max;"
]
diff --git a/sql/test/leaks/Tests/check0.stable.out
b/sql/test/leaks/Tests/check0.stable.out
--- a/sql/test/leaks/Tests/check0.stable.out
+++ b/sql/test/leaks/Tests/check0.stable.out
@@ -53,18 +53,18 @@ Ready.
[ "int", "str", 142 ]
[ "oid", "int", 19 ]
[ "oid", "int", 19 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
[ "oid", "lng", 19 ]
[ "oid", "str", 1 ]
[ "oid", "str", 1 ]
[ "oid", "str", 19 ]
-[ "oid", "str", 3101 ]
-[ "oid", "str", 3101 ]
+[ "oid", "str", 3103 ]
+[ "oid", "str", 3103 ]
#select 'transient', count(*) from bbp() as bbp where kind like 'tran%';
% .L1, .bbp # table_name
% L1, L2 # name
diff --git a/sql/test/leaks/Tests/check1.stable.out
b/sql/test/leaks/Tests/check1.stable.out
--- a/sql/test/leaks/Tests/check1.stable.out
+++ b/sql/test/leaks/Tests/check1.stable.out
@@ -35,8 +35,8 @@ Ready.
[ "oid", "bit", 59 ]
[ "oid", "bit", 59 ]
[ "oid", "bit", 300 ]
-[ "oid", "bit", 1125 ]
-[ "oid", "bit", 1125 ]
+[ "oid", "bit", 1126 ]
+[ "oid", "bit", 1126 ]
[ "oid", "int", 0 ]
[ "oid", "int", 0 ]
[ "oid", "int", 0 ]
@@ -83,15 +83,15 @@ Ready.
[ "oid", "int", 300 ]
[ "oid", "int", 300 ]
[ "oid", "int", 300 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
[ "oid", "lng", 0 ]
[ "oid", "lng", 0 ]
[ "oid", "lng", 0 ]
@@ -166,11 +166,11 @@ Ready.
[ "oid", "str", 300 ]
[ "oid", "str", 300 ]
[ "oid", "str", 300 ]
-[ "oid", "str", 1125 ]
-[ "oid", "str", 1125 ]
-[ "oid", "str", 1125 ]
-[ "oid", "str", 3101 ]
-[ "oid", "str", 3101 ]
+[ "oid", "str", 1126 ]
+[ "oid", "str", 1126 ]
+[ "oid", "str", 1126 ]
+[ "oid", "str", 3103 ]
+[ "oid", "str", 3103 ]
[ "oid", "timestamp", 0 ]
[ "oid", "timestamp", 0 ]
[ "oid", "wrd", 0 ]
diff --git a/sql/test/leaks/Tests/check2.stable.out
b/sql/test/leaks/Tests/check2.stable.out
--- a/sql/test/leaks/Tests/check2.stable.out
+++ b/sql/test/leaks/Tests/check2.stable.out
@@ -35,8 +35,8 @@ Ready.
[ "oid", "bit", 59 ]
[ "oid", "bit", 59 ]
[ "oid", "bit", 300 ]
-[ "oid", "bit", 1125 ]
-[ "oid", "bit", 1125 ]
+[ "oid", "bit", 1126 ]
+[ "oid", "bit", 1126 ]
[ "oid", "int", 0 ]
[ "oid", "int", 0 ]
[ "oid", "int", 0 ]
@@ -83,15 +83,15 @@ Ready.
[ "oid", "int", 300 ]
[ "oid", "int", 300 ]
[ "oid", "int", 300 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
[ "oid", "lng", 0 ]
[ "oid", "lng", 0 ]
[ "oid", "lng", 0 ]
@@ -166,11 +166,11 @@ Ready.
[ "oid", "str", 300 ]
[ "oid", "str", 300 ]
[ "oid", "str", 300 ]
-[ "oid", "str", 1125 ]
-[ "oid", "str", 1125 ]
-[ "oid", "str", 1125 ]
-[ "oid", "str", 3101 ]
-[ "oid", "str", 3101 ]
+[ "oid", "str", 1126 ]
+[ "oid", "str", 1126 ]
+[ "oid", "str", 1126 ]
+[ "oid", "str", 3103 ]
+[ "oid", "str", 3103 ]
[ "oid", "timestamp", 0 ]
[ "oid", "timestamp", 0 ]
[ "oid", "wrd", 0 ]
diff --git a/sql/test/leaks/Tests/check3.stable.out
b/sql/test/leaks/Tests/check3.stable.out
--- a/sql/test/leaks/Tests/check3.stable.out
+++ b/sql/test/leaks/Tests/check3.stable.out
@@ -35,8 +35,8 @@ Ready.
[ "oid", "bit", 60 ]
[ "oid", "bit", 60 ]
[ "oid", "bit", 302 ]
-[ "oid", "bit", 1125 ]
-[ "oid", "bit", 1125 ]
+[ "oid", "bit", 1126 ]
+[ "oid", "bit", 1126 ]
[ "oid", "int", 0 ]
[ "oid", "int", 0 ]
[ "oid", "int", 0 ]
@@ -83,15 +83,15 @@ Ready.
[ "oid", "int", 302 ]
[ "oid", "int", 302 ]
[ "oid", "int", 302 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 1125 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
-[ "oid", "int", 3101 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 1126 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
+[ "oid", "int", 3103 ]
[ "oid", "lng", 0 ]
[ "oid", "lng", 0 ]
[ "oid", "lng", 0 ]
@@ -166,11 +166,11 @@ Ready.
[ "oid", "str", 302 ]
[ "oid", "str", 302 ]
[ "oid", "str", 302 ]
-[ "oid", "str", 1125 ]
-[ "oid", "str", 1125 ]
-[ "oid", "str", 1125 ]
-[ "oid", "str", 3101 ]
-[ "oid", "str", 3101 ]
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list