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

Fix an assert in txn_read always be true

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0, 4.4.0-rc0, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 1

      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));

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

              Created:
              Updated:
              Resolved: