db:mysqldb: fix return values.

1) added suitable return values for simple 'return'.
2) added 'cursor' checking for fetch().

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>