[mysql] Some non-transactional changed tables couldn't be rolled back
使用peewee的事务时,碰到一个郁闷的问题,事务似乎无效!
于是简化了下模型,写了简单的测试代码,发现问题,如题所示。
找到解答:
https://github.com/etianen/django-reversion/issues/362
https://dev.mysql.com/doc/refman/5.0/en/nontransactional-tables.html
原因就是数据库表的引擎需要设置为InnoDB才能支持事物,解决方法如下:
http://dev.mysql.com/doc/refman/5.6/en/converting-tables-to-innodb.html
即,将需要支持事物的表的引擎设置为InnoDB,sql如下:
alter table my_table engine=InnoDB;
[mysql] Some non-transactional changed tables couldn't be rolled back的更多相关文章
- mysql explain中的 “Select tables optimized away”
mysql explain中的 “Select tables optimized away” http://blog.chinaunix.net/uid-10449864-id-2956845.htm ...
- MySQL 8.0: From SQL Tables to JSON Documents (and back again)
MySQL 8.0: From SQL Tables to JSON Documents (and back again) | MySQL Server Bloghttps://mysqlserver ...
- MySQL大量线程处于Opening tables的问题分析
[作者] 王栋:携程技术保障中心数据库专家,对数据库疑难问题的排查和数据库自动化智能化运维工具的开发有强烈的兴趣. [问题描述] 最近有一台MySQL5.6.21的服务器,在应用发布后,并发线程Thr ...
- 【mysql元数据库】使用information_schema.tables查询数据库和数据表信息
概述 对于mysql和Infobright等数据库,information_schema数据库中的表都是只读的,不能进行更新.删除和插入等操作,也不能加触发器,因为它们实际只是一个视图,不是基本表,没 ...
- (转)【mysql元数据库】使用information_schema.tables查询数据库和数据表信息 ---数据记录大小统计
转:https://www.cnblogs.com/ssslinppp/p/6178636.html https://segmentfault.com/q/1010000007268994?_ea=1 ...
- MySQL 清理缓存—flush tablesFlush tables的影响
摘自:http://blog.chinaunix.net/uid-31401119-id-5781305.html 1 Flush tables简介 官方手册中关于Flush tables的介绍, ...
- mysql常见的错误码
Mysql错误代码 Mysql错误代码分为两部分,老版本一部分,4.1版本为新的部分 第一部分: mysql的出错代码表,根据mysql的头文件mysql/include/mysqld_error.h ...
- mysql: Error Codes and Messages
Appendix B. Error Codes and MessagesTable of Contents B.1. Server Error Codes and MessagesB.2. Clien ...
- MYSQL之错误代码----mysql错误代码与JAVA实现
原文地址:MYSQL之错误代码----mysql错误代码与JAVA实现作者:戒定慧 his chapter lists the errors that may appear when you call ...
随机推荐
- cobbler自动安装脚本
#!/bin/sh #coding=utf8 ################################################################## #将如下IP修改成你 ...
- 通过Unity3D制作天空盒
1. 将全景图片转换为6面的立方体 最初的原始图片 通过PTGui 软件将图片分解为6个部分 2. 通过Unity进行操作 创建3D项目工程 将之前的6张图片导入到Assets中 创建一个Metria ...
- Android签名总结
signapk.jar与eclipse export插件默认赋予程序一个DEBUG权限的签名 signapk.jar包含有系统权限(system api, permission),而eclipse e ...
- IE禁用Cookie后的session处理
IE禁用Cookie后解决方案:URL重写 购物车案例<IE禁用Cookie后> 购物界面ShowBook.servlet public void doGet(HttpServletReq ...
- windows下php连接sqlserver2008
如果你需要和sql server通信需要到http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx自行下载微软提供的The SQL Server ...
- HDInsight 指定输出目录 insert overwrite
基本语法 insert overwrite local directory '/example/demo/' select * from table; 可以格式化输出 insert overwrite ...
- onscroll事件的浏览器支持
window和普通div对象的scroll事件,被全部浏览器支持,其他元素的scroll事件,仅部分浏览器支持,如下图 出处: http://w3help.org/zh-cn/causes/SD901 ...
- Win7电脑无法启用无线连接或无线连不上网
1. 上不去网,看是否是无线网卡禁止. 2. 打开控制面板--网络和Internet--查看网络状态和任务--更改网络适配器 3. 4.若启用后无线网络连接仍为灰色,继续往下看 5.点击开始,找到运行 ...
- PHP中spl_autoload_register()函数
spl_autoload_register — 注册给定的函数作为 __autoload 的实现 官方地址:http://php.net/manual/zh/function.spl-autoload ...
- Linux启动管理:grub
1.grub中分区表示 Linux 中 /dev/sda1 在grub中为 hd0,0 代表第一个硬盘的第一个分区 Linux中 /dev/sdb3是扩展分区 在grub中为 ...