[Zope] MySQL transaction support (was: MySQL Select Statements)
Ron Bickers
rbickers@logicetc.com
Fri, 30 Jun 2000 13:54:29 -0400
> -----Original Message-----
> From: Andy Dustman [mailto:adustman@comstar.net]
> Sent: Friday, June 30, 2000 1:25 PM
> To: Ron Bickers
> Cc: Michael Blewett; zope@zope.org; andy-python@dustman.net
> Subject: RE: [Zope] MySQL Select Statements
> That's the problem: They don't get control over when BEGIN/COMMIT/ROLLBACK
> are used. Zope does that if you are using the Transaction Manager. And the
> only way to control use of the Transaction Manager is by
> selection of DA.
>
> That's why I think it may be necessary to have two ZMySQLDAs: One which is
> transactional and one which is not. However, they can both be part of the
> same distribution, and the transactional one can simply subclass the
> non-transactional one (mixing in the TM base and adding the required
> methods), so there is not a lot of code duplication.
I see. So how would this affect use of transaction and non-transaction
supporting tables? Would two separate database connections be required
where the SQLMethod must use the correct connection depending on transaction
support?
Making assumptions is bad, but suppose MySQL 3.23 does something elegant
with BEGIN/COMMIT/ROLLBACK attempts on non-transaction supporting tables
(like return a "table does not support transactions" or simply ignores that
statement). Could we then just have one DA for 3.22 and another for 3.23,
where the 3.23 DA handles transactions, but silently ignores them when
dealing with non-transaction tables?
_______________________
Ron Bickers
Logic Etc, Inc.
rbickers@logicetc.com