Hello
I'm running the simple script below:
import MySQLdb db = MySQLdb.connect(user="foo", passwd="pass", db="test") cur.execute('insert into foo set bar=10')
This works fine on 1.1.0, but with 1.16 I need to add
db.commit()
Else, it won't execute the insert command. Is this behaviour change expected?
I'm using python-2.3.4 and MySQL 4.0.20.
Thanks in advance, Andre
Yes, autocommit is now turned off by default, as specified by the DB API standard (PEP-249). You can turn this back on with:
db.autocommit(True)
Log in to post a comment.
Hello
I'm running the simple script below:
import MySQLdb
db = MySQLdb.connect(user="foo", passwd="pass", db="test")
cur.execute('insert into foo set bar=10')
This works fine on 1.1.0, but with 1.16 I need to add
db.commit()
Else, it won't execute the insert command. Is this behaviour change expected?
I'm using python-2.3.4 and MySQL 4.0.20.
Thanks in advance,
Andre
Yes, autocommit is now turned off by default, as specified by the DB API standard (PEP-249). You can turn this back on with:
db.autocommit(True)