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
  • Loading branch information
miconda committed Nov 23, 2015
1 parent aab6547 commit a1556c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/db_mysql/km_dbase.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit a1556c0

Please sign in to comment.