Re: [libdbi-users] libdbi transaction support

2013-01-26 Thread Toby Thain
On 26/01/13 8:30 PM, markus.hoeni...@mhoenicka.de wrote: > Toby Thain writes: > > Yes, you just found out the hard way that it's wise to include ENGINE > > specifications in MySQL CREATE TABLE's. > > > > True indeed. Actually I think the news is even worse: I seem to recall that MySQL can

Re: [libdbi-users] libdbi transaction support

2013-01-26 Thread markus . hoenicka
Toby Thain writes: > Yes, you just found out the hard way that it's wise to include ENGINE > specifications in MySQL CREATE TABLE's. > True indeed. The problem with MySQL's storage engines is that the transaction_support and savepoint_support driver capabilities cannot be relied upon because

Re: [libdbi-users] libdbi transaction support

2013-01-25 Thread Toby Thain
On 25/01/13 7:40 PM, markus.hoeni...@mhoenicka.de wrote: > Markus Hoenicka writes: > > Another possible reason for problems is the table type. If someone > > uses MyISAM tables, the result I got would be expected. However, MySQL > > uses InnoDB tables as default these days, and I double-ch

Re: [libdbi-users] libdbi transaction support

2013-01-25 Thread markus . hoenicka
Markus Hoenicka writes: > Another possible reason for problems is the table type. If someone > uses MyISAM tables, the result I got would be expected. However, MySQL > uses InnoDB tables as default these days, and I double-checked that > they were used in my tests. Turns out that InnoDB

Re: [libdbi-users] libdbi transaction support

2013-01-25 Thread Markus Hoenicka
Rainer Gerhards was heard to say: > we have given it a try today and things look pretty good :-). Sounds good :-) > Unfortunately, we can reproduce the problem with MySQL. I barely > remember that MySQL by default has implicit commits enabled, what > needs to be turned off if you need real

Re: [libdbi-users] libdbi transaction support

2013-01-25 Thread Olivier Doucet
Hello, > we have given it a try today and things look pretty good :-). Unfortunately, > we can reproduce the problem with MySQL. I barely remember that MySQL by > default has implicit commits enabled, what needs to be turned off if you need > real ones. By default, MySQL has autocommit enabled

Re: [libdbi-users] libdbi transaction support

2013-01-25 Thread Rainer Gerhards
> I've checked in new versions of libdbi/src/dbi_main.c containing the > implementations of the transaction functions and libdbi- > drivers/tests/test_dbi.c with a first shot at the required test functions. > MySQL seems to fail to rollback transactions on my box whereas SQLite3 > succeeds. I'm too

Re: [libdbi-users] libdbi transaction support

