On Jun 15, 2011, at 6:05 AM, Chris Withers wrote: > Hi All, > > I tried to execute a lump of sql with: > > session.execute(sql) > > The lump contains multiple statements, comments and ddl. > Which of those should I have not been doing? > (and what is the best way to execute a lump of sql statements?) > > Anyway, the outcome was no error but nothing happening either. > The session is part of a TPC transaction. > > When I turned echo on, I saw: > > 2011-06-15 10:57:26,680 WARNING sqlalchemy.pool.QueuePool.0x...b1ac Error > closing cursor: (1399, 'XAER_RMFAIL: The command cannot be executed when > global transaction is in the ACTIVE state') > > Okay, that makes sense, but why only a warning which is practically invisible > rather than an exception?
That's the _CursorFairy, which was making some old assumptions that if the cursor close is failing, we're probably already inside of an exception throw and are cleaning up, so its unusual if the first throw originated there for you. The wrapper was removed in 0.7. Time to upgrade ! -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@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.