Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39812

32-bit size truncation in RocksDB

    XMLWordPrintable

Details

    Description

      139
      int Rdb_index_merge::add(const rocksdb::Slice &key, const rocksdb::Slice &val) {
      140
        /* Adding a record after heap is already created results in error */
      141
        DBUG_ASSERT(m_merge_min_heap.empty());
      142
       
      143
        /*
      144
          Check if sort buffer is going to be out of space, if so write it
      145
          out to disk in sorted order using offset tree.
      146
        */
      147
        const uint total_offset = RDB_MERGE_CHUNK_LEN +
      148
                                  m_rec_buf_unsorted->m_curr_offset +
      149
                                  RDB_MERGE_KEY_DELIMITER + RDB_MERGE_VAL_DELIMITER +
      150
                                  key.size() + val.size();
      151
        if (total_offset >= m_rec_buf_unsorted->m_total_size) {
      

      while both m_rec_buf_unsorted->m_curr_offset and m_rec_buf_unsorted->m_total_size are ulonglong.

      Reported by JoBu

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.