Fix session::create documentation

XMLWordPrintableJSON

    • Storage Engines
    • StorEng - 2025-02-28
    • 2

      The WT_SESSION::create documentation states:

      exclusive:
      fail if the object exists. When false (the default), if the object exists, check that its settings match the specified configuration.
      

      This is incorrect. If the file already exists and exclusive = false, then we silently fail according to:

          /* Check if the table already exists. */
          if ((ret = __wt_metadata_search(session, uri, &tablecfg)) != WT_NOTFOUND) {
              /*
               * Regardless of the 'exclusive' flag, we should raise an error if we try to import an
               * existing URI rather than just silently returning.
               */
              if (exclusive || import)
                  WT_TRET(EEXIST);
              goto err;
          }
      

              Assignee:
              Sean Watt
              Reporter:
              Sean Watt
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: