直播回放好像只在微信视频号搜到
里面有个问题,在 mysql 执行下列 sql
mysql> create table test1 (id int primary key,name char);
Query OK, 0 rows affected (0.06 sec)
mysql> begin;
Query OK, 0 rows affected (0.00 sec)
mysql> insert into test1(id,name)VALUES(1,"l");
Query OK, 1 row affected (0.00 sec)
mysql> insert into test1(id,name)VALUES(1,"2");
ERROR 1062 (23000): Duplicate entry '1' for key 'test1.PRIMARY'
mysql> commit;
Query OK, 0 rows affected (0.01 sec)
mysql> select * from test1;
+----+------+
| id | name |
+----+------+
| 1 | l |
+----+------+
1 row in set (0.00 sec)
执行 commit 后,第一条 sql 是会执行,执行 rollback 后才会都取消执行