MySQL INNODB Data Sheet Automatic Submission Summary

Source: Internet
Author: User

Official Document Description :

Http://dev.mysql.com/doc/refman/5.5/en/commit.html

1.autocommit only available for InnoDb Data Sheet ;

2. the default is automatic submission , can be queried by the statement : SELECT @ @autocommit;

3.SET autocommit Disable or enable the default current session auto-commit mode ( Note : Only the current session is in effect );

4. Syntax : SET autocommit = {0 | 1} 0 disable autocommit for the current session , 1 enable auto-commit for the current session

5. can be modified by starting the service plus the command mode , see : http://dev.mysql.com/doc/ Refman/5.5/en/server-system-variables.html

Sample Code :

SELECT @ @autocommit; SET autocommit = 0;insert into T_patient (id,name) VALUES (1, ' 31 '); COMMIT; SELECT @ @autocommit; INSERT into T_patient (id,name) VALUES (2, ' 32 ');--rollback operation rollback;--Only one record select Id,name from T_ patient;--the current session to be committed, or the current session of the table t_patient will be locked commit;


This article is from my Tech blog blog, so be sure to keep this source http://programmer.blog.51cto.com/2859493/1880303

MySQL INNODB Data Sheet Automatic Submission Summary

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.