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

Used false instead of NULL for a pointer argument

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • WT11.2.0
    • Affects Version/s: None
    • Component/s: None
    • 1
    • Storage Engines - 2023-01-10

      In the function __curjoin_extract_insert, there is a usage of __curjoin_entry_in_range which has the following signature:

      static int
        __curjoin_entry_in_range(
        WT_SESSION_IMPL *session, WT_CURSOR_JOIN_ENTRY *entry, WT_ITEM *curkey, WT_CURSOR_JOIN_ITER *iter)
      

      We are passing a "false" for the last argument, which I believe converts to NULL, but we should have just used NULL. It should be a quick fix.

          WT_ASSERT(session, ikey.size > 0);
          --ikey.size;
      
          ret = __curjoin_entry_in_range(session, cextract->entry, &ikey, false);
          if (ret == WT_NOTFOUND)
              ret = 0;
          else if (ret == 0)
              cextract->ismember = true;
      

            Assignee:
            sona.reddy@mongodb.com Sona Reddy (Inactive)
            Reporter:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: