fix error handling when sql calling with unknown host.

#179 is insufficiency due to ?WARNING_MSG returned ok.
It will cause undesired behavior.