尝试从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
我试着在网上阅读,但没能找到合适的解决方法。有什么帮助吗?
发现了问题并解决了它。这是因为并非所有表都是在同一个引擎下创建的(因为mysql 5.5,新表在"InnoDB"下,而因为mysql 5.0,旧表在"MyISAM"下)。
以下是详细说明-http://generics7.blogspot.com/2012/08/unsafe-statement-written-to-binary-log.html
在同一个引擎下创建所有表后,它工作得很好!