Skip to content

Commit

Permalink
db_unixodbc: detect DB disconnection with generic HY000 status
Browse files Browse the repository at this point in the history
(cherry picked from commit d80376f)
(cherry picked from commit e287449)
  • Loading branch information
Giovanni Mele authored and miconda committed Jul 5, 2016
1 parent 725af95 commit a06d541
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/db_unixodbc/dbase.c
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

0 comments on commit a06d541

Please sign in to comment.