事务具有ACID特性,锁只是实现这些特性的必须机制。
mysql> SELECT @@tx_isolation;
+----------------+
| @@tx_isolation |
+----------------+
| SERIALIZABLE |
+----------------+
1 row in set (0.00 sec)
mysql> BEGIN ;
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT @temp:=tag FROM orders WHERE id = 1;
+------------+
| @temp:=tag |
+