In essence I'd like to store some rows in a temporary variable for the life of a procedure in MySQL.
My procedure will grab a column of foreign keys at the beginning of the procedure. Once I'm done working with them I want to update the table to indicate that they have been processed. There may be inserts into this table while my procedure is working on it's set of data so I don't want to erroneously mark these new rows as processed. I also do not want to lock this table and hold up the thread that is making the inserts.
Is a temporary table the best solution?