On Jan 22, 7:01 pm, Michael Bayer <mike...@zzzcomputing.com> wrote: > Assuming the above raises its error just fine as it does on my system, there > must be some unusual pattern in the way the error is being generated. I > don't know that there's anything on the SQLAlchemy side that can address > this kind of thing in a consistent way, usually the strategy is to narrow > down the series of DBAPI calls to a pure MySQL-python script that continues > to reproduce. Its tricky though.
I see... I did a few more tests, and it looks like the problem arises consistently when executing multiple statements having a syntax error in the second (or later) one.. Extending your example: from sqlalchemy import * e = create_engine('mysql://scott:tiger@localhost/test', echo=True) e.execute("select * from validtable; this is crap") This returns a ResultProxy, but on the NEXT execution (even if a correct one) SQLAlchemy logs a INFO sqlalchemy.engine.base.Engine.0x...4acL () Exception _mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'this is crap' at line 1") in <bound method Cursor.__del__ of <MySQLdb.cursors.Cursor object at 0xb743238c>> ignored Maybe I could persuade SA-migrate to execute one statement at a time... Thanks for your assistance :) -- 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.