TT#27653 Strip trailing trash from uuid

This is more like a hack working around the unknown root cause of
why the storage driver is returning trailing garbage for some of
the entries of the key column.

It doesn't happen on the mysql client, so maybe lua related?

Change-Id: I4a5d0b27f0c6dbf9d220e86f1ab6d9e929ad2d89
(cherry picked from commit 578427307e)
changes/95/19695/1
Andreas Granig 9 years ago committed by Richard Fuchs
parent 37c95460ac
commit fc153ebd0a

@ -0,0 +1,11 @@
--- a/plugins/mod_mam/sipwise_archive.lib.lua
+++ b/plugins/mod_mam/sipwise_archive.lib.lua
@@ -56,7 +56,7 @@
res = engine:select(query, unpack(_params));
local out = {};
for row in res do
- table.insert(out, {row[1], row[2], row[3], row[4]});
+ table.insert(out, {string.sub(row[1], 0, 36), row[2], row[3], row[4]});
end
return out;
end

@ -5,3 +5,4 @@ mod_auth_sql.path
0004-TT-9311-mod_mam-sipwise_archive.lib-full-username.patch
0005-TT-9317-mod_mam-don-t-store-bodyless-chat-messages.patch
0006-TT-9314-mod_mam-sipwise_archive.lib-support-emojis.patch
0007-TT-27653-mod_mam-sipwise_archive.lib-fix-uuid-trailing-garbage.patch

Loading…
Cancel
Save