Mysql Procedure error while executing it
You are fetching into i, but not using it.
There is no end loop.
The insert is copying the whole table over repeatedly?


Consider using a single multi-table UPDATE, not a Stored Procedure with a loop.