projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
035a5e1
)
Fix off-by-one in pg_xlogdump -r option.
author
Heikki Linnakangas
Tue, 4 Jun 2013 15:51:43 +0000
(18:51 +0300)
committer
Heikki Linnakangas
Tue, 4 Jun 2013 15:51:43 +0000
(18:51 +0300)
Because of the bug, -r would not accept the rmgr with the highest ID.
contrib/pg_xlogdump/pg_xlogdump.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pg_xlogdump/pg_xlogdump.c
b/contrib/pg_xlogdump/pg_xlogdump.c
index 70dc8d15d5006fdaa8ab9194c31a57e6c7f9e05c..24ca4fa8552397c09ee88f894cf96b6a69e4e510 100644
(file)
--- a/
contrib/pg_xlogdump/pg_xlogdump.c
+++ b/
contrib/pg_xlogdump/pg_xlogdump.c
@@
-75,7
+75,7
@@
print_rmgr_list(void)
{
int i;
- for (i = 0; i <
RM_MAX_ID + 1
; i++)
+ for (i = 0; i <
= RM_MAX_ID
; i++)
{
printf("%s\n", RmgrDescTable[i].rm_name);
}
@@
-492,7
+492,7
@@
main(int argc, char **argv)
exit(EXIT_SUCCESS);
}
- for (i = 0; i < RM_MAX_ID; i++)
+ for (i = 0; i <
=
RM_MAX_ID; i++)
{
if (pg_strcasecmp(optarg, RmgrDescTable[i].rm_name) == 0)
{