* src/odbc/ejabberd_odbc.erl: UTF-8 support for MySQL5 (EJAB-318).

SVN Revision: 869
This commit is contained in:
Mickaël Rémond 2007-08-12 15:41:00 +00:00
parent 8561ba614f
commit 884c8d531f
2 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2007-08-12 Mickael Remond <mickael.remond@process-one.net>
* src/odbc/ejabberd_odbc.erl: UTF-8 support for MySQL5 (EJAB-318).
2007-08-01 Mickael Remond <mickael.remond@process-one.net>
* src/mod_private.erl: Reduce memory consumption on user private

View File

@ -272,6 +272,7 @@ mysql_connect(Server, DB, Username, Password) ->
case mysql_conn:start(Server, ?MYSQL_PORT, Username, Password, DB, NoLogFun) of
{ok, Ref} ->
erlang:monitor(process, Ref),
mysql_conn:fetch(Ref, ["set names 'utf8';"], self()),
{ok, #state{db_ref = Ref, db_type = mysql}};
{error, Reason} ->
?ERROR_MSG("MySQL connection failed: ~p~n", [Reason]),