On Saturday 27 August 2011, MÉSZÁROS Mihály wrote:
> I am using the git version of kamailio, and i am experiencing problem
> This message is repeated in log with all kind of mysql query
> (insert/delete/select)
> http://dev.mysql.com/doc/refman/5.0/en/commands-out-of-sync.html

Can you try to reproduce with attached patch and mail the line with the 
mysql error as well as the last couple of loglines with submit_query and 
store_result having the same con: as the failing query.
You can anonymize the queries as long as it is still deducable which module 
submitted the query.

Also send list of modules using the database please.


> Only one assumption:
> Could it related to this change:
> http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=
> dfc2834223b7c6b2e799da5a0876b8096cfdae5e

That one can be safely reverted if you don't use the PV $sqlrows. But please 
do above test without reverting this.

-- 
Alex Hermann

diff --git a/modules/db_mysql/km_dbase.c b/modules/db_mysql/km_dbase.c
index d85fe5f..c192a0e 100644
--- a/modules/db_mysql/km_dbase.c
+++ b/modules/db_mysql/km_dbase.c
@@ -78,6 +78,13 @@ static int db_mysql_submit_query(const db1_con_t* _h, const str* _s)
 		return -1;
 	}
 
+	if (_h->table && _h->table->s)
+		LM_INFO(" submit_query:  con: %p  table: %.*s  query: %.*s\n",
+				_h, _h->table->len, _h->table->s, _s->len, _s->s);
+	else 
+		LM_INFO(" submit_query:  con: %p  query: %.*s\n",
+				_h, _s->len, _s->s);
+
 	if (my_ping_interval) {
 		t = time(0);
 		if ((t - CON_TIMESTAMP(_h)) > my_ping_interval) {
@@ -163,6 +170,12 @@ static int db_mysql_store_result(const db1_con_t* _h, db1_res_t** _r)
 		return -1;
 	}
 
+	if (_h->table && _h->table->s)
+		LM_INFO("store_result:  con: %p  table: %.*s\n",
+				_h, _h->table->len, _h->table->s);
+	else 
+		LM_INFO("store_result:  con: %p\n", _h);
+
 	*_r = db_new_result();
 	if (*_r == 0) {
 		LM_ERR("no memory left\n");
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to