Changeset: 9d09b434e926 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9d09b434e926
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
        monetdb5/mal/mal_interpreter.c
        monetdb5/modules/mal/mal_io.c
Branch: default
Log Message:

Merge with Jul2015 branch.


diffs (truncated from 2898 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);
                }
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){
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 <sjo...@acm.org>  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 <sjo...@acm.org>  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 <sjo...@acm.org>  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 <sjo...@acm.org>  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 <sjo...@acm.org>  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
 
  -- Sjoerd Mullender <sjo...@acm.org>  Fri, 23 Jan 2015 13:21:50 +0100
 
-monetdb (11.19.9-20150123) unstable; urgency=low
+monetdb (11.19.9) unstable; urgency=low
 
   * sql: Fixed a typo in a column name of the sys.tablestoragemodel view
     (auxillary changed to auxiliary).
 
  -- Sjoerd Mullender <sjo...@acm.org>  Mon, 19 Jan 2015 13:21:50 +0100
 
-monetdb (11.19.9-20150123) unstable; urgency=low
+monetdb (11.19.9) unstable; urgency=low
 
   * clients: Changes to the Perl interface, thanks to Stefan O'Rear:
     1. removes "use sigtrap", because this has global effects and should
@@ -170,13 +170,13 @@ monetdb (11.19.9-20150123) unstable; urg
 
  -- Sjoerd Mullender <sjo...@acm.org>  Tue, 13 Jan 2015 13:21:50 +0100
 
-monetdb (11.19.7-20141121) unstable; urgency=low
+monetdb (11.19.7) unstable; urgency=low
 
   * Rebuilt.
 
  -- Sjoerd Mullender <sjo...@acm.org>  Fri, 21 Nov 2014 10:14:18 +0100
 
-monetdb (11.19.5-20141120) unstable; urgency=low
+monetdb (11.19.5) unstable; urgency=low
 
   * Rebuilt.
   * BZ#3580: cosmetic change (append newline)
@@ -190,27 +190,27 @@ monetdb (11.19.5-20141120) unstable; urg
 
  -- Sjoerd Mullender <sjo...@acm.org>  Thu, 20 Nov 2014 10:37:22 +0100
 
-monetdb (11.19.5-20141120) unstable; urgency=low
+monetdb (11.19.5) unstable; urgency=low
 
   * gdk: Implemented a change to the way in which string bats are appended.
     We now try harder to limit the growth of the string heap.
 
  -- Sjoerd Mullender <sjo...@acm.org>  Thu, 20 Nov 2014 10:37:22 +0100
 
-monetdb (11.19.5-20141120) unstable; urgency=low
+monetdb (11.19.5) unstable; urgency=low
 
   * monetdb5: Fixed adding of 0 intervals to dates.
 
  -- Sjoerd Mullender <sjo...@acm.org>  Thu, 20 Nov 2014 10:37:22 +0100
 
-monetdb (11.19.5-20141120) unstable; urgency=low
+monetdb (11.19.5) unstable; urgency=low
 
   * sql: Fixed sys.queue() implementation to report on other queries being
     executed.
 
  -- Sjoerd Mullender <sjo...@acm.org>  Thu, 20 Nov 2014 10:37:22 +0100
 
-monetdb (11.19.5-20141120) unstable; urgency=low
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to