尝试从django管理界面插入值时出现以下错误 -
Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
Request Method: POST
Request URL: *<My URL>*
Django Version: 1.3.1
Exception Type: Warning
Exception Value:
Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
Exception Location: /Library/<Application>/2.7/site-packages/MySQLdb/cursors.py in _warning_check, line 92
Python Executable: /usr/bin/python
Python Version: 2.7.1
我尝试在网上阅读,但无法正确解决问题。有什么帮助吗?
答案 0 :(得分:3)
找出问题并解决它。这是因为并非所有的表都是在同一个引擎下创建的(因为mysql 5.0,因为mysql 5.5和旧表在'MyISAM'下,所以新表在'InnoDB'下)。
以下是详细说明 - http://generics7.blogspot.com/2012/08/unsafe-statement-written-to-binary-log.html
在同一个引擎下创建所有表后,它运行正常!