What is "Init for Update" thread state in mariadb? Our production server gets stuck on Init for update state whenever we start a query like 

update 
    &lt;some_big_table&gt; 
set 
    &lt;primary_key&gt; = &lt;some_sequence&gt;.nextval 
order by 
    &lt;some_indexed_field&gt;


While this the query is stuck are this state, all other queries get stuck at commit or writing to binlog state.

I couldn't find any relevant documentation for the same either.
UPDATEing or DELETEing all of a big table takes a long time.  It is busy copying over every row in case of rollback.  Wait.

Is there some reason for using a sequence instead of an AUTO_INCREMENT?

Is there some reason for renumbering the table?

Neither of those is needed in normal MySQL operation.

To leave the existing column intact, but add a new id that is the PK:

ALTER TABLE t
    DROP PRIMARY KEY,
    ADD COLUMN id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY;