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

Coverity reported copy-paste error in WiredTiger error message

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT3.2.0, 4.1.11
    • Component/s: None
    • Labels:
      None
    • Story Points:
      2
    • Sprint:
      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

            • Assignee:
              keith.bostic Keith Bostic
              Reporter:
              keith.bostic Keith Bostic
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: