Vikram Ambrose writes: > There is indeed enough information to find this scenario. Here is a very > simple callback I use at the moment: > > void DB_error_callback(dbi_conn conn, void *udata){ > int rv; > const char *errormsg = NULL; > > rv = dbi_conn_error(DB_conn,&errormsg); > if(strstr(errormsg,"gone away")){ > rv = dbi_conn_connect(DB_conn); > if(rv){ > printf("ERROR: DB_error_callback: Tried to reconnect - > failed\n"); > }else { > printf("ERROR: DB_error_callback: Reconnected\n"); > } > } > } >
Hi, I just found some time to fiddle with this. As it seems, your solution is pretty much focused on MySQL. However, I assume that the server going away is a problem of all database engines, except maybe the embedded ones. Adding some code to the MySQL driver to fix your original problem thus might be the wrong solution. Don't you experience the same problems with other DB engines? In that case, we'd have to fix libdbi, rather than a driver. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users