" WHERE " + (DebugConfig.enableMailboxGroup ? "mailbox_id = ? AND " : "") + "id = pid AND type = " + MailItem.TYPE_CONVERSATION);
" WHERE " + IN_THIS_MAILBOX_AND + "id = pid AND type = " + MailItem.TYPE_CONVERSATION);
    public static List<Integer> markDeletionTargets(Folder folder) throws ServiceException {        Mailbox mbox = folder.getMailbox();        Connection conn = mbox.getOperationConnection();        PreparedStatement stmt = null;        ResultSet rs = null;        try {            String table = getMailItemTableName(folder);            stmt = conn.prepareStatement("UPDATE " + table + ", " +                    "(SELECT parent_id pid, COUNT(*) count FROM " +                    getMailItemTableName(folder) + " WHERE " +                    (DebugConfig.enableMailboxGroup ? "mailbox_id = ? AND " : "") +                    "folder_id = ? AND parent_id IS NOT NULL GROUP BY parent_id) x" +                    " SET size = size - count, metadata = NULL, mod_metadata = ?, change_date = ?" +                    " WHERE " +                    (DebugConfig.enableMailboxGroup ? "mailbox_id = ? AND " : "") +                    "id = pid AND type = " + MailItem.TYPE_CONVERSATION);            int pos = 1;            if (DebugConfig.enableMailboxGroup)                stmt.setInt(pos++, mbox.getId());            stmt.setInt(pos++, folder.getId());            stmt.setInt(pos++, mbox.getOperationChangeID());            stmt.setInt(pos++, mbox.getOperationTimestamp());            if (DebugConfig.enableMailboxGroup)                stmt.setInt(pos++, mbox.getId());            stmt.executeUpdate();            stmt.close();            return getPurgedConversations(mbox);        } catch (SQLException e) {            throw ServiceException.FAILURE("marking deletions for conversations crossing folder " + folder.getId(), e);        } finally {            DbPool.closeResults(rs);            DbPool.closeStatement(stmt);        }    }