DROP PROCEDURE IF EXISTS `update_product_description`;
DELIMITER ;;
CREATE PROCEDURE `update_product_description` (
    IN p_description VARCHAR(1000),
    IN p_product_id INT,
    IN p_user_id INT,
    OUT p_status INT
)
proc:BEGIN
    IF p_description = '' OR p_description IS NULL THEN
        SET p_status = -1;
        LEAVE proc;
    END IF;
    UPDATE products SET description = p_description WHERE user_id = p_user_id AND id = p_product_id;
    SET p_status = 0;
END ;;
DELIMITER ;
