fix mysql bugs in idle_data
Merge pull request #3 from EagleChen/patch-2

fix mysql bugs in idle_data