fixing possible mysql error, refs #6244
fixing possible mysql error, refs #6244