Skip to content

Commit

Permalink
db_mysql: print error number when failing to do mysql query
Browse files Browse the repository at this point in the history
(cherry picked from commit a1556c0)
(cherry picked from commit 71ff394)
  • Loading branch information
miconda authored and juha-h committed Dec 21, 2015
1 parent 6b90475 commit 269e445
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/db_mysql/km_dbase.c
Expand Up @@ -120,7 +120,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;
}

Expand Down

0 comments on commit 269e445

Please sign in to comment.