解决 "Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"


"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."


To solve this issue, set binlog_format as mixed:


FLUSH TABLES WITH READ LOCK;

FLUSH LOGS;

SET GLOBAL binlog_format = 'MIXED';

FLUSH LOGS;

UNLOCK TABLES;

奇怪的是,本地直接执行的代码没有这个问题, 放到django-celery中去就报这个错误

优质内容筛选与推荐>>
1、正则表达式
2、用Zend Encoder加密PHP文件和PHP 优化配置
3、素数筛选法
4、iOS中使用block进行网络请求回调
5、AHOI2009 中国象棋


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号