0 - 2 of 2 tags for declare variables in sql block

Hello, could you please help me with this case? I'm new in creating procedures with variables and parameters.
I'm trying to create procedure which will insert values to table.
 
CREATE PROCEDURE db.insert_proc()
BEGIN
DECLARE i INT DEFAULT 1;
DECLARE d DATE DEFAULT '2014-12-29';
WHILE d<current_date DO

Hi All,
I am working on a application that prepares a dynamic sql blocks for execution.
The application is written in perl which prepares the set of sql statements.
Here is an example :