[sr-dev] git:4.2:74918723: db_mysql: extended the list of error code when to try to resend query

Juha Heinanen jh at tutpro.com
Mon Dec 21 23:51:41 CET 2015


Module: kamailio
Branch: 4.2
Commit: 7491872348e5e3769ad8c7038fe1c7d15fe1e00c
URL: https://github.com/kamailio/kamailio/commit/7491872348e5e3769ad8c7038fe1c7d15fe1e00c

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Juha Heinanen <jh at tutpro.com>
Date: 2015-12-22T00:49:37+02:00

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

(cherry picked from commit 6a62cc666352fbca7f1cc5a239464b42a7afc2cb)
(cherry picked from commit b2361d71de4208227468244754c0fc8229e7bcab)

---

Modified: modules/db_mysql/km_dbase.c

---

Diff:  https://github.com/kamailio/kamailio/commit/7491872348e5e3769ad8c7038fe1c7d15fe1e00c.diff
Patch: https://github.com/kamailio/kamailio/commit/7491872348e5e3769ad8c7038fe1c7d15fe1e00c.patch

---

diff --git a/modules/db_mysql/km_dbase.c b/modules/db_mysql/km_dbase.c
index 9f2b6e0..7a8194a 100644
--- a/modules/db_mysql/km_dbase.c
+++ b/modules/db_mysql/km_dbase.c
@@ -115,7 +115,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