Module: kamailio
Branch: master
Commit: a1556c0708af959a3816e732a7bd692c5fa5f4dc
URL:
https://github.com/kamailio/kamailio/commit/a1556c0708af959a3816e732a7bd692…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-11-23T17:11:51+01:00
db_mysql: print error number when failing to do mysql query
---
Modified: modules/db_mysql/km_dbase.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a1556c0708af959a3816e732a7bd692…
Patch:
https://github.com/kamailio/kamailio/commit/a1556c0708af959a3816e732a7bd692…
---
diff --git a/modules/db_mysql/km_dbase.c b/modules/db_mysql/km_dbase.c
index a323be2..b132608 100644
--- a/modules/db_mysql/km_dbase.c
+++ b/modules/db_mysql/km_dbase.c
@@ -118,7 +118,8 @@ static int db_mysql_submit_query(const db1_con_t* _h, const str* _s)
}
counter_inc(mysql_cnts_h.driver_err);
}
- LM_ERR("driver error on query: %s\n", mysql_error(CON_CONNECTION(_h)));
+ LM_ERR("driver error on query: %s (%d)\n", mysql_error(CON_CONNECTION(_h)),
+ mysql_errno(CON_CONNECTION(_h)));
return -2;
}