Browse Source

modules/db_mysql: include (start of) mysql query to async query error message

(cherry picked from commit 301793c4f10c860e263a243863f7b833ba3bb0f6)
Juha Heinanen 10 years ago
parent
commit
1fea10a610
1 changed files with 2 additions and 1 deletions
  1. 2 1
      modules/db_mysql/km_dbase.c

+ 2 - 1
modules/db_mysql/km_dbase.c

@@ -142,7 +142,8 @@ void db_mysql_async_exec_task(void *param)
 		return;
 		return;
 	}
 	}
 	if(db_mysql_submit_query(dbc, &p[1])<0) {
 	if(db_mysql_submit_query(dbc, &p[1])<0) {
-		LM_ERR("failed to execute query on async worker\n");
+		LM_ERR("failed to execute query [%.*s] on async worker\n",
+		       (p[1].len>100)?100:p[1].len, p[1].s);
 	}
 	}
 	db_mysql_close(dbc);
 	db_mysql_close(dbc);
 }
 }