Changeset: 4f1fe13efae8 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4f1fe13efae8 Modified Files: clients/ChangeLog clients/mapiclient/mclient.1 clients/mapiclient/mclient.c Branch: default Log Message:
mclient: disable timer for non-XQuery, bug #2705 The timer is incorrect for non-XQuery languages, since it was designed and made for XQuery only. The built-in timer for SQL is more correct, and is always available in SQL rendering mode. diffs (102 lines): diff --git a/clients/ChangeLog b/clients/ChangeLog --- a/clients/ChangeLog +++ b/clients/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Mon Jan 24 2011 Fabian Groffen <[email protected]> +- Disable timer functionality for non-XQuery languages since it is + incorrect, bug #2705 + * Tue Jan 4 2011 Fabian Groffen <[email protected]> - Added mapi_get_uri function to retrieve mapi URI for the connection diff --git a/clients/mapiclient/mclient.1 b/clients/mapiclient/mclient.1 --- a/clients/mapiclient/mclient.1 +++ b/clients/mapiclient/mclient.1 @@ -180,9 +180,6 @@ interactive session is started (if the \fB\-\-interactive\fP option is given). .TP -\fB\-\-time\fP (\fB\-t\fP) -Print timing information to standard error. -.TP \fB\-\-Xdebug\fP (\fB\-X\fP) Trace network interaction between .I mclient @@ -242,6 +239,9 @@ Shredding is done before any queries specified with the .B \-\-statement option or in files specified on the command line are executed. +.TP +\fB\-\-time\fP (\fB\-t\fP) +Print timing information to standard error. .SH BACKSLASH COMMANDS .SS General Commands @@ -278,9 +278,6 @@ .IR readline (3) history. .TP -\fB\et\fP -Toggle the timer. -.TP \fB\eL\fP \fIfile\fP Log client/server interaction in the given .IR file . @@ -398,5 +395,8 @@ Possible modes are .B dm and \fBxml\fP[\fB\-noheader\fP][\fB\-typed\fP|\fB\-noroot\fP|\fB\-root\-FOOBAR\fP]. +.TP +\fB\et\fP +Toggle the timer. .SH SEE ALSO .IR msqldump (1) diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -292,7 +292,7 @@ mnstr_flush(toConsole); t1 = gettime(); assert(t1 >= t0); - if (mark && specials == NOmodifier) { + if (mode == XQUERY && mark && specials == NOmodifier) { fprintf(stderr, "%s %7ld.%03ld msec %s\n", mark, (long) ((t1 - t0) / 1000), (long) ((t1 - t0) % 1000), mark2 ? mark2 : ""); fflush(stderr); } @@ -1936,6 +1936,8 @@ free(buf); return errseen; case 't': + if (mode != XQUERY) + break; mark = mark ? NULL : "Timer"; if (mark2) free(mark2); @@ -2478,7 +2480,6 @@ fprintf(stderr, " -l language | --language=lang {sql,xquery,mal,mil}\n"); fprintf(stderr, " -L logfile | --log=logfile save client/server interaction\n"); fprintf(stderr, " -s stmt | --statement=stmt run single statement\n"); - fprintf(stderr, " -t | --time time commands\n"); fprintf(stderr, " -X | --Xdebug trace mapi network interaction\n"); #ifdef HAVE_POPEN fprintf(stderr, " -| cmd | --pager=cmd for pagination\n"); @@ -2497,6 +2498,7 @@ fprintf(stderr, " -I docname | --input=docname document name, XML document on standard input\n"); fprintf(stderr, " -G | --algebra use algebra frontend\n"); fprintf(stderr, " -g | --no-algebra use old frontend\n"); + fprintf(stderr, " -t | --time time commands\n"); exit(xit); } @@ -2901,7 +2903,7 @@ if (algebra != -1 && mode == XQUERY) mapi_setAlgebra(mid, algebra); - mapi_profile(mid, mark != NULL); + mapi_profile(mid, mode == XQUERY && mark != NULL); mapi_trace(mid, trace); if (output) { setFormatter(mid, output); _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
