MySQL stored procedure conditional

conditional tests