 	REVOKE UPDATE ON User FROM id@host;
 	UPDATE User SET isAdmin=0 WHERE dbUser=id;
 	FLUSH PRIVILEGES;
-END
+END//
+
+DELIMITER ;
 
 CALL createUser('patts', '%', 'patts');
 CALL grantAdmin('patts', '%', 'patts');

	INSERT INTO User(state,isAdmin,dbUser,firstName,middleName,lastName)
	       VALUES(1,0,newUser,'','','');
	FLUSH PRIVILEGES;
END

CREATE PROCEDURE grantAdmin (
       id VARCHAR(8),

	GRANT UPDATE ON User TO id@host IDENTIFIED BY passwd;
	UPDATE User SET isAdmin=1 WHERE dbUser=id;
	FLUSH PRIVILEGES;
END//

CREATE PROCEDURE revokeAdmin (
       id VARCHAR(8),
