diff --git a/contrib/pgbench/README.pgbench b/contrib/pgbench/README.pgbench index c96f0851a4..d576b594a9 100644 --- a/contrib/pgbench/README.pgbench +++ b/contrib/pgbench/README.pgbench @@ -1,4 +1,4 @@ -pgbench README 2006/07/26 Tatsuo Ishii +pgbench README 2006/10/21 Tatsuo Ishii o What is pgbench? @@ -235,6 +235,10 @@ Basically it is same as BSD license. See pgbench.c for more details. o History +2006/10/21 + * more fix with handling default scaling factor in the default + scenarios + 2006/09/14 * change "tps" to "scale" to avoid confusion diff --git a/contrib/pgbench/README.pgbench_jis b/contrib/pgbench/README.pgbench_jis index 0faa30de68..adb22af405 100644 --- a/contrib/pgbench/README.pgbench_jis +++ b/contrib/pgbench/README.pgbench_jis @@ -1,4 +1,4 @@ -pgbench README 2006/07/26 Tatsuo Ishii +pgbench README 2006/10/21 Tatsuo Ishii ■pgbench とは? @@ -285,6 +285,10 @@ pgbench は石井 達夫によって書かれました.ライセンス条件は pgbench.c ■改定履歴 +2006/10/21 + * 更にデフォルトのスケーリングファクタをbranchesから取ってこな + いバグを修正. + 2006/09/13 * 変数tpsは紛らわしいのでscaleに変更.デフォルトシナリオの時に, デフォルトのスケーリングファクタをbranchesから取ってこないバグを修正. diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 3c15346e89..e880f638f0 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.57 2006/10/07 19:25:28 tgl Exp $ + * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.58 2006/10/21 06:31:28 ishii Exp $ * * pgbench: a simple benchmark program for PostgreSQL * written by Tatsuo Ishii @@ -1352,6 +1352,8 @@ main(int argc, char **argv) memset(state + 1, 0, sizeof(*state) * (nclients - 1)); + snprintf(val, sizeof(val), "%d", scale); + for (i = 1; i < nclients; i++) { int j; @@ -1364,6 +1366,12 @@ main(int argc, char **argv) exit(1); } } + + if (putVariable(&state[i], "scale", val) == false) + { + fprintf(stderr, "Couldn't allocate memory for variable\n"); + exit(1); + } } } @@ -1425,6 +1433,18 @@ main(int argc, char **argv) fprintf(stderr, "Couldn't allocate memory for variable\n"); exit(1); } + + if (nclients > 1) + { + for (i = 1; i < nclients; i++) + { + if (putVariable(&state[i], "scale", val) == false) + { + fprintf(stderr, "Couldn't allocate memory for variable\n"); + exit(1); + } + } + } } if (!is_no_vacuum)