fix error handling when sql calling with unknown host.
Merge pull request #191 from hamano/added_get_random_pid_error_handling

fix error handling when sql calling with unknown host.