3

尝试从 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

我尝试在网上阅读,但无法正确解决该问题。有什么帮助吗?

4

1 回答 1

3

想通了问题并解决了。这是因为并非所有表都是在同一个引擎下创建的(由于 mysql 5.5,新表在“InnoDB”下,而由于 mysql 5.0,旧表在“MyISAM”下)。

这是详细说明 - http://generics7.blogspot.com/2012/08/unsafe-statement-written-to-binary-log.html

在同一引擎下创建所有表后,它工作正常!

于 2012-08-30T13:23:23.883 回答