Delayed-Insert Thread States
These thread states are associated with processing for DELAYED inserts (see , "INSERT DELAYED Syntax"). Some states are associated with connection threads that process INSERT DELAYED statements from clients. Other states are associated with delayed-insert handler threads that insert the rows. There is a delayed-insert handler thread for each table for which INSERT DELAYED statements are issued.
States associated with a connection thread that processes an INSERT DELAYED statement from the client:
allocating local tableThe thread is preparing to feed rows to the delayed-insert handler thread.
Creating delayed handlerThe thread is creating a handler for
DELAYEDinserts.got handler lockThis occurs before the
allocating local tablestate and after thewaiting for handler lockstate, when the connection thread gets access to the delayed-insert handler thread.got old tableThis occurs after the
waiting for handler openstate. The delayed-insert handler thread has signaled that it has ended its initialization phase, which includes opening the table for delayed inserts.storing row into queueThe thread is adding a new row to the list of rows that the delayed-insert handler thread must insert.
updateThe thread is getting ready to start updating the table.
waiting for delay_listThis occurs during the initialization phase when the thread is trying to find the delayed-insert handler thread for the table, and before attempting to gain access to the list of delayed-insert threads.
waiting for handler insertAn
INSERT DELAYEDhandler has processed all pending inserts and is waiting for new ones.waiting for handler lockThis occurs before the
allocating local tablestate when the connection thread waits for access to the delayed-insert handler thread.waiting for handler openThis occurs after the
Creating delayed handlerstate and before thegot old tablestate. The delayed-insert handler thread has just been started, and the connection thread is waiting for it to initialize.
States associated with a delayed-insert handler thread that inserts the rows:
insertThe state that occurs just before inserting rows into the table.
rescheduleAfter inserting a number of rows, the delayed-insert thread sleeps to let other threads do work.
upgrading lockA delayed-insert handler is trying to get a lock for the table to insert rows.
Waiting for INSERTA delayed-insert handler is waiting for a connection thread to add rows to the queue (see
storing row into queue).