Skip to content

Commit 69525fc

Browse files
committed
Remove incorrect increment of lineno, per David Fetter.
Sync HEAD and 8.1 branches of pgbench.
1 parent ecf4df6 commit 69525fc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

contrib/pgbench/pgbench.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.48 2005/11/23 12:19:12 ishii Exp $
2+
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.49 2005/12/10 01:09:07 tgl Exp $
33
*
44
* pgbench: a simple benchmark program for PostgreSQL
55
* written by Tatsuo Ishii
@@ -411,6 +411,7 @@ doCustom(CState * state, int n, int debug)
411411
CState *st = &state[n];
412412
Command **commands;
413413

414+
top:
414415
commands = sql_files[st->use_file];
415416

416417
if (st->listen)
@@ -489,6 +490,7 @@ doCustom(CState * state, int n, int debug)
489490
{
490491
st->state = 0;
491492
st->use_file = getrand(0, num_files - 1);
493+
commands = sql_files[st->use_file];
492494
}
493495
}
494496

@@ -572,6 +574,8 @@ doCustom(CState * state, int n, int debug)
572574
free(val);
573575
st->listen = 1;
574576
}
577+
578+
goto top;
575579
}
576580
}
577581

@@ -894,10 +898,8 @@ process_file(char *filename)
894898
fclose(fd);
895899
return false;
896900
}
897-
} else {
898-
lineno++;
901+
} else
899902
continue;
900-
}
901903

902904
my_commands[lineno] = commands;
903905
lineno++;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy