mbd.indexVolumeId = DbUtil.getUnsignedTinyIntAsShort(rs, 6);
mbd.indexVolumeId = rs.getShort(6);
    public static Mailbox.MailboxData getMailboxStats(Connection conn, int mailboxId) throws ServiceException {        PreparedStatement stmt = null;        ResultSet rs = null;        try {            stmt = conn.prepareStatement(                    "SELECT account_id, item_id_checkpoint, size_checkpoint, change_checkpoint, tracking_sync, " +                    "index_volume_id, config " +                    "FROM mailbox mb " +                    "WHERE mb.id = ?");            stmt.setInt(1, mailboxId);            rs = stmt.executeQuery();            if (!rs.next())                return null;            Mailbox.MailboxData mbd = new Mailbox.MailboxData();            mbd.id            = mailboxId;            mbd.accountId     = rs.getString(1);            mbd.size          = rs.getLong(3);            mbd.contacts      = 0;            mbd.lastItemId    = rs.getInt(2) + ITEM_CHECKPOINT_INCREMENT - 1;            mbd.lastChangeId  = rs.getInt(4) + CHANGE_CHECKPOINT_INCREMENT - 1;            mbd.trackSync     = rs.getBoolean(5);            mbd.indexVolumeId = DbUtil.getUnsignedTinyIntAsShort(rs, 6);            try {                mbd.config = new Metadata(rs.getString(7));             } catch (ServiceException e) {                ZimbraLog.misc.warn("unparseable config metadata in mailbox " + mailboxId);                mbd.config = new Metadata();            }            // round lastItemId and lastChangeId up so that they get written on the next change            long rounding = mbd.lastItemId % ITEM_CHECKPOINT_INCREMENT;            if (rounding != ITEM_CHECKPOINT_INCREMENT - 1)                mbd.lastItemId -= rounding + 1;            rounding = mbd.lastChangeId % CHANGE_CHECKPOINT_INCREMENT;            if (rounding != CHANGE_CHECKPOINT_INCREMENT - 1)                mbd.lastChangeId -= rounding + 1;            return mbd;        } catch (SQLException e) {            throw ServiceException.FAILURE("fetching stats on mailbox " + mailboxId, e);        } finally {            DbPool.closeResults(rs);            DbPool.closeStatement(stmt);        }    }