[sr-dev] git:master:6a62cc66: db_mysql: extended the list of error code when to try to resend query

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 23 18:19:19 CET 2015


Module: kamailio
Branch: master
Commit: 6a62cc666352fbca7f1cc5a239464b42a7afc2cb
URL: https://github.com/kamailio/kamailio/commit/6a62cc666352fbca7f1cc5a239464b42a7afc2cb

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-11-23T18:00:58+01:00

db_mysql: extended the list of error code when to try to resend query

---

Modified: modules/db_mysql/km_dbase.c

---

Diff:  https://github.com/kamailio/kamailio/commit/6a62cc666352fbca7f1cc5a239464b42a7afc2cb.diff
Patch: https://github.com/kamailio/kamailio/commit/6a62cc666352fbca7f1cc5a239464b42a7afc2cb.patch

---

diff --git a/modules/db_mysql/km_dbase.c b/modules/db_mysql/km_dbase.c
index b132608..f1956e8 100644
--- a/modules/db_mysql/km_dbase.c
+++ b/modules/db_mysql/km_dbase.c
@@ -113,7 +113,9 @@ static int db_mysql_submit_query(const db1_con_t* _h, const str* _s)
 			return 0;
 		}
 		code = mysql_errno(CON_CONNECTION(_h));
-		if (code != CR_SERVER_GONE_ERROR && code != CR_SERVER_LOST) {
+		if (code!=CR_SERVER_GONE_ERROR && code!=CR_SERVER_LOST
+				&& code!=CR_SSL_CONNECTION_ERROR && code!=CR_CONNECTION_ERROR
+				&& code!=CR_CONN_HOST_ERROR && code!=CR_SERVER_LOST_EXTENDED) {
 			break;
 		}
 		counter_inc(mysql_cnts_h.driver_err);




More information about the sr-dev mailing list