[syslog-ng] commit with the oracle sql driver

Balazs Scheidler bazsi at balabit.hu
Sat Apr 10 16:38:39 CEST 2010


Hi,

On Sat, 2010-03-06 at 13:12 -0700, Patrick H. wrote:
> Yes, I signed the CLA and sent it in to info at balabit.com (thats where
> the instructions say to send it).
> I also put it all in a bug report
> (https://bugzilla.balabit.com/show_bug.cgi?id=73).
> 
> I ended up not doing anything with prepared statements as the only way
> to do so without ripping out the libdbi driver and replacing it with
> one that has prepared statements built is to do server side prepared
> statements. I was originally considering this before I found a little
> oracle setting that you can set when you establish a session
> (cursor_sharing=force, basically recognizes that a query is the same
> as a previous one, so it doesnt have to do permission checks and all
> that stuff every time). But to support that I had to add a setting
> which will run a specified statement when a new session is
> established.

I've started integrating your patches to OSE 3.2, but I'm afraid it is
not completely ready for prime time yet.

flush_timeout() handling was racy, and since it is not trivial to solve
that, I've commented that out.

Also, I've added explicit "BEGIN" commands and an explicit flag to
enable explicit BEGIN/COMMIT commands.

This is the commit message:

commit d41bc26a63986e9ce06a9a9b0fa50fa82eae2002
Author: Balazs Scheidler <bazsi at balabit.hu>
Date:   Sat Apr 10 16:36:19 2010 +0200

    afsql: Added explicit COMMIT support
    
    Instead of committing all INSERT statements separately, use flush_lines
    parameter to control transaction size. e.g. with the following configuration
    
    destination d_sql { sql(... flags(explicit-commits) flush-lines(100)); };
    
    The SQL driver will generate a transaction for every 100 lines.
    
    This patch was originally contributed by Patrick Hemmer, was somewhat
    modified by me.
    
    The patch is not yet complete, time based transaction closure is
    commented out as its submitted implementation was not thread safe.
    
    Submitted-By: Patrick Hemmer


Thanks for your contribution.

-- 
Bazsi




More information about the syslog-ng mailing list