Changeset: 100915017e5f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=100915017e5f
Added Files:
sql/test/BugTracker-2015/Tests/apply_merge_distinct.Bug-3760.sql
sql/test/BugTracker-2015/Tests/apply_merge_distinct.Bug-3760.stable.err
sql/test/BugTracker-2015/Tests/apply_merge_distinct.Bug-3760.stable.out
sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.sql
sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.stable.err
sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.stable.out
sql/test/BugTracker-2015/Tests/cast_on_groupby_col_crash.Bug-3769.sql
sql/test/BugTracker-2015/Tests/cast_on_groupby_col_crash.Bug-3769.stable.err
sql/test/BugTracker-2015/Tests/cast_on_groupby_col_crash.Bug-3769.stable.out
sql/test/BugTracker-2015/Tests/sessions_crash.Bug-3759.sql
sql/test/BugTracker-2015/Tests/sessions_crash.Bug-3759.stable.err
sql/test/BugTracker-2015/Tests/sessions_crash.Bug-3759.stable.out
sql/test/BugTracker-2015/Tests/set_default_role.Bug-3364.sql
sql/test/BugTracker-2015/Tests/set_default_role.Bug-3364.stable.err
sql/test/BugTracker-2015/Tests/set_default_role.Bug-3364.stable.out
sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.sql
sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.err
sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.out
Modified Files:
clients/mapiclient/eventparser.c
clients/mapiclient/eventparser.h
clients/mapiclient/tachograph.c
clients/mapiclient/tomograph.c
debian/changelog
gdk/gdk_atoms.c
gdk/gdk_bat.c
gdk/gdk_bbp.c
gdk/gdk_logger.c
gdk/gdk_select.c
monetdb5/mal/mal_interpreter.c
monetdb5/modules/mal/clients.c
monetdb5/modules/mal/mal_io.c
sql/include/sql_relation.h
sql/server/rel_exp.c
sql/server/rel_exp.h
sql/server/rel_optimizer.c
sql/server/rel_schema.c
sql/server/rel_select.c
sql/server/sql_privileges.c
sql/test/BugDay_2005-11-09_2.9.3/Tests/grant_public.SF-1114580.stable.err
sql/test/BugTracker-2009/Tests/count_bug.SF-2604583.stable.out.int128
sql/test/BugTracker-2012/Tests/scalar_subquery_with_alias.Bug-3093.stable.out
sql/test/BugTracker-2015/Tests/All
sql/test/BugTracker-2015/Tests/assertHead.Bug-3706.stable.out
sql/test/Users/Tests/test_privs2_p2.stable.err
sql/test/remote/Tests/ssbm.SQL.py
Branch: mosaic
Log Message:
merge with default
diffs (truncated from 5063 to 300 lines):
diff --git a/clients/mapiclient/eventparser.c b/clients/mapiclient/eventparser.c
--- a/clients/mapiclient/eventparser.c
+++ b/clients/mapiclient/eventparser.c
@@ -50,29 +50,31 @@ clearArguments(void)
}
char *
-stripQuotes(char *currentquery)
-{ char *q, *c, *qry;
- q = qry = (char *) malloc(strlen(currentquery) * 2);
- if( q == NULL){
- fprintf(stderr,"Could not allocate query buffer
of size "SZFMT"\n", strlen(currentquery) * 2);
- exit(-1);
- }
- for (c= currentquery; *c; ){
- if ( strncmp(c,"\\\\t",3) == 0){
- *q++ = '\t';
- c+=3;
- } else
- if ( strncmp(c,"\\\\n",3) == 0){
- *q++ = '\n';
- c+=3;
- } else if ( strncmp(c,"\\\"",2) == 0){
- *q++= '"';
- c+=2;
- } else if ( strncmp(c,"\\\\",2) == 0){
- c+= 2;
- } else *q++ = *c++;
- }
- *q =0;
+stripQuotes(const char *currentquery)
+{
+ const char *c;
+ char *q, *qry;
+ q = qry = (char *) malloc(strlen(currentquery) * 2);
+ if( q == NULL){
+ fprintf(stderr,"Could not allocate query buffer of size
"SZFMT"\n", strlen(currentquery) * 2);
+ exit(-1);
+ }
+ for (c= currentquery; *c; ){
+ if ( strncmp(c,"\\\\t",3) == 0){
+ *q++ = '\t';
+ c+=3;
+ } else
+ if ( strncmp(c,"\\\\n",3) == 0){
+ *q++ = '\n';
+ c+=3;
+ } else if ( strncmp(c,"\\\"",2) == 0){
+ *q++= '"';
+ c+=2;
+ } else if ( strncmp(c,"\\\\",2) == 0){
+ c+= 2;
+ } else *q++ = *c++;
+ }
+ *q =0;
return qry;
}
@@ -228,7 +230,7 @@ eventparser(char *row, EventRecord *ev)
/* scan event record number */
c = row+1;
- if (c == 0)
+ if (*c == 0)
return -2;
ev->eventnr = atoi(c + 1);
@@ -250,6 +252,8 @@ eventparser(char *row, EventRecord *ev)
ev->clkticks += usec;
}
c = strchr(c + 1, '"');
+ if (c == NULL)
+ return -3;
if (ev->clkticks < 0) {
fprintf(stderr, "parser: read negative value "LLFMT"
from\n'%s'\n", ev->clkticks, cc);
}
@@ -429,6 +433,13 @@ eventparser(char *row, EventRecord *ev)
if( v)
parseArguments(v+3,1);
}
+ if (ev->stmt && (v=strstr(ev->stmt, ",\t]"))){
+ *v=',';
+ *(v+1) = 0;
+ } else
+ if (ev->stmt && (v=strstr(ev->stmt, "\"\t]")))
+ *v = 0;
+ else
if (ev->stmt && (v=strstr(ev->stmt, "\t]")))
*v = 0;
return 0;
diff --git a/clients/mapiclient/eventparser.h b/clients/mapiclient/eventparser.h
--- a/clients/mapiclient/eventparser.h
+++ b/clients/mapiclient/eventparser.h
@@ -100,5 +100,5 @@ extern char *monetdb_characteristics;
extern void clearArguments(void);
extern void eventdump(void);
extern int eventparser(char *row, EventRecord *ev);
-extern char *stripQuotes(char *currentquery);
+extern char *stripQuotes(const char *currentquery);
#endif /*_EVENT_PARSER_*/
diff --git a/clients/mapiclient/tachograph.c b/clients/mapiclient/tachograph.c
--- a/clients/mapiclient/tachograph.c
+++ b/clients/mapiclient/tachograph.c
@@ -486,7 +486,7 @@ showBar(int level, lng clk, char *stmt)
} else
if( duration && duration- clk > 0){
rendertime(duration - clk,0);
- printf(" %c%s ETC ", (level == 100? '-':' '),stamp);
+ printf(" %s ETC ", stamp);
stamplen= strlen(stamp)+3;
} else
if( duration && duration- clk < 0){
@@ -696,7 +696,6 @@ update(EventRecord *ev)
fprintf(tachojson,"\"time\": "LLFMT",\n",ev->clkticks);
fprintf(tachojson,"\"status\": \"start\",\n");
fprintf(tachojson,"\"estimate\": "LLFMT",\n",ev->ticks);
- fprintf(tachojson,"\"stmt\": \"%s\",\n",ev->stmt);
fprintf(tachojson," \"stmt\":\"");
for(s = ev->stmt; *s; s++)
@@ -756,9 +755,25 @@ update(EventRecord *ev)
fprintf(tachojson,"\"time\": "LLFMT",\n",ev->clkticks);
fprintf(tachojson,"\"status\": \"done\",\n");
fprintf(tachojson,"\"ticks\": "LLFMT",\n",ev->ticks);
- fprintf(tachojson,"\"stmt\": \"%s\",\n",ev->stmt);
+ fprintf(tachojson," \"stmt\":\"");
+ for(s = ev->stmt; *s; s++)
+ switch(*s){
+ case '\\':
+ if( *(s+1) == '\\' ) s++;
+ default: fputc((int) *s, tachojson);
+ }
+ fprintf(tachojson,"\",\n");
+
renderCall(line,BUFSIZ, ev->stmt,1,1);
- fprintf(tachojson,"\"beautystmt\": \"%s\"\n",line);
+ fprintf(tachojson," \"beautystmt\":\"");
+ for(s = line; *s; s++)
+ switch(*s){
+ case '\\':
+ if( *(s+1) == '\\' ) s++;
+ default: fputc((int) *s, tachojson);
+ }
+ fprintf(tachojson,"\",\n");
+
fprintf(tachojson,"},\n");
fflush(tachojson);
@@ -777,8 +792,6 @@ update(EventRecord *ev)
fprintf(tachostmt,LLFMT"\t",ev->tmpspace);
fprintf(tachostmt,LLFMT"\t",ev->inblock);
fprintf(tachostmt,LLFMT"\t",ev->oublock);
- fprintf(tachostmt,"%s\t",ev->stmt);
- fprintf(tachostmt, "%s\n",line);
free(ev->stmt);
progress = (int)(pccount++ / (malsize/100.0));
diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -826,6 +826,8 @@ showcpu(void)
double cpuload[MAXTHREADS];
char *s;
+ for (i = 0; i < MAXTHREADS; i++)
+ cpuload[i] = 0;
fprintf(gnudata, "\nset tmarg 1\n");
fprintf(gnudata, "set bmarg 0\n");
fprintf(gnudata, "set lmarg 10\n");
@@ -863,7 +865,7 @@ showcpu(void)
// paint the heatmap, the load refers the previous time
slot
if( prev >= 0)
for(j=0; j < cpus; j++)
- fprintf(gnudata,"set object %d rectangle from
"LLFMT".0, %d.0 to "LLFMT".0, %d fillcolor rgb \"%s\" fillstyle solid 1.0
noborder\n",
+ fprintf(gnudata,"set object %d
rectangle from "LLFMT".0, %d.0 to "LLFMT".0, %d fillcolor rgb \"%s\" fillstyle
solid 1.0 noborder\n",
object++, box[prev].clkend, j ,
box[i].clkstart, (j+1) , getHeatColor(cpuload[j]) );
prev = i;
}
@@ -1173,7 +1175,7 @@ updatecolormap(int idx)
colors[fnd].mod = mod?strdup(mod): 0;
colors[fnd].fcn = strdup(fcn);
if( debug)
- fprintf(stderr,"-- Added function #%d: %s.%s\n", fnd,
(mod?mod:""), fcn);
+ fprintf(stderr,"-- Added function #%d: %s.%s\n", fnd,
mod, fcn);
}
colors[fnd].freq++;
@@ -1542,7 +1544,7 @@ update(char *line, EventRecord *ev)
box[idx].stmt = ev->stmt;
box[idx].fcn = ev->fcn ? strdup(ev->fcn) : strdup("");
if(ev->fcn && strstr(ev->fcn,"querylog.define") ){
- currentquery =
stripQuotes(strdup(malarguments[malretc]));
+ currentquery = stripQuotes(malarguments[malretc]);
fprintf(stderr,"-- page %d :%s\n",atlaspage,
currentquery);
}
return;
@@ -1624,7 +1626,6 @@ main(int argc, char **argv)
char *user = NULL;
char *password = NULL;
char buf[BUFSIZ], *buffer, *e, *response;
- FILE *trace = NULL;
FILE *inpfd;
int colormap=0;
EventRecord event;
@@ -1659,7 +1660,7 @@ main(int argc, char **argv)
while (1) {
int option_index = 0;
int c = getopt_long(argc, argv,
"d:u:p:P:h:?T:i:r:s:q:o:c:Db:A:m",
- long_options, &option_index);
+ long_options, &option_index);
if (c == -1)
break;
switch (c) {
@@ -1772,11 +1773,13 @@ main(int argc, char **argv)
/* reprocess an existing profiler trace, possibly producing the trace
split */
printf("-- Output directed towards %s%s_*\n", dirpath, prefix);
+ if (
#ifdef NATIVE_WIN32
- if( _mkdir(dirpath) < 0 && errno != EEXIST){
+ _mkdir(dirpath) < 0
#else
- if( mkdir(dirpath,0755) < 0 && errno != EEXIST) {
+ mkdir(dirpath,0755) < 0
#endif
+ && errno != EEXIST) {
fprintf(stderr,"Failed to create dirpath '%s'\n",dirpath);
exit(-1);
}
@@ -1910,8 +1913,6 @@ main(int argc, char **argv)
update(response, &event);
if (debug )
fprintf(stderr, "PARSE %d:%s\n", i,
response);
- if( trace && i >=0 && capturing)
- fprintf(trace,"%s\n",response);
response = e + 1;
}
/* handle the case that the line is not yet completed */
@@ -1937,7 +1938,7 @@ main(int argc, char **argv)
if( !inputfile)
doQ("profiler.stop();");
-stop_disconnect:
+ stop_disconnect:
if( !inputfile) {
mapi_disconnect(dbh);
printf("-- connection with server %s closed\n", uri ? uri :
host);
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-monetdb (11.19.15-20150603) unstable; urgency=low
+monetdb (11.19.15) unstable; urgency=low
* Rebuilt.
* BZ#3707: var() possibly not working in debug builds
@@ -8,7 +8,7 @@ monetdb (11.19.15-20150603) unstable; ur
-- Sjoerd Mullender <[email protected]> Wed, 03 Jun 2015 12:31:39 +0200
-monetdb (11.19.13-20150519) unstable; urgency=low
+monetdb (11.19.13) unstable; urgency=low
* Rebuilt.
* BZ#3712: Concurrency issue on querying the SQL catalog
@@ -23,7 +23,7 @@ monetdb (11.19.13-20150519) unstable; ur
-- Sjoerd Mullender <[email protected]> Tue, 19 May 2015 13:34:49 +0200
-monetdb (11.19.11-20150423) unstable; urgency=low
+monetdb (11.19.11) unstable; urgency=low
* Rebuilt.
* BZ#3466: UPDATE statements fails with "GDKerror: MT_mremap() failed"
@@ -86,20 +86,20 @@ monetdb (11.19.11-20150423) unstable; ur
-- Sjoerd Mullender <[email protected]> Thu, 23 Apr 2015 09:17:39 +0200
-monetdb (11.19.11-20150423) unstable; urgency=low
+monetdb (11.19.11) unstable; urgency=low
* buildtools: We now also create debug packages for Debian and Ubuntu.
-- Sjoerd Mullender <[email protected]> Tue, 3 Feb 2015 09:17:39 +0200
-monetdb (11.19.11-20150423) unstable; urgency=low
+monetdb (11.19.11) unstable; urgency=low
* gdk: Replaced the rangejoin implementation with one that uses imprints if
it can.
-- Sjoerd Mullender <[email protected]> Tue, 27 Jan 2015 09:17:39 +0200
-monetdb (11.19.9-20150123) unstable; urgency=low
+monetdb (11.19.9) unstable; urgency=low
* Rebuilt.
* BZ#3467: Field aliases with '#' character excise field names in
@@ -133,14 +133,14 @@ monetdb (11.19.9-20150123) unstable; urg
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list