Jan-Henrik,
I'm getting reports of small leakage when I follow this pattern:
c = ConnectionPool_getConnection(pool);
TRY
// prepare and bind and execute statement, or
// run or execute a query, with or without transactions
CATCH(SQLException)
// log exception
// set volatile boolean result flag
FINALLY
Connection_close(c);
END_TRY;
The try/accept block varies; but in all cases the connection leaks.
I'm attaching a stripped valgrind log which was posted to my bug-tracker.
So I wonder, is there something in the try...finally...end_try block I
need to modify to prevent this?
--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin
* Premium Hosting Services and Web Application Consultancy *
www.nfg.nl/info@nfg.nl/+31.85.877.99.97
________________________________________________________________
Version 2.12 of libzdb is now available:
Download: http://tildeslash.com/libzdb/dist/libzdb-2.12.tar.gz
MD5 checksum: dd95114cae471d1b5dfda1f263b222c1
Changes in this release:
------------------------
New: PreparedStatement_rowsChanged added to PreparedStatement.h
Fixes: Oracle: OCIPing is used to check Oracle connections and to
ensure that the Pool returns connected connections. Thanks
to Pavlo Lavrenenko.
On 09/02/2013 01:02 AM, Reindl Harald wrote:
> so something goes wrong in combination with libzdb
> IMHO this *must not* happen if MariaDB claims to be a drop-in-replacemnet
I've done some additional investigation, and indeed MariaDB appears to
mess up the server cursor when a blob is in the result.
I'm attaching a test-case and with a schema and data for you to use.
10.0.4-MariaDB-1~precise-log
libzdb-2.11.2
libzdb uses mysql_stmt_fetch to move the server cursor forward. This has
worked flawlessly until now for MySQL, SQLite, PostgreSQL and Oracle.
With MariaDB we seem to hit a problem as soon as a blob column is in the
columns.
https://github.com/tildeslash/libzdb/blob/master/src/db/mysql/MysqlResultSe…
Just try the test program with and without the 'p.data' column, and run
it. Since part_order is the primary ordering key, I use that to test for
result integrity.
--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin
* Premium Hosting Services and Web Application Consultancy *
www.nfg.nl/info@nfg.nl/+31.85.877.99.97
________________________________________________________________