With Oracle DB, if the DB is restarted, db_unixodbc doesn't detect the problem as the error returned by db_unixodbc_extract_error() is:
Jul 1 06:07:15 newvm1 /usr/sbin/kamailio[2770]: ERROR: db_unixodbc [connection.c:220]: db_unixodbc_extract_error(): unixodbc:SQLExecDirect=HY000:1:3114:[Oracle][ODBC][Ora]ORA-03114: not connected to ORACLE#012
Before, only status 08003 and 08S01 where checked to reconnect to the DB. Now, SQLSTATE HY000 (General error) is checked to trigger a reconnection. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/691
-- Commit Summary --
* db_unixodbc: detect DB disconnection with generic HY000 status
-- File Changes --
M modules/db_unixodbc/dbase.c (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/691.patch https://github.com/kamailio/kamailio/pull/691.diff
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/691
Thanks!
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/691#issuecomment-230225719
Merged #691.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/691#event-711710330