aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-12-14 20:00:38 +0300
committerGravatar Vitaly Takmazov2022-12-14 20:10:15 +0300
commit708c1fea2e47997698c493e13cd16c200d60d276 (patch)
treeca276ea2526c9ecf5f029b921ad0843659982b69 /src/main/java/com/juick/service
parent560d89cb0285435f0e7c640b3fb67ab1197df808 (diff)
Fix the integer overflow issue
Diffstat (limited to 'src/main/java/com/juick/service')
-rw-r--r--src/main/java/com/juick/service/MessagesServiceImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java
index c5037c31..5969443c 100644
--- a/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -817,11 +817,11 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
+ "ON banned.reply_id = replies.replyto AND replies.reply_id != replies.replyto AND banned.message_id=replies.message_id "
+ "WHERE replies.message_id IN (:ids)) " + "SELECT messages.message_id, 0 as rid, 0 as replyto, "
+ "messages.user_id,users.nick, 0 as usr_banned, " + "messages.ts,"
- + "messages.readonly,messages.privacy, messages.replies-COUNT(DISTINCT banned.reply_id) as replies,"
+ + "messages.readonly,messages.privacy, 1.*messages.replies-COUNT(DISTINCT banned.reply_id) as replies,"
+ "messages.attach,COUNT(DISTINCT favorites.user_id) AS likes,messages.hidden,"
+ "'' as tags, messages_txt.repliesby, messages_txt.txt, '' as q, "
+ "messages.updated, 0 as to_uid, NULL as to_name, messages_txt.updated_at, '' as m_user_uri, "
- + "'' as to_uri, '' as msg_reply_uri, 0 as html, (messages.replies - subscr_messages.last_read_rid) > 0 as unread "
+ + "'' as to_uri, '' as msg_reply_uri, 0 as html, (1.*messages.replies - subscr_messages.last_read_rid) > 0 as unread "
+ "FROM (messages INNER JOIN messages_txt " + "ON messages.message_id=messages_txt.message_id) "
+ "INNER JOIN users ON messages.user_id=users.id " + "LEFT JOIN subscr_messages "
+ "ON messages.message_id=subscr_messages.message_id AND subscr_messages.suser_id=:uid "