Home > Database > Mysql Tutorial > mysql事务用begin……commit好还是用set autocommit……commit好

mysql事务用begin……commit好还是用set autocommit……commit好

WBOY
Release: 2016-06-06 09:32:45
Original
2435 people have browsed it

mysql事务数据库

我觉得第一种好,因为即使commit失败或者异常了,会自己超时释放锁住的表。第二种就悲剧了,commit失败,事务不会超时,表会一直被锁住。我理解的对吗

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template