MySQL :: MySQL 5.0 Reference Manual :: 13.2.8 The InnoDB ...
By default, MySQL starts the session for each new connection with autocommit ...dev.mysql.com/.../innodb-transaction-model.html
The connection object commit() method commits any outstanding changes in the current transaction to make them permanent in the database. In DB-API, connections begin with autocommit mode disabled, so you must call commit() before disconnecting or changes may be lost.
Python DB API默认情况下禁用自动提交
从谷歌粘贴(第一页,第二个结果)
但是
显然Python以非自动提交模式启动MySQL,请参见:
http://www.kitebird.com/articles/pydbapi.html
文章内容:
笨蛋,不知道该怎么克服,我不想让你猜错了。 我建议提出一个新问题,题目是:
如何在MySQL python DB-API中启用自动提交模式?在
祝你好运。在
InnoDB是事务性的。你需要打电话连接.提交()插入/删除/更新后。在
编辑:你可以打电话连接.自动提交(True)打开自动提交。在
相关问题 更多 >
编程相关推荐