mysql> show variables like "autocommit";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| autocommit | ON |
+---------------+-------+
1 row in set (0.00 sec)
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| autocommit | ON |
+---------------+-------+
1 row in set (0.00 sec)
mysql>
设置完之后看看该值
你要开启一个事务,直接发送begin 。。。。commit就可以,何必要去动用这个参数。
mysql的后面版本一直不提倡修改这个参数。
postgresql甚至取消了这个参数,因为它认为事务控制应该由客户端来决定