[Zope] MySQL transaction support (was: MySQL Select Statements)

Monty Taylor mtaylor@goldridge.net
Mon, 03 Jul 2000 10:37:01 GMT


Why not have one ZmySQLDA that attempts to determine whether it is 
transactional or not when the connect method is executed. That way you 
could have a DA connect to your 3.22 database, upgrade your database to 
>3.23.15 and not see any problems. A combination of try-except:ing an 
attempted "begin rollback" block and a test for database type should do 
the trick, no? If it's 3.22 or earlier, the begin-rollback should throw 
the synax error Andy mentioned. If that's ok, a test for database type 
(not sure about this one) to see if it's BDB? If all of this is wrapped 
in the connect method, we should be able to make it 'do the right thing' 

Thoughts?

Monty


> > with BDB tables. But it may be possible to break things down as having a
> > DA for 3.22 and one for 3.23. Which is, in practice, may not be any
> > different than having one that is not transactional (3.22 never is) and
> > one that is transactional (3.23 sometimes is).

> What I want to avoid is having to create two different "MySQL database
> connections" where I have to choose the "correct" one based on whether or
> not my SQL method is using transactions or not.  I'll most likely only be
> using one version of MySQL at a time, but if I'm using transactions at 
all,
> there's a good chance not all of my tables will support them.

> I guess we'll just have to do some testing.
> _______________________

> Ron Bickers
> Logic Etc, Inc.
> rbickers@logicetc.com


> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )