MySQLdb: commit before cursor close, or after?

John Nagle nagle at
Mon Feb 4 19:14:13 CET 2008

   I'm getting some wierd commit-related behavior from MySQLdb.  I'm
using InnoDB, so transactions really matter.

I'm currently doing

	cursor = db.cursor()					

Is that the correct order, or should I call "db.commit()" before 
"cursor.close()"?  Does anyone know for sure?  The MySQLdb documentation
("") doesn't
say.  There are some discussions of this in blogs, but nobody
really seems to know.

					John Nagle						

More information about the Python-list mailing list