summaryrefslogtreecommitdiff
path: root/src/sequence/seq_stat.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-02-17 17:25:57 +0000
committer <>2015-03-17 16:26:24 +0000
commit780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch)
tree598f8b9fa431b228d29897e798de4ac0c1d3d970 /src/sequence/seq_stat.c
parent7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff)
downloadberkeleydb-master.tar.gz
Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz.HEADdb-6.1.23master
Diffstat (limited to 'src/sequence/seq_stat.c')
-rw-r--r--src/sequence/seq_stat.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/sequence/seq_stat.c b/src/sequence/seq_stat.c
index d5b9a401..28f61174 100644
--- a/src/sequence/seq_stat.c
+++ b/src/sequence/seq_stat.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -124,10 +124,12 @@ __seq_stat_print(seq, flags)
DB *dbp;
DB_THREAD_INFO *ip;
ENV *env;
+ u_int32_t orig_flags;
int handle_check, ret, t_ret;
dbp = seq->seq_dbp;
env = dbp->env;
+ ret = 0;
SEQ_ILLEGAL_BEFORE_OPEN(seq, "DB_SEQUENCE->stat_print");
@@ -140,11 +142,16 @@ __seq_stat_print(seq, flags)
goto err;
}
- if ((ret = __seq_print_stats(seq, flags)) != 0)
- goto err;
+ orig_flags = flags;
+ LF_CLR(DB_STAT_CLEAR | DB_STAT_SUBSYSTEM);
+ if (flags == 0 || LF_ISSET(DB_STAT_ALL)) {
+ ret = __seq_print_stats(seq, orig_flags);
+ if (flags == 0 || ret != 0)
+ goto err;
+ }
if (LF_ISSET(DB_STAT_ALL) &&
- (ret = __seq_print_all(seq, flags)) != 0)
+ (ret = __seq_print_all(seq, orig_flags)) != 0)
goto err;
/* Release replication block. */