Changeset: 420daa3eade4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=420daa3eade4
Modified Files:
        monetdb5/modules/mal/clients.c
        sql/backends/monet5/sql_scenario.c
Branch: default
Log Message:

Merge with Jan2014 branch.


diffs (126 lines):

diff --git a/monetdb5/modules/mal/clients.c b/monetdb5/modules/mal/clients.c
--- a/monetdb5/modules/mal/clients.c
+++ b/monetdb5/modules/mal/clients.c
@@ -596,7 +596,7 @@ CLTsessions(Client cntxt, MalBlkPtr mb, 
     Client c;
        char usrname[256]= {"monetdb"};
        timestamp ts, ret;
-       lng clk;
+       lng clk,timeout;
 
        (void) cntxt;
        (void) mb;
@@ -631,12 +631,14 @@ CLTsessions(Client cntxt, MalBlkPtr mb, 
                clk = c->login * 1000;
                (void) MTIMEtimestamp_add(&ret,&ts, &clk);
                BUNappend(login, &ret, FALSE);
-               BUNappend(stimeout, &c->stimeout, FALSE);
+               timeout = c->stimeout / 1000000;
+               BUNappend(stimeout, &timeout, FALSE);
                (void) MTIMEunix_epoch(&ts);
                clk = c->lastcmd * 1000;
                (void) MTIMEtimestamp_add(&ret,&ts, &clk);
                BUNappend(last, &ret, FALSE);
-               BUNappend(qtimeout, &c->qtimeout, FALSE);
+               timeout = c->qtimeout / 1000000;
+               BUNappend(qtimeout, &timeout, FALSE);
                BUNappend(active, &c->active, FALSE);
     }
     MT_lock_unset(&mal_contextLock, "clients.sessions");
diff --git a/sql/backends/monet5/sql_scenario.c 
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -1142,7 +1142,6 @@ SQLexitClient(Client c)
 }
 
 /*
- * @-
  * A statement received internally is simply appended for
  * execution
  */
@@ -1161,7 +1160,6 @@ SQLtrans(mvc *m)
 }
 
 /*
- * @-
  * The SQLcompile operation can be used by separate
  * front-ends to benefit from the SQL functionality.
  * It expects a string and returns the name of the
@@ -1245,7 +1243,6 @@ SQLstatementIntern(Client c, str *expr, 
        if (!m->sa)
                m->sa = sa_create();
        /*
-        * @-
         * System has been prepared to parse it and generate code.
         * Scan the complete string for SQL statements, stop at the first error.
         */
@@ -1406,7 +1403,6 @@ SQLcompile(Client cntxt, MalBlkPtr mb, M
 }
 
 /*
- * @-
  * Locate a file with SQL commands and execute it. For the time being a 1MB
  * file limit is implicitly imposed. If the file can not be located in the
  * script library, we assume it is sufficiently self descriptive.
@@ -1446,7 +1442,6 @@ SQLinclude(Client cntxt, MalBlkPtr mb, M
 }
 
 /*
- * @-
  * The SQL reader collects a (sequence) of statements from the input
  * stream, but only when no unresolved 'nxt' character is visible.
  * In combination with SQLparser this ensures that all statements
@@ -1505,7 +1500,6 @@ SQLreader(Client c)
        m = be->mvc;
        m->errstr[0] = 0;
        /*
-        * @-
         * Continue processing any left-over input from the previous round.
         */
 
@@ -1513,7 +1507,6 @@ SQLreader(Client c)
        mnstr_printf(GDKout, "#pos %d len %d eof %d \n", in->pos, in->len, 
in->eof);
 #endif
        /*
-        * @-
         * Distinguish between console reading and mclient connections.
         * The former comes with readline functionality.
         */
@@ -1598,7 +1591,7 @@ SQLreader(Client c)
 #endif
                }
        }
-       if (!go || (strncmp(CURRENT(c), "\\q", 2) == 0)) {
+       if ( (c->stimeout &&  GDKusec()- c->session > c->stimeout) || !go || 
(strncmp(CURRENT(c), "\\q", 2) == 0)) {
                in->pos = in->len;      /* skip rest of the input */
                c->mode = FINISHCLIENT;
                return NULL;
@@ -1607,12 +1600,10 @@ SQLreader(Client c)
 }
 
 /*
- * @-
  * The SQL block is stored in the client input buffer, from which it
  * can be parsed by the SQL parser. The client structure contains
  * a small table of bounded tables. This should be reset before we
  * parse a new statement sequence.
- * @-
  * Before we parse the sql statement, we look for any variable settings
  * for specific commands.
  * The most important one is to prepare code to be handled by the debugger.
@@ -1637,7 +1628,6 @@ SQLsetDebugger(Client c, mvc *m, int ono
 }
 
 /*
- * @-
  * The trace operation collects the events in the BATs
  * and creates a secondary result set upon termination
  * of the query. This feature is extended with
@@ -2276,7 +2266,6 @@ SQLengine(Client c)
 }
 
 /*
- * @-
  * Assertion errors detected during the execution of a code block
  * raises an exception. An debugger dump is generated upon request
  * to ease debugging.
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to