This occurs when a rollback segment assigned to a transaction runs out of undo slots. In such cases, try rerunning the transaction. 

When transactions perform operations on temporary tables, the number of concurrent read-write transactions that InnoDB  is capable of supporting is constrained by the number of rollback segments allocated to the global temporary tablespace, which is 128 by default. 

•If each transaction performs either an INSERT or  an UPDATE  or DELETE  operation, the number of concurrent read-write transactions that InnoDB  is capable of supporting is: 

(innodb_page_size / 16) * innodb_rollback_segments * number of undo tablespaces 

•If each transaction performs an INSERT and  an UPDATE  or DELETE  operation, the number of concurrent read-write transactions that InnoDB  is capable of supporting is: 

(innodb_page_size / 16 / 2) * innodb_rollback_segments * number of undo tablespaces 

•If each transaction performs an INSERT  operation on a temporary table, the number of concurrent read- write transactions that InnoDB  is capable of supporting is: 

(innodb_page_size / 16) * innodb_rollback_segments 

•If each transaction performs an INSERT and  an UPDATE  or DELETE  operation on a temporary table, the number of concurrent read-write transactions that InnoDB  is capable of supporting is: 

## 15.7 InnoDB Locking and Transaction Model 

(innodb_page_size / 16 / 2) * innodb_rollback_segments 

To implement a large-scale, busy, or highly reliable database application, to port substantial code from a different database system, or to tune MySQL performance, it is important to understand InnoDB  locking and the InnoDB  transaction model. 

This section discusses several topics related to InnoDB  locking and the InnoDB  transaction model with which you should be familiar. 

•Section 15.7.1, “InnoDB Locking”  describes lock types used by InnoDB . 

•Section 15.7.2, “InnoDB Transaction Model”  describes transaction isolation levels and the locking strategies used by each. It also discusses the use of autocommit , consistent non-locking reads, and locking reads. 

•Section 15.7.3, “Locks Set by Different SQL Statements in InnoDB”  discusses specific types of locks set in InnoDB  for various statements. 

•Section 15.7.4, “Phantom Rows”  describes how InnoDB  uses next-key locking to avoid phantom rows. 

•Section 15.7.5, “Deadlocks in InnoDB”  provides a deadlock example, discusses deadlock detection, and provides tips for minimizing and handling deadlocks in InnoDB . 

## 15.7.1 InnoDB Locking 

This section describes lock types used by InnoDB . 

•Shared and Exclusive Locks 

•Intention Locks 

