Du saknar ett semikolon
CREATE PROCEDURE someFunction ( a VARCHAR(256), b VARCHAR(256) )
BEGIN
DECLARE haveAllVariables INT;
SET haveAllVariables = 1;
IF a = "" THEN SET haveAllVariables = 0;
ELSEIF b = "" THEN SET haveAllVariables = 0;
END IF;