Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbaa6b22

Browse files
committed
Having blank lines in -f scripts was causing silent failures.
per David Fetter
1 parentaac96b8 commitbaa6b22

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

‎contrib/pgbench/pgbench.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.47 2005/11/2304:23:28 momjian Exp $
2+
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.48 2005/11/2312:19:12 ishii Exp $
33
*
44
* pgbench: a simple benchmark program for PostgreSQL
55
* written by Tatsuo Ishii
@@ -886,11 +886,17 @@ process_file(char *filename)
886886
{
887887
Command*commands;
888888

889-
commands=process_commands(buf);
890-
if (commands==NULL)
891-
{
892-
fclose(fd);
893-
return false;
889+
890+
if (strncmp(buf,"\n",1)!=0) {
891+
commands=process_commands(buf);
892+
if (commands==NULL)
893+
{
894+
fclose(fd);
895+
return false;
896+
}
897+
}else {
898+
lineno++;
899+
continue;
894900
}
895901

896902
my_commands[lineno]=commands;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp