Fixed the bug when the resultset has error packet.
Merge branch 'fix_execute_function_bug'