Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db_unixodbc: detect DB disconnection with generic HY000 status #691

Merged
merged 1 commit into from
Jul 4, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/db_unixodbc/dbase.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ static int db_unixodbc_submit_query(const db1_con_t* _h, const str* _s)

/* Connection broken */
if( !strncmp((char*)sqlstate,"08003",5) ||
!strncmp((char*)sqlstate,"08S01",5)
!strncmp((char*)sqlstate,"08S01",5) ||
!strncmp((char*)sqlstate,"HY000",5) /* ODBC 3 General error */
)
{
ret = reconnect(_h);
Expand Down