]> granicus.if.org Git - ejabberd/commitdiff
Fix: update sql statement, added missing delimeter for sql queries
authorLamtei W <lamteiwahlang@gmail.com>
Mon, 8 May 2017 07:51:12 +0000 (13:21 +0530)
committerBadlop <badlop@process-one.net>
Wed, 10 May 2017 09:22:11 +0000 (11:22 +0200)
src/mod_mam_sql.erl
src/sql_queries.erl

index 7ae3bb87fe26ca9e7e31c4a9a8619be74cd4cbe0..c1c6b876b0318263d7c9b852a5ef8ae5346427d8 100644 (file)
@@ -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}].
index 83cbd7b73ebf14d2973fd81df9585bb512d539dd..862e4e28450aa14e72514fc7274322f8b0914e71 100644 (file)
@@ -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}) ->