diff options
author | Alison Felizzi <alison.felizzi@mongodb.com> | 2021-12-02 06:12:22 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-12-02 06:45:56 +0000 |
commit | 9a968e6b9f4e35ca7ba131cdc9da41c633feb481 (patch) | |
tree | 5b143960c943eb8e19e8b3343924900460c2d7a1 /src/third_party/wiredtiger/src/schema/schema_rename.c | |
parent | ab4b4c11dbf5a3044bb3b0cf7ee3d9afddd844c4 (diff) | |
download | mongo-9a968e6b9f4e35ca7ba131cdc9da41c633feb481.tar.gz |
Import wiredtiger: 7f968529171c2567ee9cc978c3d9637400468d1f from branch mongodb-master
ref: aab3dbc410..7f96852917
for: 5.2.0
WT-8474 review clang analyzer warnings
Diffstat (limited to 'src/third_party/wiredtiger/src/schema/schema_rename.c')
-rw-r--r-- | src/third_party/wiredtiger/src/schema/schema_rename.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/third_party/wiredtiger/src/schema/schema_rename.c b/src/third_party/wiredtiger/src/schema/schema_rename.c index 73794a40f7b..372c64e6f27 100644 --- a/src/third_party/wiredtiger/src/schema/schema_rename.c +++ b/src/third_party/wiredtiger/src/schema/schema_rename.c @@ -144,8 +144,10 @@ __rename_tree(WT_SESSION_IMPL *session, WT_TABLE *table, const char *newuri, con else WT_ERR(__wt_schema_index_source(session, table, suffix, value, ns)); + /* Convert not-found errors to EINVAL for the application. */ if ((ret = __wt_config_getones(session, value, "source", &cval)) != 0) - WT_ERR_MSG(session, EINVAL, "index or column group has no data source: %s", value); + WT_ERR_MSG(session, ret == WT_NOTFOUND ? EINVAL : ret, + "index or column group has no data source: %s", value); /* Take a copy of the old data source. */ WT_ERR(__wt_scr_alloc(session, 0, &os)); |