GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Reported on Launchpad by by Brian J Ewing on 2010-11-08.
db.query("INSERT INTO table1 (field1, field2) VALUES ('value', 'value');" +
" UPDATE table2 SET foo='bar'")
This works fine, however a _mysql_exceptions.ProgrammingError is raised:
"Commands out of sync; you can't run this command now")
in <bound method Cursor.__del__ of <MySQLdb.cursors.Cursor object at 0x>>
db.query tries to return the result from the last query without first freeing the result of the first, and MySQLdb raises this exception
Why would you do this?