Coverity analysis defect 184043: Logically dead code

XMLWordPrintableJSON

    • Storage Engines - Transactions
    • SE Transactions - 2026-01-02
    • None

      On line 321 of __page_read, we check that count > 1, and set build_full_disk_image_from_deltas = true;

      We have a block on line 375 that checks if (count > 1 && !build_full_disk_image_from_deltas).

      We have set earlier build_full_disk_image_from_deltas to be true if count > 1 so this block's condition will never bet met.

      Coverity:

      The indicated dead code may have performed some action; that action will never occur. Code can never be reached because of a logical contradiction
      /src/btree/bt_read.c:334: DEADCODE 184043 Assigning: "build_full_disk_image_from_deltas" = "true".
      /src/btree/bt_read.c:359: DEADCODE 184043 Condition "build_full_disk_image_from_deltas", taking true branch. Now the value of "build_full_disk_image_from_deltas" is equal to 1.
      /src/btree/bt_read.c:375: DEADCODE 184043 At condition "build_full_disk_image_from_deltas", the value of "build_full_disk_image_from_deltas" must be equal to 1.
      /src/btree/bt_read.c:375: DEADCODE 184043 The condition "!build_full_disk_image_from_deltas" cannot be true.
      /src/btree/bt_read.c:376: DEADCODE 184043 Execution cannot reach this statement: "ret = __wti_page_reconstruc...".

            Assignee:
            Ravi Giri
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: