DELIMITER $$ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_checkGrouping`(vGrouping INT) BEGIN /** * Checks the buy grouping, throws an error if it's invalid. * * @param vGrouping The grouping */ IF vGrouping = 0 THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Grouping cannot be zero'; END IF; END$$ DELIMITER ;