fix a bug in mysql queue