zoukankan      html  css  js  c++  java
  • ENGINE=MyISAM 不支持事务无法回滚

    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  不支持事务无法回滚
    

  • 相关阅读:
    Pikachu-File Inclusion模块
    Pikachu-RCE模块
    Pikachu-CSRF模块
    Pikachu-暴力破解模块
    Pikachu-XSS模块与3个案例演示
    将Word文档发布至博客园随笔
    DVWA-全等级XSS(反射型、存储型)
    DVWA-sql注入(盲注)
    DVWA-全等级验证码Insecure CAPTCHA
    管理页面的 setTimeout & setInterval
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13351754.html
Copyright © 2011-2022 走看看