On Mar 27, 2014, at 5:51 PM, Dustin Oprea <myselfasun...@gmail.com> wrote:
> > Direct example: > > def direct_test(): > import MySQLdb > conn = MySQLdb.connect(host='db.host.com', user='abc', passwd="def", > db="ghi", port=3307) > > conn.autocommit(True) > > c = conn.cursor() > c.execute(query) > > print(c.fetchone()) > > Result: > > (1L,) > > One thing I don't understand is, does your *actual* stored procedure need to call "SELECT @@AUTOCOMMIT"? because that may be part of the problem. Above, SQLAlchemy has no direct support for "conn.autocommit()", which is not part of the DBAPI - you can enable this if you want using an event, but it would be better if commit() just worked as expected. I would try removing the "conn.autocommit()" part and just try calling conn.commit(). That would reveal whatever bugs are in play, and I'd look to see if a DBAPI like mysql-connector-python, which is now the official MySQL DBAPI, has the same problem. if you really have to turn on this non-standard feature on, it needs to be across the board for that particular engine, and would be like this: from sqlalchemy import event @event.listens_for(engine, "connect") def conn(conn, rec): conn.autocommit(True) -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.