[Monetdb-developers] Simple bat operations

darabi at web.de darabi at web.de
Thu Oct 11 17:09:22 CEST 2007


Hello Nils,

OK, then something doesn't work.

When I try your suggestion, I get this:

user at host$ mclient -d demo -l mal
mal>b := bat.new(:int,:int);
mal>io.print(b);
#-----------------#
# h     t         # name
# int   int       # type
#-----------------#
mal>bat.setName(b,"test");
mal>bat.setPersistent(b,true);
mal>transaction.commit(); 
mal>\q

user at host$ mclient -d demo -l mal
mal>b:= bbp.bind("test");
mal>io.print(b); 
MAPI  = monetdb at 127.0.0.1:50001
QUERY = io.print(b); 
ERROR = !TypeException:user.main[1]:'b' may not be used before being initialized
mal>\q


I have downloaded and compiled MonetDB-Mars-SuperBall-SR3.tar.bz2 on an Ubuntu
i686 single cpu system running a 2.6.20 kernel.

user at host$ ps auxwww | grep mserver
user   12072  0.0  4.3 133232 67268 ?        Ssl  Oct10   0:01 /opt/monetdb/bin/mserver5 --dbfarm=/opt/monetdb/var/MonetDB5/dbfarm --set daemon yes --set monet_welcome no --dbname=voc --config=/opt/monetdb/var/MonetDB5/dbfarm/voc/.monetdb.conf /opt/monetdb/var/MonetDB5/dbfarm/voc/.mserver5.dbinit
user   12479  0.0  3.9 109320 61760 ?        Ssl  Oct10   0:00 /opt/monetdb/bin/mserver5 --dbfarm=/opt/monetdb/var/MonetDB5/dbfarm --set daemon yes --set monet_welcome no --dbname=demo --config=/opt/monetdb/var/MonetDB5/dbfarm/demo/.monetdb.conf

user at host$ mserver5 --version
MonetDB Server v5.0.0
Copyright (c) 1993-2007 CWI, all rights reserved
Compiled by: sjoerd at localhost.localdomain
Compilation: gcc -O2 -std=c99 -O6 -fomit-frame-pointer                          -finline-functions -falign-loops=4 -falign-jumps=4 -falign-functions=4 -fexpensive-optimizations                     -funroll-loops -frerun-cse-after-loop -frerun-loop-opt 
Linking:     ld -IPA -m elf_x86_64 


I already tried 'mclient -l sql' without any apparent problems, so it appeared
unlikely that there were bigger issues.
 
I will try to run the test suite(s).


Thank you very much


Kambiz



----- Original Message -----
From: "Niels Nes" <Niels.Nes at cwi.nl>
To: darabi at web.de
Sent: Donnerstag, 11. Oktober 2007 16.24 Uhr (GMT+0100) Europe/Berlin
Subject: Re: [Monetdb-developers] Simple bat operations

On Thu, Oct 11, 2007 at 02:34:15PM +0200, darabi at web.de wrote:
> In the meantime, I have also tried all the bbp functions which
> I could think of:
> 
> bbp.find
> bbp.bind
> bbp.take
> 
> But none of them gives me a bat which I can use. Strangely, none of
> them says anything about whether the function call succeeded
> or not.

okay here a small example then

b := bat.new(:int,:int);
io.print(b);
bat.setName(b,"test");
bat.setPersistent(b,true);
transaction.commit();

# after server restart the following should work.
b:= bbp.bind("test");
io.print(b);

Niels
> 
> 
> Kambiz
> 
> ----- Original Message -----
> From: darabi at web.de
> To: monetdb-developers at lists.sourceforge.net
> Cc: "Niels Nes" <Niels.Nes at cwi.nl>
> Sent: Donnerstag, 11. Oktober 2007 9.47 Uhr (GMT+0100) Europe/Berlin
> Subject: Re: [Monetdb-developers] Simple bat operations
> 
> Niels,
> 
> thank you very much for your help.
> 
> How can I access this bat, when I start a new session?
> 
> bat.load("person_name");
> 
> doesn't seem to work. io.print(n):
> 
> ERROR = !TypeException:user.main[1]:'n' may not be used before being initialized
> 
> 
> Thanks
> 
> Kambiz
> 
> ----- Original Message -----
> From: "Niels Nes" 
> To: darabi at web.de
> Cc: monetdb-developers at lists.sourceforge.net
> Sent: Donnerstag, 11. Oktober 2007 9.38 Uhr (GMT+0100) Europe/Berlin
> Subject: Re: [Monetdb-developers] Simple bat operations
> 
> On Thu, Oct 11, 2007 at 08:00:36AM +0200, darabi... wrote:
> > Hello,
> > 
> > sorry for asking so many dumb questions, but I don't seem
> > to be able to find the answers in the docs.
> > 
> > I try to create and persist a bat:
> > 
> > (mclient -d demo -l mal)
> > 
> > n := bat.new(:oid,:str);
> > bat.setName(n, "person_name");
> > bat.setPersistent(n, true);
> > 
> > bat.append(n, "John", true);
> > bat.append(n, "James", true);
> > 
> 
> replace this save
> > bat.save(n);
> by
> 
> transaction.commit();
> 
> Niels
> 
> (ps later you probably want to switch to subcommit, ie only commit those
> bat that changed, for this see the documenation in the transaction module
> (src/modules/mal/transaction.mx)
> > 
> > But this doesn't seem to be sufficient.
> > 
> > Or at least I then don't know how to load this bat the next
> > time I start mclient.
> > 
> > Is there a file (one of the tests or sth.) which contains
> > such basic tests? I tried to find-grep over them, but didn't
> > succeed in finding what I was looking for.
> > 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Monetdb-developers mailing list
> Monetdb-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-developers
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Monetdb-developers mailing list
> Monetdb-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-developers

-- 

Niels Nes, Centre for Mathematics and Computer Science (CWI)
Kruislaan 413, 1098 SJ Amsterdam, The Netherlands
room C0.02,  phone ++31 20 592-4098, fax ++31 20 592-4312
url: http://www.cwi.nl/~niels   e-mail: Niels.Nes at cwi.nl





More information about the developers-list mailing list