Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-4313

storage/tokudb/PerconaFT/ft/serialize/ft-serialize.cc : suspicious switch statement

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.7.21-20, 5.6.39-83.1
    • Component/s: TokuDB
    • Labels:
      None

      Description

      Initially reported by David Binderman as MDEV-13963 , quoting


      Source code is

          switch (version) {
              case FT_LAYOUT_VERSION_29:
                  size += sizeof(uint64_t);  // logrows in ft
              case FT_LAYOUT_VERSION_28:
                  size += sizeof(uint32_t);  // fanout in ft
              case FT_LAYOUT_VERSION_27:
              case FT_LAYOUT_VERSION_26:
      

      Maybe some missing break statements here. Either that or some missing comments
      saying the fallthrough is deliberate.

       

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                george.lorch George Lorch
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: