summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/schema/schema_stat.c
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2015-11-11 16:35:13 +1100
committerMichael Cahill <michael.cahill@mongodb.com>2015-11-11 16:35:13 +1100
commit76ef930d453d4de3ad24245eeb0043c94a0cf258 (patch)
tree58a2f77b0506ba040bb37e10a6c0704df0c0608a /src/third_party/wiredtiger/src/schema/schema_stat.c
parent80dfa9ff4da8935ff294483e14ad5a6cdcd05985 (diff)
downloadmongo-76ef930d453d4de3ad24245eeb0043c94a0cf258.tar.gz
Import wiredtiger-wiredtiger-mongodb-3.2.0-rc2-44-gd9ec1ff.tar.gz from wiredtiger branch mongodb-3.2
Diffstat (limited to 'src/third_party/wiredtiger/src/schema/schema_stat.c')
-rw-r--r--src/third_party/wiredtiger/src/schema/schema_stat.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/third_party/wiredtiger/src/schema/schema_stat.c b/src/third_party/wiredtiger/src/schema/schema_stat.c
index 88f92b71599..d73d66cd399 100644
--- a/src/third_party/wiredtiger/src/schema/schema_stat.c
+++ b/src/third_party/wiredtiger/src/schema/schema_stat.c
@@ -96,15 +96,17 @@ __curstat_size_only(WT_SESSION_IMPL *session,
* are concurrent schema level operations (for example drop). That is
* fine - failing here results in falling back to the slow path of
* opening the handle.
+ * !!! Deliberately discard the return code from a failed call - the
+ * error is flagged by not setting fast to true.
*/
- WT_ERR(__wt_filesize_name(session, namebuf.data, true, &filesize));
+ if (__wt_filesize_name(session, namebuf.data, true, &filesize) == 0) {
+ /* Setup and populate the statistics structure */
+ __wt_stat_dsrc_init_single(&cst->u.dsrc_stats);
+ cst->u.dsrc_stats.block_size = filesize;
+ __wt_curstat_dsrc_final(cst);
- /* Setup and populate the statistics structure */
- __wt_stat_dsrc_init_single(&cst->u.dsrc_stats);
- cst->u.dsrc_stats.block_size = filesize;
- __wt_curstat_dsrc_final(cst);
-
- *was_fast = true;
+ *was_fast = true;
+ }
err: __wt_free(session, tableconf);
__wt_buf_free(session, &namebuf);