diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/meta/meta_turtle.c')
-rw-r--r-- | src/third_party/wiredtiger/src/meta/meta_turtle.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/third_party/wiredtiger/src/meta/meta_turtle.c b/src/third_party/wiredtiger/src/meta/meta_turtle.c index 2c83167c28f..af5c753b70a 100644 --- a/src/third_party/wiredtiger/src/meta/meta_turtle.c +++ b/src/third_party/wiredtiger/src/meta/meta_turtle.c @@ -82,7 +82,8 @@ __metadata_load_hot_backup(WT_SESSION_IMPL *session) break; WT_ERR(__wt_getline(session, fs, value)); if (value->size == 0) - WT_ERR(__wt_illegal_value(session, WT_METADATA_BACKUP)); + WT_PANIC_ERR(session, EINVAL, + "%s: zero-length value", WT_METADATA_BACKUP); WT_ERR(__wt_metadata_update(session, key->data, value->data)); } @@ -329,8 +330,10 @@ err: WT_TRET(__wt_fclose(session, &fs)); * something has gone horribly wrong, except for the compatibility * setting which is optional. */ - return (ret == 0 || strcmp(key, WT_METADATA_COMPAT) == 0 ? ret : - __wt_illegal_value(session, WT_METADATA_TURTLE)); + if (ret == 0 || strcmp(key, WT_METADATA_COMPAT) == 0) + return (ret); + WT_PANIC_RET(session, ret, + "%s: fatal turtle file read error", WT_METADATA_TURTLE); } /* @@ -388,5 +391,8 @@ err: WT_TRET(__wt_fclose(session, &fs)); * An error updating the turtle file means something has gone horribly * wrong -- we're done. */ - return (ret == 0 ? 0 : __wt_illegal_value(session, WT_METADATA_TURTLE)); + if (ret == 0) + return (ret); + WT_PANIC_RET(session, ret, + "%s: fatal turtle file update error", WT_METADATA_TURTLE); } |