From b0a950b6dd98de982f18a46281dc298667dd85bb Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 8 Mar 2017 16:22:13 +0100 Subject: [PATCH] Fix handling ejabberd_sql:sql_transaction result (#1584) --- src/ejd2sql.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ejd2sql.erl b/src/ejd2sql.erl index ae37a9b55..66411ef76 100644 --- a/src/ejd2sql.erl +++ b/src/ejd2sql.erl @@ -172,7 +172,8 @@ export(LServer, Table, IO, ConvertFun) -> output(_LServer, _Table, _IO, []) -> ok; output(LServer, _Table, sql, SQLs) -> - ejabberd_sql:sql_transaction(LServer, SQLs); + {atomic, ok} = ejabberd_sql:sql_transaction(LServer, SQLs), + ok; output(_LServer, Table, Fd, SQLs) -> file:write(Fd, ["-- \n-- Mnesia table: ", atom_to_list(Table), "\n--\n", SQLs]). -- 2.40.0