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

Coverity reported copy-paste error in WiredTiger error message

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • WT3.2.0, 4.1.11
    • None
    • None
    • 2
    • Storage Engines 2019-04-08, Storage Engines 2019-04-22

    Description

      Coverity reported copy-paste error in WiredTiger error message, CID 1400492, 1400493.

       

      *** CID 1400492:  Incorrect expression  (COPY_PASTE_ERROR)
      /src/txn/txn_timestamp.c: 650 in __wt_txn_set_commit_timestamp()
      644                                 ts_string[0], ts_string[1]);
      645                     }
      646     
      647                     if (has_stable_ts && commit_ts < stable_ts) {
      648                             __wt_timestamp_to_string(commit_ts, ts_string[0]);
      649                             __wt_timestamp_to_string(
      >>>     CID 1400492:  Incorrect expression  (COPY_PASTE_ERROR)
      >>>     "oldest_ts" in "__wt_timestamp_to_string(oldest_ts, ts_string[1])" looks like a copy-paste error.
      650                                 oldest_ts, ts_string[1]);
      651                             WT_RET_MSG(session, EINVAL,
      652                                 "commit timestamp %s is less than the stable "
      653                                 "timestamp %s",
      654                                 ts_string[0], ts_string[1]);
      655                     }
       
      *** CID 1400493:  Incorrect expression  (COPY_PASTE_ERROR)
      /src/txn/txn_timestamp.c: 749 in __wt_txn_set_durable_timestamp()
      743                         "durable timestamp %s is less than the oldest timestamp %s",
      744                         ts_string[0], ts_string[1]);
      745             }
      746     
      747             if (has_stable_ts && durable_ts < stable_ts) {
      748                     __wt_timestamp_to_string(durable_ts, ts_string[0]);
      >>>     CID 1400493:  Incorrect expression  (COPY_PASTE_ERROR)
      >>>     "oldest_ts" in "__wt_timestamp_to_string(oldest_ts, ts_string[1])" looks like a copy-paste error.
      749                     __wt_timestamp_to_string(oldest_ts, ts_string[1]);
      750                     WT_RET_MSG(session, EINVAL,
      751                         "durable timestamp %s is less than the stable timestamp %s",
      752                         ts_string[0], ts_string[1]);
      753             }
      

      Attachments

        Activity

          People

            keith.bostic@mongodb.com Keith Bostic (Inactive)
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: