title: Mysql continue handler sytax error
body: <p>I can't see what is wrong with this syntax please help! I tried to look up the syntax from here 
  <a href="http://dev.mysql.com/doc/refman/5.5/en/declare-handler.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.5/en/declare-handler.html</a></p>
  
  <pre><code>   DELIMITER $$
      DROP PROCEDURE IF EXISTS `load_dimensions`$$
      CREATE PROCEDURE `load_dimensions`( )
      BEGIN
  
       -- Declare variables to hold diagnostics area information
        DECLARE code CHAR(5) DEFAULT '00000';
        DECLARE msg TEXT;
        DECLARE rows INT;
        DECLARE result varchar(300);
        -- Declare exception handler for failed insert
        DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
        BEGIN
             GET DIAGNOSTICS CONDITION 1 code = RETURNED_SQLSTATE, msg = MESSAGE_TEXT;
        END;
  
      INSERT  dimtable(col)
      SELECT  col FROM extract;
  
      IF code = '00000' THEN
          GET DIAGNOSTICS rows = ROW_COUNT;
          SET result = CONCAT('succeeded, row count = ',rows);
          INSERT INTO etl_log (result)
          SELECT CONCAT('Error',state,': ',msg);
        ELSE
          SET result = CONCAT('failed, error = ',code,', message = ',msg);
          INSERT INTO etl_log (result)
          SELECT CONCAT('Error',state,': ',msg);
        END IF;
  
      END $$ 
  </code></pre>