modify workflowUpdateNumCompletedPS sql to compatible mysql