How to close a open a connection
Opened this issue · 2 comments
GoogleCodeExporter commented
If once u create the connection how to close it.
Is there any method like mysql:close() or something please update it.
Original issue reported on code.google.com by sourabh....@gmail.com
on 2 Apr 2009 at 2:02
GoogleCodeExporter commented
It seems like there would be a simple answer to this, but I have not found it.
I
tried exit( Pid, exit ) of the Pid returned by the start function, but that
doesn't
close it. Whoever knows the answer is not talking. Some sort of stop() or
close()
function would be nice. I tried this with mysql:start() and mysql_conn:start().
Original comment by dmontagn...@yahoo.com
on 31 Mar 2010 at 3:53
GoogleCodeExporter commented
I just discovered some interesting things about this. The mysql_conn.erl file
makes
mention of start/6 which did not work, but start/8 worked. the LogFun argument
does
NOT work with an arity of 3, but requires an arity of 4. The connection can be
closed by sending exit( Pid, Reason ) to the Pid returned by the
mysql_conn:start/8
function.
the mysql.erl file contains the obsolete guard binary() and list() which can be
updated to is_binary() and is_list(). I thought I tried closing a connection
opened
with mysql_conn:start() in the past, but apparently I didn't. I still haven't
learned to use the LogFun, but will keep investigating. Let me know if you have
anything to offer regarding the LogFun.
Original comment by dmontagn...@yahoo.com
on 31 Mar 2010 at 4:33