Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2013-01-09 Thread Chris Hillery
Review: Approve

I've worked with Luis extensively over the past few days, and he has fixed all 
the issues that have come up. These test cases now run valgrind clean.
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2013-01-09 Thread Rodolfo Ochoa
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2013-01-09 Thread Matthias Brantner
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2013-01-09 Thread Zorba Build Bot
Attempt to merge into lp:zorba failed due to conflicts: 

text conflict in ChangeLog
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2013-01-04 Thread Luis Rodriguez Gonzalez
A new SQLite module version is now uploaded. I fixed most of the problems but 
I'm still testing out things.
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2012-12-23 Thread Chris Hillery
Review: Needs Fixing

Code review comments:

1. Many of the functions are not marked %an:sequential. I believe all of them 
should be.

2. s:disconnect() returns xs:anyURI, but the documentation says it returns 
true if everything went OK. I suspect it should be xs:boolean.

See also the discussion in email about JDBC module API vs. SQLite module API. 
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2012-12-23 Thread Chris Hillery
Review: Needs Fixing

Oh, also a typo: the word prepated (instead of prepared) appears in the 
XQDoc 6 times.
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2012-12-23 Thread Chris Hillery
I believe there's a memory leak. valgrind reports a large block (around 73k) of 
memory lost at line 847 in sqlite_module.cpp for most of the tests. This is the 
call to sqlite3_open_v2(). After a little debugging, I see that sqlite3_close() 
is being called in ConnMap::destroy(). However, according to 
http://www.sqlite.org/c3ref/close.html , calling sqlite3_close() defers all 
memory cleanup if there are any outstanding prepared statement objects.

Prepared statements are cleaned up with the call to sqlite3_finalize() in 
StmtMap::destroy(); however, this function does not get called when executing 
one of the test queries. Hence, the entire database connection is leaked.
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2012-12-23 Thread Chris Hillery
There are two memory errors when running the module tests, one in test9, one in 
test6. I'm attaching the relevant parts of the valgrind report.
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2012-12-19 Thread Chris Hillery
Review: Needs Fixing

I've pushed a couple changes to get the module compiling on Linux. However, 
several of the test cases fail for me with the error 
http://www.zorba-xquery.com/modules/sqlite:SQLI library routine called out 
of sequence.

I found this link regarding that error message:

http://sqlite.org/cvstrac/wiki?p=LibraryRoutineCalledOutOfSequence

However, I think the error may be in the test cases. You are using a number of 
let statements to perform sequential tasks such as opening the database 
connection and querying it, and as far as I know XQuery doesn't guarantee the 
order of operations of lets in a single FLWOR. Changing these to sequential 
blocks using scripting may solve these problems. For instance, test0.xq 
currently reads

let $path := f:path-to-native(resolve-uri(./))
let $db := s:connect(concat($path, small2.db))
let $isconn := s:is-connected($db)
let $result := s:execute-query($db, select * from smalltable)
let $old-db := s:disconnect($db)
return ($result, $isconn)

This throws the SQLI error. However, if I change the query to the following:

let $path := f:path-to-native(resolve-uri(./))
let $db := s:connect(concat($path, small2.db))
return {
   variable $isconn := s:is-connected($db);
   variable $result := s:execute-query($db, select * from smalltable);
   variable $old-db := s:disconnect($db);
   ($result, $isconn)
}

the test passes. (Note that when running this query from the command line, I 
get Zorba static warning [zwarn:ZWST0004]: sequential FLWOR expr may not have 
the semantics you expect, so perhaps my code isn't totally correct either. But 
the test passes, at least.

-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2012-12-19 Thread Chris Hillery
Another problem is that you have hard-coded English error messages in a number 
of places in C++ code, such as DB ID not recognized, SQL Statement is not 
valid, and so on. I'm actually not sure how to handle this from a non-core 
module; I'll send an email about it to the list.
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2012-12-19 Thread Chris Hillery
Also, need to put something in the ChangeLog.
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2012-12-19 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba 
failed. Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 
(message):
  Validation queue job zorba-for-sqlite-2012-12-19T09-53-00.358Z is finished.
  The final status was:

  

  8 tests did not succeed - changes not commited.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/zorba-for-sqlite into lp:zorba

2012-12-19 Thread Luis Rodriguez Gonzalez
I fixed the problems Chris pointed out. Please review.
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-for-sqlite/+merge/139108
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp