Steffen, first of all (once again ;-) thank you very much for your work, and your "last minute" fixes. Sorry for my late replay, but I've been (and actually still am) quite busy with the final steps toward MonetDB 4.6.0 ... Anyway, ther should be at least some time for a (short) reply. Let me start with admitting, that I'm everthing but a perl expert, and there also people here (Sjoerd, Fabian) that know Mapi better then me. Nonetheless, I'll try to give some feedback, hoping the someone else (Sjoerd, Fabian, Niels?) will fill in the rest.
Edmund Dengler wrote:
This can be tested via the sample MIL perl code, as this is how I found the problems. Even with the above 2 changes, the sample code does not run (fails to recognize error return codes, etc).
Stefan, let's start with a few questions to milsample.pl:
Not being a perl expert, I didn't produce this script. Martin originally provided it, and I'm not sure who "maintained" it since then. I notice, though, that there are two versions, that are almost identical: ======== 19:06:27 manegold@draco:~/Monet/Stable/MonetDB $ l ./src/mapi/clients/perl/milsample.pl ./src/mapi/clients/perl/Tests/milsample.pl -rwxr-x--- 1 manegold monet 3217 Feb 14 17:49 ./src/mapi/clients/perl/milsample.pl* -rwxr-x--- 1 manegold monet 2589 Jan 20 18:12 ./src/mapi/clients/perl/Tests/milsample.pl* 19:06:30 manegold@draco:~/Monet/Stable/MonetDB $ diff ./src/mapi/clients/perl/milsample.pl ./src/mapi/clients/perl/Tests/milsample.pl 2,19d1 < < # The contents of this file are subject to the MonetDB Public < # License Version 1.0 (the "License"); you may not use this file < # except in compliance with the License. You may obtain a copy of < # the License at < # http://monetdb.cwi.nl/Legal/MonetDBLicense-1.0.html < # < # Software distributed under the License is distributed on an "AS < # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or < # implied. See the License for the specific language governing < # rights and limitations under the License. < # < # The Original Code is the Monet Database System. < # < # The Initial Developer of the Original Code is CWI. < # Portions created by CWI are Copyright (C) 1997-2005 CWI. < # All Rights Reserved. < 36c18 < { PrintError => 0, RaiseError => 1 }); ---
{'PrintError' =>0, 'RaiseError' => 0});
49,51c31,36 < # deliberately executing a wrong MIL statement: < $sth= $dbh->prepare("( xyz 1);\n"); < eval { $sth->execute }; print "ERROR REPORTED: $@" if $@; ---
$sth= $dbh->prepare("( xyz 1);\n"); $sth->execute() ;#|| die "Excution error:\n".$sth->{errstr}; if($sth->{err}){ print "ERROR REPORTED:".$sth->{errstr}."\n"; } print "STH:".$sth->{row}."\n"; 53c38 < $dbh->do("var b:=new(int,int);");
$dbh->do("b:=new(int,int);"); 72d56 < $sth->execute; 19:06:34 manegold@draco:~/Monet/Stable/MonetDB $ ========
Being a sample, I'd propose to remove ./src/mapi/clients/perl/milsample.pl and keep only ./src/mapi/clients/perl/Tests/milsample.pl --- well, that is keep the newest on of the tow, but place it in ./src/mapi/clients/perl/Tests/ Unless you (or anybody else) see an urgend need to have this clean-up done "immediately", I'd propose to postpone until after the release.
1) The script connects as "joe"/"joe's password". It seems that the server ignores user/password in a MIL session. Indeed, I found no BAT where users may be stored - only the SQL server creates a user table. Am I right that a MIL session is 'authentication free'?
Right, there is no authentication at all in MIL sessions; as yet, only the SQL frontend supports (and requires) authentication.
2) The script tries to connect to database=test. DBD::monetdb ignores this part of the DSN, because mapi_connect doesn't have a database parameter. Is there another method to choose the database, or is this legacy code, or a marker for future enhancements? Should we drop the database part?
Could the MAPI experts help here?
3) In the test script, b:=new(int,int); gives !ERROR: interpret_assignment: unknown variable 'b'. It seems that the 'var' keyword is now required. I read somewhere that the MIL interpreter is somewhat pickier in this release. Can you point me to an up to date manual or similar?
The major MIL changes were already done some time (almost half a year) ago, when we officially released MonetDB 4.4, but as I saw from your check-ins, you already found the respective info in http://sourceforge.net/mailarchive/forum.php?thread_id=5564755&forum_id=36229 The fact, that we did overlook the "legacy" MIL code in the milsample.pl underlines the fact, that we indeed need more tests for our automatic nightly test system, especially tests for the various MAPI clients, like perl, python, php --- I'll come back to this point after the release... Well, that's all for now. Admittedly not much info, yet, but I count on my colleagues ;-) Regards from A'dam, Stefan
Steffen
-- | 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 |