十、mysql事务的简介_MySQL
Release: 2016-05-31 08:46:55
Original
1532 people have browsed it
1. myisam跟memory支持表级别锁定 BDB 页级锁定 Innodb 行级锁定 2.表锁(不是表嫂哈) lock table read //只读表锁,也就是说执行了这个锁后,锁内的操作只能为读操作 select * from ..... unlock tables; lock table write //读写表锁,可读可写 insert ... update ... select ... delete ... unlock tables; PS::表被锁定后,其他连接的操作将被挂起,直到锁定的连接解锁,如果TM要是一直不解锁,就完蛋了!!!3.事务 begin || start transaction rollback 回滚 || commit 提交事务 PS::如果你正在执行一个mysiam的表锁操作,但你在表锁期间进行了事务的开启,那么这个锁将被执行unlock,这点需要注意
Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31