Re: [SQLObject] MySQL and transactions
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2003-07-18 02:46:51
|
On Thu, 2003-07-17 at 21:29, John A. Barbuto wrote: > Hi, > > I noticed something strange when looking at the MySQL query log: after > every query by SQLObject, a COMMIT was being issued. I tracked it down > to the _runWithConnection method in the DBAPI class, which calls > conn.commit() in line 3. I'm baffled as to why this is necessary. I'm > not sure about Postgres, but in MySQL a COMMIT is ignored unless you're > using InnoDB and AUTOCOMMIT=0. Any clues? Huh... I feel like I must have had some reason for that, but I don't know what that might be. > Speaking of InnoDB, it's becoming more and more popular, so shouldn't > MySQL transactions be supported in SQLObject? It won't break things > with non-InnoDB tables, it'll just be silently ignored. Would a patch > for this be accepted? Is there anything currently keeping you from using transactions in this situation? It's not tested, but so long as MySQLdb supports it, I don't see any reason SQLObject shouldn't already. Ian |