zoukankan      html  css  js  c++  java
  • RR 插入不影响

    | test100 | CREATE TABLE `test100` (
      `sn` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增编号',
      `phoneNo` int(11) DEFAULT NULL,
      `channelType` int(11) DEFAULT NULL COMMENT '通道识别',
      `status` tinyint(4) NOT NULL COMMENT '短信转态,1.发送成功,2.发送失败,3.发送异常',
      PRIMARY KEY (`sn`),
      KEY `test100_idx1` (`phoneNo`)
    ) ENGINE=InnoDB AUTO_INCREMENT=5028 DEFAULT CHARSET=utf8 COMMENT='短信发送成功记录表'                                  |
    +---------
    
    +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    -----------------------------------------+
    1 row in set (0.02 sec)
    
    
    mysql> select * from test100 limit 20;
    +----+---------+-------------+--------+
    | sn | phoneNo | channelType | status |
    +----+---------+-------------+--------+
    |  1 |       1 |           2 |      1 |
    |  2 |       2 |           2 |      1 |
    |  3 |       3 |           2 |      1 |
    |  4 |       4 |           2 |      1 |
    |  5 |       5 |           2 |      1 |
    |  6 |       6 |           2 |      1 |
    |  7 |       7 |           2 |      1 |
    |  8 |       8 |           2 |      1 |
    |  9 |       9 |           2 |      1 |
    | 10 |      10 |           2 |      1 |
    | 11 |      11 |           2 |      1 |
    | 16 |      16 |           2 |      1 |
    | 17 |      17 |           2 |      1 |
    | 18 |      18 |           2 |      1 |
    | 19 |      19 |           2 |      1 |
    | 20 |      20 |           2 |      1 |
    | 21 |      21 |           2 |      1 |
    | 22 |      22 |           2 |      1 |
    | 23 |      23 |           2 |      1 |
    | 24 |      24 |           2 |      1 |
    +----+---------+-------------+--------+
    20 rows in set (0.00 sec)
    
    
    
    
    Session 1:
    
    
    mysql> select * from test100 limit 20;
    +----+---------+-------------+--------+
    | sn | phoneNo | channelType | status |
    +----+---------+-------------+--------+
    |  1 |       1 |           2 |      1 |
    |  2 |       2 |           2 |      1 |
    |  3 |       3 |           2 |      1 |
    |  4 |       4 |           2 |      1 |
    |  5 |       5 |           2 |      1 |
    |  6 |       6 |           2 |      1 |
    |  7 |       7 |           2 |      1 |
    |  8 |       8 |           2 |      1 |
    |  9 |       9 |           2 |      1 |
    | 10 |      10 |           2 |      1 |
    | 11 |      11 |           2 |      1 |
    | 16 |      16 |           2 |      1 |
    | 17 |      17 |           2 |      1 |
    | 18 |      18 |           2 |      1 |
    | 19 |      19 |           2 |      1 |
    | 20 |      20 |           2 |      1 |
    | 21 |      21 |           2 |      1 |
    | 22 |      22 |           2 |      1 |
    | 23 |      23 |           2 |      1 |
    | 24 |      24 |           2 |      1 |
    +----+---------+-------------+--------+
    20 rows in set (0.00 sec)
    
    mysql> SELECT @@tx_isolation;
    +-----------------+
    | @@tx_isolation  |
    +-----------------+
    | REPEATABLE-READ |
    +-----------------+
    1 row in set (0.01 sec)
    
    mysql> start transaction;
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> insert into test100(phoneNo,channelType,status) values(15,1,1);
    Query OK, 1 row affected (0.05 sec)
    
    
    
    Session 2:
    mysql> use zjzc;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    mysql>  insert into test100(phoneNo,channelType,status) values(15,1,1);
    Query OK, 1 row affected (0.01 sec)
    
    mysql>  insert into test100(phoneNo,channelType,status) values(14,1,1);
    Query OK, 1 row affected (0.01 sec)
    
    mysql>  insert into test100(phoneNo,channelType,status) values(16,1,1);
    Query OK, 1 row affected (0.00 sec)

  • 相关阅读:
    神器Tampermonkey的安装使用
    记一些不错的知识博客
    redis入门到精通系列(九):redis哨兵模式详解
    redis入门到精通系列(八):redis的高可用--主从复制详解
    redis入门到精通系列(七):redis高级数据类型详解(BitMaps,HyperLogLog,GEO)
    redis入门到精通系列(六):redis的事务详解
    redis入门到精通系列(五):redis的持久化操作(RDB、AOF)
    redis入门到精通系列(四):Jedis--使用java操作redis详解
    jsp乱码
    Tomcat 9遇到错误开着怎么关闭
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350117.html
Copyright © 2011-2022 走看看