ENGINE=MyISAM 不支持事务无法回滚
2015-04-27 12:58
295 查看
mysql> show create table t6; +-------+----------------------------------------------------------------------------------------+ | Table | Create Table | +-------+----------------------------------------------------------------------------------------+ | t6 | CREATE TABLE `t6` ( `id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 | +-------+----------------------------------------------------------------------------------------+ 1 row in set (0.03 sec) mysql> update t6 set id=2 where id=1; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select * from t6; +------+ | id | +------+ | 2 | +------+ 1 row in set (0.00 sec) mysql> rollback; Query OK, 0 rows affected (0.00 sec) mysql> select * from t6; +------+ | id | +------+ | 1 | +------+ 1 row in set (0.00 sec) --------------------------------------------------------------------------------------------------- mysql> create table t5(id int) ENGINE=MyISAM ; Query OK, 0 rows affected (0.13 sec) mysql> desc t5 -> ; +-------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+-----+---------+-------+ | id | int(11) | YES | | NULL | | +-------+---------+------+-----+---------+-------+ 1 row in set (0.03 sec) mysql> show create table t5; +-------+----------------------------------------------------------------------------------------+ | Table | Create Table | +-------+----------------------------------------------------------------------------------------+ | t5 | CREATE TABLE `t5` ( `id` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | +-------+----------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> insert into t5 values(1); Query OK, 1 row affected (0.02 sec) mysql> commit; Query OK, 0 rows affected (0.00 sec) mysql> select * from t5; +------+ | id | +------+ | 1 | +------+ 1 row in set (0.02 sec) mysql> update t5 set id=2 where id=1; Query OK, 1 row affected (0.05 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> rollback; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> select * from t5; +------+ | id | +------+ | 2 | +------+ 1 row in set (0.00 sec) ENGINE=MyISAM 不支持事务无法回滚
相关文章推荐
- autocommit对myisam和innodb引擎的影响,myisam不支持事务,默认引擎
- Redis事务为什么不支持回滚
- mysql表类型MyISAM和InnoDB区别(mysql 不支持事务解决)
- 自调用导致事务无法回滚
- 用spring测试框架测试Mysql数据库时事务无法回滚
- Spring MVC @Transactional注解方式事务无法回滚的解决办法
- 使用spring声明式事务,spring使用AOP来支持声明式事务,会根据事务属性,自动在方法调用之前决定是否开启一个事务,并在方法执行之后决定事务提交或回滚事务。
- 异常捕获不抛出,Spring事务无法回滚
- 异常捕获不抛出,Spring事务无法回滚
- [spring,mysql] spring使用注解式事务声明(@Transactional)无法回滚 .
- 关于Spring的@Transactional注解失效以及事务无法回滚问题
- Spring3声明式事务处理事务无法回滚rollback分析(annotation与xml配置混用)
- mysql的myisam存储类型不支持事务
- 第三章(附)mysql表类型MyISAM和InnoDB区别(决定了是否支持事务)
- 异常捕获不抛出,Spring事务无法回滚
- MySQL表类型MyISAM/InnoDB的区别(解决事务不回滚的问题)(转)
- 如何让普通变量也支持事务回滚?
- [spring,mysql] spring使用注解式事务声明(@Transactional)无法回滚
- mysql表类型MyISAM和InnoDB区别(mysql 不支持事务解决)
- spring3MVC 事务无法回滚问题