mysql driver in erlang support stored procedure

Seven Du <>
Fri Jan 21 17:10:12 CET 2011


I was using erlang_mysql_driver for a while, but it seems doesn't
support stored procedure.

Then I found another driver called EMysql , on test it does support
call procedure, however, it returns ok_packets sometimes on select
only procedures, and it happens also for simple selects(where it
should always be result_packet I think):
fetch4() ->
	SQL = "select * from test;",
	Result = emysql:execute(mysql2, SQL),
	io:format("~p~n", [Result]),
	Fields = Result#result_packet.field_list,
	Rows = Result#result_packet.rows,
	io:format("~p~n", [Fields]),
	io:format("~p~n", [Rows]).

> mytest:fetch4().
** exception error: {badrecord,result_packet}
     in function  m_telsystem:fetch/0

I should report an issue on github but the only issue there is still
in unread state and it's not been updated since 2009. There are other
clones of the project, but not sure which one will has support.

Any one has experience on this or other options?

erlang_mysql_driver is quite state besides I haven't got it support
stored procedure.



More information about the erlang-questions mailing list