add re-execute operation, before re-execute, we should renew the session if the failure is E_SESSION_INVALID or E_SESSION_TIMEOUT, and we should reconnect the session's connection for IO Error, and just re-execute for E_EXECUTION_ERROR.
Don't retry for E_STATEMENT_EMPTY and E_SYNTAX_ERROR.