MySQL: SI dans une procédure stockée

Je suis juste obtenir mes pieds mouillés avec des procédures stockées. Selon les tutoriels que j'ai vu, ce doit être valide (MySQL 5.5):

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;

Cependant, il est en train de lancer cette erreur:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'ELSEI
F b = "" THEN SET haveAllVariables = 0

Où est l'erreur dans ma syntaxe?

Grâce.

InformationsquelleAutor dotancohen | 2012-03-10