fix bug for edit categories about mysql transaction