First, the concept of row lock and characteristics
1. Concept: Lock a single row of records, mainly applied to the InnoDB table storage engine
2. Features: in InnoDB storage engine application is more, support transactions, high overhead, locking slow; there will be a deadlock, the size of the lock is small, in the case of concurrency, the probability of the lock waiting is relatively low, so support
A higher number of concurrency.
Second, database services
1. Concept: A transaction is a unit of work that consists of a series of operations that are indivisible, that is, either all are executed, or none are executed.
2. Characteristics: ACID
Atomicity: Transactions are the smallest unit of work, indivisible
Consistency: The data before and after the transaction is guaranteed to be correct and data integrity is not compromised.
Isolation: There is no impact on other transactions when concurrent transactions are executed.
Persistence: Persistent to disk
MySQL lock mechanism--row lock