更新时间:2023-02-08 17:39:01
我不确定,但我猜你正在使用 INNODB 表,而且你还没有完成提交.我相信 MySQLdb 会自动启用事务.
I am not certain, but I am going to guess you are using a INNODB table, and you haven't done a commit. I believe MySQLdb enable transactions automatically.
在调用 close
之前调用 conn.commit()
.
Call conn.commit()
before calling close
.
来自常见问题解答:从 1.2.0 开始,MySQLdb 默认禁用自动提交