Indexes In MySQL 5.7 and earlier, a server restart cancels the effect of the  AUTO_INCREMENT = N  table option, which may be used in a  CREATE TABLE  or  ALTER TABLE  statement to set an initial counter value or alter the existing counter value, respectively. In MySQL 8.0, a server restart does not cancel the effect of the AUTO_INCREMENT = N  table option. If you initialize the auto-increment counter to a specific value, or if you alter the auto-increment counter value to a larger value, the new value is persisted across server restarts. Note ALTER TABLE ... AUTO_INCREMENT = N  can only change the auto-increment counter value to a value larger than the current maximum. In MySQL 5.7 and earlier, a server restart immediately following a  ROLLBACK  operation could result in the reuse of auto-increment values that were previously allocated to the rolled-back transaction, effectively rolling back the current maximum auto-increment value. In MySQL 8.0, the current maximum auto- increment value is persisted, preventing the reuse of previously allocated values. If a  SHOW TABLE STATUS  statement examines a table before the auto-increment counter is initialized, InnoDB  opens the table and initializes the counter value using the current maximum auto-increment value that is stored in the data dictionary. The value is then stored in memory for use by later inserts or updates. Initialization of the counter value uses a normal exclusive-locking read on the table which lasts to the end of the transaction.  InnoDB  follows the same procedure when initializing the auto-increment counter for a newly created table that has a user-specified auto-increment value greater than 0. After the auto-increment counter is initialized, if you do not explicitly specify an auto-increment value when inserting a row,  InnoDB  implicitly increments the counter and assigns the new value to the column. If you insert a row that explicitly specifies an auto-increment column value, and the value is greater than the current maximum counter value, the counter is set to the specified value. InnoDB  uses the in-memory auto-increment counter as long as the server runs. When the server is stopped and restarted,  InnoDB  reinitializes the auto-increment counter, as described earlier. The  auto_increment_offset  variable determines the starting point for the  AUTO_INCREMENT  column value. The default setting is 1. The  auto_increment_increment  variable controls the interval between successive column values. The default setting is 1. Notes When an  AUTO_INCREMENT  integer column runs out of values, a subsequent  INSERT  operation returns a duplicate-key error. This is general MySQL behavior. 15.6.2 Indexes 15.6.2.1 Clustered and Secondary Indexes This section covers topics related to  InnoDB  indexes. Each  InnoDB  table has a special index called the clustered index that stores row data. Typically, the clustered index is synonymous with the primary key. To get the best performance from queries, inserts, and other database operations, it is important to understand how  InnoDB  uses the clustered index to optimize the common lookup and DML operations. •When you define a  PRIMARY KEY  on a table,  InnoDB  uses it as the clustered index. A primary key should be defined for each table. If there is no logical unique and non-null column or set of columns to 3041