mysql view and procedure