Patch to allow contrib/pgbench files to have blank lines
Folks,
Having blank lines in -f scripts was causing silent failures. This
fixes it, for some value of "fixes." If it's OK, please apply to 8.1
CURRENT and CVS TIP :)
Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778
Remember to vote!
Attachments:
pgbench_blank_lines_ok.difftext/plain; charset=us-asciiDownload+16-16
Having blank lines in -f scripts was causing silent failures. This
fixes it, for some value of "fixes." If it's OK, please apply to 8.1
CURRENT and CVS TIP :)
Thanks. I have committed your patches to current and 8.1 stable.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
Patch already applied. Thanks.
---------------------------------------------------------------------------
David Fetter wrote:
Folks,
Having blank lines in -f scripts was causing silent failures. This
fixes it, for some value of "fixes." If it's OK, please apply to 8.1
CURRENT and CVS TIP :)Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778Remember to vote!
[ Attachment, skipping... ]
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
On 11/23/05, David Fetter <david@fetter.org> wrote:
Having blank lines in -f scripts was causing silent failures. This
fixes it, for some value of "fixes." If it's OK, please apply to 8.1
CURRENT and CVS TIP :)
if (strncmp(buf, "\n", 1) != 0) {
commands = process_commands(buf);
if (commands == NULL)
{
fclose(fd);
return false;
}
} else {
lineno++;
Above line will cause a skip in the my_commands array, leaving a
garbage pointer. Removing it will fix things.
continue;
}my_commands[lineno] = commands;
--
Nicolas Barbier
http://www.gnu.org/philosophy/no-word-attachments.html
On Wed, Nov 23, 2005 at 10:24:00PM +0900, Tatsuo Ishii wrote:
Having blank lines in -f scripts was causing silent failures.
This fixes it, for some value of "fixes." If it's OK, please
apply to 8.1 CURRENT and CVS TIP :)Thanks. I have committed your patches to current and 8.1 stable.
Please apply the following patch that removes an unneeded (and broken)
counter increment.
Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778
Remember to vote!