1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-06 03:50:15 +02:00

Improve compatibility with CockroachDB (#3074)

This commit is contained in:
Alexey Shchepin 2019-12-16 06:52:06 +03:00
parent f9120f75b0
commit 24ac62eabd
4 changed files with 50 additions and 45 deletions

View file

@ -838,7 +838,7 @@ del_items(_, []) ->
del_items(Nidx, [ItemId]) ->
del_item(Nidx, ItemId);
del_items(Nidx, ItemIds) ->
I = str:join([[<<"'">>, ejabberd_sql:escape(X), <<"'">>] || X <- ItemIds], <<",">>),
I = str:join([ejabberd_sql:to_string_literal_t(X) || X <- ItemIds], <<",">>),
SNidx = misc:i2l(Nidx),
catch
ejabberd_sql:sql_query_t([<<"delete from pubsub_item where itemid in (">>,