title: Issue with @variable when defining procedure MySQL Workbench
body: <p>This code is producing an error on @counter
  The error code shows "Syntax Error: Unexpected '@counter' (at text suffix)"</p>
  
  <p>I cant find a way to make it run, </p>
  
  <p>Here is the code:</p>
  
  <pre><code>CREATE DEFINER=`root`@`localhost` PROCEDURE ValidateCC(IN ccNum char(16), OUT isValid BOOLEAN )
  BEGIN
  DECLARE @counter, @sum, @numb, @tmp AS INT DEFAULT 0;
  DECLARE @result TINYINT(1) DEFAULT 1;
  SET isValid = ‘False’;
  IF ccNum IS NULL THEN 
    SET @result = 0;
  ELSEIF char_length(ccNum) &lt; 12 THEN
    SET @result = 0;
  SET @counter = char_length(ccNum);
  IF ccNum NOT_REGEXP '^[0-9]+$' THEN
    SET @result = 0;
  END  IF;
  WHILE @counter &gt; 0 DO
    IF @counter &gt; 1 THEN 
      SET @tmp = (ASCII(SUBSTR(ccNum, @counter, 1)) - 48) * 2;
      IF @tmp &gt; 9 THEN
        SET @sum = @sum + @tmp - 9;
      ELSE
         SET @sum = @sum + @tmp;
      END IF;
      SET @number = @number + (ASCII(SUBSTR(ccNum, @counter, 1)) -48);
      SET @counter = @counter - 2; 
    END IF;
  SET @sum = MOD((@sum + @number), 10);
  IF @sum = 0 THEN
    SET @result =1
  END IF;
  END WHILE;
  IF @result = 1 THEN
    SET isValid = ‘True’;
  ELSE
    SET isValid = ‘False’;
  END IF;
  END ;
  </code></pre>