2013-01-24 Thread markus . hoenicka
Rainer Gerhards writes: > > Zitat von Rainer Gerhards : > > > > > sorry for the long silence, we got sidetracked ourselfs. Finally, we > > > yesterday tried to write some test programs to get started. To do so, > > > I did a cvs checkout for both libdbi and libdbi-drivers (according to > > >

Re: [libdbi-users] libdbi transaction support

2013-01-24 Thread Rainer Gerhards
> Rainer Gerhards writes: > > > This should be easy to retrofit. I'lls see if I find > > some time but > feel > free to beat me at it. > > > > I am quite busy myself at the moment, but I could try and see if I > could > craft something along that path... > > > > Hi all, > > I've stolen som

Re: [libdbi-users] libdbi transaction support

2013-01-24 Thread Rainer Gerhards
> Zitat von Rainer Gerhards : > > > sorry for the long silence, we got sidetracked ourselfs. Finally, we > > yesterday tried to write some test programs to get started. To do so, > > I did a cvs checkout for both libdbi and libdbi-drivers (according to > > instructions on the site). I can see the

Re: [libdbi-users] libdbi transaction support

2013-01-24 Thread Markus Hoenicka
Zitat von Rainer Gerhards : > sorry for the long silence, we got sidetracked ourselfs. Finally, we > yesterday tried to write some test programs to get started. To do > so, I did a cvs checkout for both libdbi and libdbi-drivers > (according to instructions on the site). I can see the new

Re: [libdbi-users] libdbi transaction support

2012-12-08 Thread markus . hoenicka
markus.hoeni...@mhoenicka.de writes: > I've stolen some time from myself to provide a first shot at > transaction and savepoint support, see the current cvs revisions of > libdbi and libdbi-drivers. The code is entirely untested except that > the drivers which I use myself compile and don't cra

Re: [libdbi-users] libdbi transaction support

2012-12-02 Thread markus . hoenicka
Rainer Gerhards writes: > > This should be easy to retrofit. I'lls see if I find > > some time but feel free to beat me at it. > > I am quite busy myself at the moment, but I could try and see if I > could craft something along that path... > Hi all, I've stolen some time from myself to p

Re: [libdbi-users] libdbi transaction support

2012-11-20 Thread Toby Thain
On 20/11/12 11:50 AM, Markus Hoenicka wrote: > Mike Rylander was heard to say: > >> I think I'd add three calls to the proposed API, though, for support >> of savepoints. They're part of the SQL standard, and supported by >> several SQL RDBMS' including Postgres (the db my project uses, and we >>

Re: [libdbi-users] libdbi transaction support

2012-11-20 Thread Markus Hoenicka
Mike Rylander was heard to say: > I think I'd add three calls to the proposed API, though, for support > of savepoints. They're part of the SQL standard, and supported by > several SQL RDBMS' including Postgres (the db my project uses, and we > use libdbi to connect to PG). The relevant PG docu

Re: [libdbi-users] libdbi transaction support

2012-11-20 Thread Mike Rylander
On Tue, Nov 20, 2012 at 7:59 AM, Rainer Gerhards wrote: > On Tue, Nov 20, 2012 at 1:02 PM, Markus Hoenicka > wrote: >> In fact, we already have a (not well documented) infrastructure for things >> like this in place. Every driver keeps a list of boolean "capabilities" >> which is merely a key-val

Re: [libdbi-users] libdbi transaction support

2012-11-20 Thread Rainer Gerhards
On Tue, Nov 20, 2012 at 1:02 PM, Markus Hoenicka wrote: > In fact, we already have a (not well documented) infrastructure for things > like this in place. Every driver keeps a list of boolean "capabilities" > which is merely a key-value list of whatever we think is useful or > necessary. To date,

Re: [libdbi-users] libdbi transaction support

2012-11-20 Thread Markus Hoenicka
Rainer Gerhards was heard to say: > That's what I would expect. However, I think it would be useful to > have a call like "drvrTXSupport()" returning 1 if the driver supports > transaction and 0 otherwise. That way, an app could either fall back > to non-transcation mode OR tell the user that the

Re: [libdbi-users] libdbi transaction support

2012-11-20 Thread Rainer Gerhards
On Tue, Nov 20, 2012 at 11:51 AM, Markus Hoenicka wrote: > not exceptionally dumb, but rather touching a sensitive issue. I've > used simple wrappers in one of my applications that could easily be > moved into libdbi. I think a transaction interface has been missing > from libdbi because some data

Re: [libdbi-users] libdbi transaction support

2012-11-20 Thread Markus Hoenicka
Rainer Gerhards was heard to say: > Hi all, > > sorry if this is an exceptionally dumb question, but: does libdbi > support transactions (and, if so, via which functions)? I tried to > find the transaction support functions, but did not come up with > anything. Also a (granted, quick) look at the

[libdbi-users] libdbi transaction support

2012-11-20 Thread Rainer Gerhards
Hi all, sorry if this is an exceptionally dumb question, but: does libdbi support transactions (and, if so, via which functions)? I tried to find the transaction support functions, but did not come up with anything. Also a (granted, quick) look at the source did not tell me anything. Any help is