On Aug 14, 2010, at 12:04 PM, Peter Hansen wrote:

> On Aug 14, 11:07 am, Michael Bayer <mike...@zzzcomputing.com> wrote:
>> In addition, isolation_level=None with pysqlite disables the DBAPIs
>> entire transactional system.  SQLAlchemy relies upon this system to
>> handle proper transactional behavior.
>> 
>> So I consider this a pysqlite bug, and they should offer a mode
>> by which there is no implicit commit for CREATE TABLE.
> 
> Michael, I don't doubt that you're right, but the puzzling thing (for
> me and, I think, Torsen) is that (if you set echo='debug') you see a
> BEGIN and ROLLBACK statement apparently being issued through the DBAPI
> layer,

The "BEGIN" is just a logging message emitted by SQLAlchemy.  We don't ever 
send that string, and DBAPI has no begin() - this is a critical aspect of DBAPI 
that confuses everyone - it doesn't support ad-hoc transaction creation.  There 
always a "transaction" going on as far as DBAPI is concerned, its just that the 
"transaction" might not matter if the connection has disabled transactions.

"ROLLBACK" is a message we emit when we call connection.rollback().

> and if there's an implicit COMMIT going on we don't actually
> see

according to sqlite3's docs, there is, we of course can't see it unless you got 
sqlite3 to log its interactions.

> it and don't understand why isolation_level=None isn't preventing
> it as it apparently does in the other case (test02).

test02 would appear to succeed because you are manipulating the transaction 
directly by emitting 'begin'.




-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to