Mysql advanced transactions

Source: Internet
Author: User

Mysql advanced transactions

Generally speaking, a transaction refers to a group of operations, either successfully executed or not executed. ----> atomicity

Before all operations are completed, other sessions cannot see the process of intermediate changes-> isolation

Before and after a transaction occurs, the total amount of data still matches -----> consistency

Transaction impact cannot be undone ------> persistence

If an error occurs, the transaction cannot be undone and can only be undone through "compensatory transactions"

Transfer

Li San: ---> spending 500, Li San-500

Zhao 4: ----> received 500, Zhao 4 + 500

About the transaction engine:

Select innodb/bdb

Start transaction: start transaction;

SQL ....

SQL ....

Submit

Rollback

Note: when a transaction commit or rollback ends

Note: Some statements may cause implicit transaction commit, such as start transaction.

A specific example of a transaction:

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.