Hi all,
can you tell me what I need to change to make Mserver communicate with
mclient on OS X. All I get is silence...
$ Mserver --dbinit='module(pathfinder); mil_start();'
# MonetDB Server v4.25.0
# based on GDK v1.25.0
# Copyright (c) 1993-July 2008, CWI. All rights reserved.
# Copyright (c) August 2008-, MonetDB B.V.. All rights reserved.
# Compiled for i686-apple-darwin9.5.0/32bit with 32bit OIDs;
dynamically linked.
# Visit http://monetdb.cwi.nl/ for further information.
# PF/Tijah module v0.9.0 loaded. http://dbappl.cs.utwente.nl/pftijah
# MonetDB/XQuery module v0.25.0 loaded (default back-end is 'algebra')
# XRPC administrative console at http://127.0.0.1:50001/admin
MonetDB>
$ mclient -lx q01.xq
^C (after 2 minutes)
$ mclient -lmil q01.mil
^C (after 2 minutes)
Running the same query through Mserver directly completes in under a
second.
$ pf q01.xq > q01.mil
$ Mserver q01.mil
# MonetDB Server v4.25.0
# based on GDK v1.25.0
# Copyright (c) 1993-July 2008, CWI. All rights reserved.
# Copyright (c) August 2008-, MonetDB B.V.. All rights reserved.
# Compiled for i686-apple-darwin9.5.0/32bit with 32bit OIDs;
dynamically linked.
# Visit http://monetdb.cwi.nl/ for further information.
# PF/Tijah module v0.9.0 loaded. http://dbappl.cs.utwente.nl/pftijah
# MonetDB/XQuery module v0.25.0 loaded (default back-end is 'algebra')
# XRPC administrative console at http://127.0.0.1:50001/admin
<?xml version="1.0" encoding="utf-8"?>
<XQueryResult>Ayonca Vijaykrishnan</XQueryResult>
MonetDB>
Thanks,
Jan
--
Jan Rittinger
Lehrstuhl Datenbanken und Informationssysteme
Wilhelm-Schickard-Institut für Informatik
Eberhard-Karls-Universität Tübingen
http://www-db.informatik.uni-tuebingen.de/team/rittinger
On Mon, Oct 27, 2008 at 06:35:34AM +0000, Martin Kersten wrote:
> Update of /cvsroot/monetdb/MonetDB5/src/modules/mal
> In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4663
>
> Modified Files:
> bbp.mx
> Log Message:
> Silence compilers
>
>
> U bbp.mx
> Index: bbp.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/bbp.mx,v
> retrieving revision 1.127
> retrieving revision 1.128
> diff -u -d -r1.127 -r1.128
> --- bbp.mx 25 Oct 2008 22:08:09 -0000 1.127
> +++ bbp.mx 27 Oct 2008 06:35:32 -0000 1.128
> @@ -867,7 +867,7 @@
> int i;
> char buf[MAXPATHLEN];
> char cwd[MAXPATHLEN];
> - getcwd(cwd, MAXPATHLEN);
> + (void) getcwd(cwd, MAXPATHLEN);
This is not "sufficient".
With optimization enabled, gcc still (correctly) complains as follows:
========
gcc -DHAVE_CONFIG_H -I. -I../../.. -I/ufs/manegold/_/scratch0/Monet/Testing/Current/source/MonetDB5/src/modules/mal -I/ufs/manegold/_/scratch0/Monet/Testing/Current/source/MonetDB5/src/modules/mal -I../atoms -I/ufs/manegold/_/scratch0/Monet/Testing/Current/source/MonetDB5/src/modules/mal/../atoms -I../kernel -I/ufs/manegold/_/scratch0/Monet/Testing/Current/source/MonetDB5/src/modules/mal/../kernel -I../../mal -I/ufs/manegold/_/scratch0/Monet/Testing/Current/source/MonetDB5/src/modules/mal/../../mal -I/ufs/manegold/_/scratch0/Monet/Testing/Current/prefix.--enable-strict_--disable-optimize_--disable-debug_--disable-assert/include/MonetDB -I/ufs/manegold/_/scratch0/Monet/Testing/Current/prefix.--enable-strict_--disable-optimize_--disable-debug_--disable-assert/include/MonetDB/mapilib -I/ufs/manegold/_/scratch0/Monet/Testing/Current/prefix.--enable-strict_--disable-optimize_--disable-debug_--disable-assert/include/MonetDB -I/ufs/manegold/_/scratch0/Monet/Testing/Current/prefix.--enable-strict_--disable-optimize_--disable-debug_--disable-assert/include/MonetDB/common -I/ufs/manegold/_/scratch0/Monet/Testing/Current/prefix.--enable-strict_--disable-optimize_--disable-debug_--disable-assert/include/MonetDB/gdk -I/usr/include/libxml2 -DLIBBBP -O2 -Wall -Wextra -std=c99 -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2 -D_REENTRANT -c bbp.c -fPIC -DPIC -o .libs/lib_bbp_la-bbp.o
cc1: warnings being treated as errors
/ufs/manegold/_/scratch0/Monet/Testing/Current/source/MonetDB5/src/modules/mal/bbp.mx: In function 'CMDbbpLocation':
/ufs/manegold/_/scratch0/Monet/Testing/Current/source/MonetDB5/src/modules/mal/bbp.mx:874: warning: ignoring return value of 'getcwd', declared with attribute warn_unused_result
make[8]: *** [lib_bbp_la-bbp.lo] Error 1
========
getcwd() can fail (e.g., incase the current directpry is not readable for
the user; see `man getcwd` for details), and hence, the return value needs
to be checked, and proper measures need to be taken in case getcwd() does
fail (e.g., have default fall-back or trigger warning or error).
Stefan
> b = BATnew(TYPE_int, TYPE_str, BBPsize);
> if (b == 0)
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Monetdb-checkins mailing list
> Monetdb-checkins(a)lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
>
>
--
| Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl |
| CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ |
| 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 |
| The Netherlands | Fax : +31 (20) 592-4312 |
Is there currently a syntax to log every incoming SQL query to a file?
I found options like:
1) ODBCDEBUG [1]
2) mapi_log(...) [2]
But is there something easy to capture all incoming query with their
timings; so a real slow queries log can be created?
In the Skyserver presentation [3] I see 'Query log' analysis; I'm really
interested in how this is realised. I would like to do an analysis on
all queries Mapserver generates by its GDAL/OGR layer, since I have
implemented this interface using ODBC (yes, I was too lazy to implement
a native connector) some logging would be possible, but not
concurrently, hence the file would be overwritten.
If nothing is in place, I'm happy to give it a try and implement it.
Stefan
[1] <http://article.gmane.org/gmane.comp.db.monetdb.devel/1381>
[2]
<http://monetdb.cwi.nl/projects/monetdb/SQL/Documentation/Mapi-Function-Refe…>
[3] <www.win.tue.nl/~tcalders/presentations/ivanova.ppt>
Hi All - is there any chance we could get a comment or two from the core
monetdb developers about the future of x100?
I'm just curious if it's going to be an extension, a separate product,
commercial, open source, etc.....
To be honest I'm fine with whatever the answer is... you could tell me it's
never going to see the light of day and that would be ok.
Just wondering.
Best Regards,
Ross
On 2008-10-16 08:21, Jan Flokstra wrote:
> Update of /cvsroot/monetdb/pathfinder/runtime
> In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11903
>
> Modified Files:
> shredder.mx
> Log Message:
> - fix strncat() size overflow compilation problem on some architectures.
>
>
>
> U shredder.mx
> Index: shredder.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/pathfinder/runtime/shredder.mx,v
> retrieving revision 1.142
> retrieving revision 1.143
> diff -u -d -r1.142 -r1.143
> --- shredder.mx 15 Oct 2008 12:45:12 -0000 1.142
> +++ shredder.mx 16 Oct 2008 06:21:44 -0000 1.143
> @@ -1324,7 +1324,7 @@
>
> const xmlChar *abs_SystemID;
>
> - char locbuff[FILENAME_MAX];
> + char locbuff[FILENAME_MAX+1];
>
> if (SystemID && shredCtx->base_dir && !isURL((char*)SystemID) && !((*SystemID=='/') || (*SystemID=='\\'))) {
> /* is is a relative name which should be prefixed with the
> @@ -1333,7 +1333,7 @@
> /* base_dir */
> locbuff[0] = '\0';
> strncat(&locbuff[0],shredCtx->base_dir,FILENAME_MAX);
> - strncat(&locbuff[0],(char*)SystemID,FILENAME_MAX);
> + strncat(&locbuff[0],(char*)SystemID,FILENAME_MAX-strlen(shredCtx->base_dir));
> abs_SystemID = (const xmlChar *)&locbuff[0];
> } else
> abs_SystemID = SystemID;
>
This is not very good from a defensive programming point of view, nor
from an efficiency point of view. Plus, the compiler complains about
the second strncat. Better, instead of the three lines starting with
locbuff[0] = '\0'; do
snprintf(locbuff, sizeof(locbuff), "%s%s", shredCtx->base_dir, (char *)
SystemID);
The problem is, strlen(shredCtx->base_dir) could be greater than
FILENAME_MAX, in which case the third argument to the second strncat
could overflow and become extremely large (it's an unsigned, so it won't
be negative).
--
Sjoerd Mullender
On 12-10-2008 09:38:04 +0000, Martin Kersten wrote:
> Update of /cvsroot/monetdb/MonetDB5/conf
> In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19179
>
> Modified Files:
> monetdb5.conf.in
> Log Message:
> Move the MonetDB related files to a clearly marked achorpoint default
> -mero_msglog=@localstatedir@@DIRSEP@log@DIRSEP@merovingian.log
> -mero_errlog=@localstatedir@@DIRSEP@log@DIRSEP@merovingian.log
> +mero_msglog=@localstatedir@@DIRSEP@MonetDB5@DIRSEP@merovingian.log
> +mero_errlog=@localstatedir@@DIRSEP@MonetDB5@DIRSEP@merovingian.log
May I suggest to leave in "log" in here. Traditionally, logfiles are
stored in /var/log. No real need to deviate from that, I think?
/var/log/MonetDB5 would be ok, I guess.
> -mero_pidfile=@localstatedir@@DIRSEP@run@DIRSEP@merovingian.pid
> +mero_pidfile=@localstatedir@@DIRSEP@MonetDB5@DIRSEP@merovingian.pid
Pidfiles are traditionally stored in /var/run. I think this is not a
good idea.
Note that both changes don't make "slotting" of monetdb any more
possible than it is now.
On Sun, Oct 12, 2008 at 10:24:45AM +0000, Niels Nes wrote:
> Update of /cvsroot/monetdb/MonetDB/src/gdk
> In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv23370/src/gdk
>
> Modified Files:
> gdk_logger.mx
> Log Message:
> default log directories moved to ${gdk_dbfarm}
> Logger now extends the logdir with ${dbname}/$log_name
> where $log_name == sql or xquery (passed by the call to logger_create)
> (so now everything is again under the dbfarm base directory by default
> but can still be set to anything else using the logdir variables)
Niels,
(mainly to be able to anticipate how your changes will affect testing, and
whether I need to do any changes in Mtest.py, TestTools, and/or */RunMtest*)
in case we do use/set sql_logdir and/or xquery_logdir, what wil be the
resulting path for the log?
${*_logdir}
or
${*_logdir}/${dbname}/${log_name}
?
in other words, is the default for sql_logdir & xquery_logdir now
${gdk_dbfarm} or ${gdk_dbfarm}/${dbname}/${log_name}
?
Thanks!
Stefan
> Needed to patch mo_substitute (now rewrites all ${varname} and for windows
> also all %varname%), same for monet_options.py
>
>
>
> U gdk_logger.mx
> Index: gdk_logger.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_logger.mx,v
> retrieving revision 1.26
> retrieving revision 1.27
> diff -u -d -r1.26 -r1.27
> --- gdk_logger.mx 10 Oct 2008 08:50:31 -0000 1.26
> +++ gdk_logger.mx 12 Oct 2008 10:24:43 -0000 1.27
> @@ -1037,7 +1037,7 @@
>
> lg->tid = 0;
>
> - snprintf(filename, BUFSIZ, "%s%c%s%c", logdir, DIR_SEP, dbname, DIR_SEP);
> + snprintf(filename, BUFSIZ, "%s%c%s%c%s%c", logdir, DIR_SEP, dbname, DIR_SEP, fn, DIR_SEP);
> lg->fn = GDKstrdup(fn);
> lg->dir = GDKstrdup(filename);
> lg->phandler = phandler;
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Monetdb-checkins mailing list
> Monetdb-checkins(a)lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
>
>
--
| Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl |
| CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ |
| 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 |
| The Netherlands | Fax : +31 (20) 592-4312 |
On 12-10-2008 10:31:31 +0000, Martin Kersten wrote:
> Update of /cvsroot/monetdb/sql/src/backends/monet5
> In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv23781
>
> Modified Files:
> merovingian.mx monetdb.mx
> Log Message:
> Use a known location for the lock file.
known?
> - snprintf(lockfile, 512, "%s/.merovingian_lock", dbfarm);
> + /* the lock file is placed in the same directory as the pid */
> + strcpy(lockfile, pidfilename);
> + c= strrchr(lockfile,'/');
> + if (c)
> + strcpy(c+1,".merovingian_lock");
> + } else
> + strcat(lockfile, ".merovingian_lock");
Why would you move out the lockfile from the dbfarm, and put it in
/var/run instead? merovingian manages a dbfarm, hence the most obvious
place to lock is the dbfarm itself.
You now allow a user to use a different pidfile, but the same dbfarm and
get two merovingians managing the same dbfarm, which seems like NOT a
good idea to me.
Below changes seem unrelated to the commit message to me. It indeed
fixes one bug. However, if you change the input prompt to ignore an
empty response, you probably want to change the documentation
accordingly, as it states that the default is No, while you now require
the user to at least type something.
(Yes I'm picky, because everything was very well thought over.)
> U monetdb.mx
> Index: monetdb.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/sql/src/backends/monet5/monetdb.mx,v
> retrieving revision 1.27
> retrieving revision 1.28
> diff -u -d -r1.27 -r1.28
> --- monetdb.mx 10 Oct 2008 08:54:15 -0000 1.27
> +++ monetdb.mx 12 Oct 2008 10:31:29 -0000 1.28
> @@ -24,7 +24,7 @@
> The monetdb utility is designed to be the interface for the DBA to the
> dbfarm. Creating or deleting databases next to retrieving status
> information about them are the primary goals of this tool.
> -
> +@{
> @h
> #define TOOLKIT_VERSION "0.4"
>
> @@ -282,11 +282,13 @@
> }
> /* demo | state | uptime | health */
> secondsToString(avg, uplog.avguptime, 0);
> - printf("%-14s %s %12s %3d%%, %3s %s\n",
> - dbname,
> - state, uptime,
> - 100 - (uplog.crashcntr * 100 / uplog.startcntr),
> - avg, crash);
> + printf("%-14s %s %12s",
> + dbname, state, uptime);
> + if (uplog.startcntr)
> + printf(" %3d%%, %3s %s",
> + 100 - (uplog.crashcntr * 100 / uplog.startcntr),
> + avg, crash);
> + printf("\n");
> } else if (mode == 2) {
> /* long mode */
> char *state;
> @@ -1076,9 +1078,10 @@
> printf("you are about to remove database '%s'\n", dbname);
> printf("ALL data in this database will get lost, "
> "are you sure? [y/N] ");
> - if (scanf("%c", &answ) >= 1 && (answ == 'y' || answ == 'Y')) {
> - /* do it! */
> - } else {
> + answ = getchar();
> + while (answ!= '\n' && getchar()!= '\n')
> + ;
> + if (answ != 'y' && answ != 'Y') {
> printf("battle control terminated\n");
> exit(0);
> }
> @@ -1361,4 +1364,5 @@
> return(0);
> }
>
> +@}
> /* vim:set ts=4 sw=4 noexpandtab: */
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Monetdb-sql-checkins mailing list
> Monetdb-sql-checkins(a)lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins