update mysql tables and procedure sql