Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-5567

Fix assert always true

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT3.2.2
    • Component/s: None
    • Labels:
      None

      Description

      WT_ASSERT(
            session, upd == NULL || upd->type != WT_UPDATE_BIRTHMARK || upd->type != WT_UPDATE_TOMBSTONE);
      

      is always true in txn_read and causing the complier to complain with

      In file included from ../../../src/include/wt_internal.h:424:0,
      from ../../../test/utility/test_util.h:28,
      from ../../../bench/wtperf/wtperf.h:32,
      from ../../../bench/wtperf/misc.c:29:
      ../../../src/include/txn.i: In function '__wt_txn_read':
      ../../../src/include/txn.i:889:5: warning: 'and' of mutually exclusive equal-tests is always 0
      WT_ASSERT(

      It should be changed to

      WT_ASSERT(
      session, upd == NULL || (upd->type != WT_UPDATE_BIRTHMARK && upd->type != WT_UPDATE_TOMBSTONE));

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chenhao.qu Chenhao Qu
                Reporter:
                chenhao.qu Chenhao Qu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: