DROP PROCEDURE
IF EXISTS `InsertMsgTemp`;
DELIMITER ;;
CREATE PROCEDURE `InsertMsgTemp` (IN orgcode VARCHAR(50))
BEGIN
DECLARE t_error INTEGER DEFAULT 0;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET t_error=1;
START TRANSACTION;
IF t_error = 1 THEN
ROLLBACK;
ELSE
COMMIT;
END IF;
select t_error;
END
;;
DELIMITER ;