From cd18d3d8a72a05b20c0f8a9396de8e6ae8bc6dcd Mon Sep 17 00:00:00 2001 From: Lamtei W Date: Mon, 8 May 2017 13:21:12 +0530 Subject: [PATCH] Fix: update sql statement, added missing delimeter for sql queries --- src/mod_mam_sql.erl | 4 ++-- src/sql_queries.erl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mod_mam_sql.erl b/src/mod_mam_sql.erl index 7ae3bb87f..c1c6b876b 100644 --- a/src/mod_mam_sql.erl +++ b/src/mod_mam_sql.erl @@ -193,7 +193,7 @@ export(_Server) -> SAlways = misc:term_to_expr(Always), SNever = misc:term_to_expr(Never), [?SQL("insert into archive_prefs (username, def, always, never) values" - "(%(LUser)s, %(SDefault)s, %(SAlways)s, %(SNever)s)")]; + "(%(LUser)s, %(SDefault)s, %(SAlways)s, %(SNever)s);")]; (_Host, _R) -> [] end}, @@ -217,7 +217,7 @@ export(_Server) -> "peer, bare_peer, xml, txt, kind, nick) " "values (%(SUser)s, %(TStmp)d, %(LPeer)s, " "%(BarePeer)s, %(XML)s, %(Body)s, %(SType)s, " - "%(Nick)s)")]; + "%(Nick)s);")]; (_Host, _R) -> [] end}]. diff --git a/src/sql_queries.erl b/src/sql_queries.erl index 83cbd7b73..862e4e284 100644 --- a/src/sql_queries.erl +++ b/src/sql_queries.erl @@ -385,7 +385,7 @@ update_roster_sql({LUser, SJID, Name, SSubscription, SAsk, AskMessage}, " username=%(LUser)s and jid=%(SJID)s;")] ++ [?SQL("insert into rostergroups(username, jid, grp) " - "values (%(LUser)s, %(SJID)s, %(ItemGroup)s)") + "values (%(LUser)s, %(SJID)s, %(ItemGroup)s);") || ItemGroup <- ItemGroups]. roster_subscribe({LUser, SJID, Name, SSubscription, SAsk, AskMessage}) -> -- 2.40.0