diff options
author | Susan LoVerso <sue@wiredtiger.com> | 2014-02-26 10:16:02 -0500 |
---|---|---|
committer | Susan LoVerso <sue@wiredtiger.com> | 2014-02-26 10:16:02 -0500 |
commit | 2c362b4c2163323d789e3896180785024d7e0f3a (patch) | |
tree | a58732635c89d817126b41320152f8a0d9e4d3a4 | |
parent | 8e79beccc1597c0b61ea301f074fa0ed856860da (diff) | |
download | mongo-2c362b4c2163323d789e3896180785024d7e0f3a.tar.gz |
Fix bug finding table count with multiple tables.
-rw-r--r-- | bench/wtperf/wtperf.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bench/wtperf/wtperf.c b/bench/wtperf/wtperf.c index 0a3bea9827e..d0e0b0cd51c 100644 --- a/bench/wtperf/wtperf.c +++ b/bench/wtperf/wtperf.c @@ -1122,13 +1122,18 @@ find_table_count(CONFIG *cfg) if (table_icount > max_icount) max_icount = table_icount; -err: if ((t_ret = session->close(session, NULL)) != 0) { - if (ret == 0) - ret = t_ret; + if ((ret = cursor->close(cursor)) != 0) { lprintf(cfg, ret, 0, - "find_table_count: session close failed"); + "find_table_count: cursor close failed"); + goto err; } } +err: if ((t_ret = session->close(session, NULL)) != 0) { + if (ret == 0) + ret = t_ret; + lprintf(cfg, ret, 0, + "find_table_count: session close failed"); + } cfg->icount = max_icount; out: return (ret); } |