Does MySQL close cursor if stored procedure encounters an exception?
use Approach #1:
according to http://www.brainbell.com/tutorials/MySQL/Working_With_Cursors.htm

If you do not explicitly close a cursor, MySQL will close it automatically when the END statement is reached.