dbTalk Databases Forums  

Re: [BUGS] [PATCHES] Patch to allow contrib/pgbench files to have blank lines

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] [PATCHES] Patch to allow contrib/pgbench files to have blank lines in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nicolas Barbier
 
Posts: n/a

Default Re: [BUGS] [PATCHES] Patch to allow contrib/pgbench files to have blank lines - 12-07-2005 , 08:29 PM






On 11/23/05, David Fetter <david (AT) fetter (DOT) org> wrote:

Quote:
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) !=3D 0) {
commands =3D process_commands(buf);
if (commands =3D=3D 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.

Quote:
continue;
}

my_commands[lineno] =3D commands;
--
Nicolas Barbier
http://www.gnu.org/philosophy/no-word-attachments.html

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


Reply With Quote
  #2  
Old   
David Fetter
 
Posts: n/a

Default Re: [BUGS] [PATCHES] Patch to allow contrib/pgbench files to have blank lines - 12-09-2005 , 05:31 PM






--k+w/mQv8wyuph6w0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Nov 23, 2005 at 10:24:00PM +0900, Tatsuo Ishii wrote:
Quote:
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 (AT) fetter (DOT) org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!

--k+w/mQv8wyuph6w0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="fix_pgbench.diff"

Index: contrib/pgbench/pgbench.c
================================================== =================
RCS file: /projects/cvsroot/pgsql/contrib/pgbench/pgbench.c,v
retrieving revision 1.48
diff -c -r1.48 pgbench.c
*** contrib/pgbench/pgbench.c 23 Nov 2005 12:19:12 -0000 1.48
--- contrib/pgbench/pgbench.c 9 Dec 2005 23:25:47 -0000
***************
*** 895,901 ****
return false;
}
} else {
- lineno++;
continue;
}

--- 895,900 ----

--k+w/mQv8wyuph6w0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

--k+w/mQv8wyuph6w0--


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] [PATCHES] Patch to allow contrib/pgbench files to have blank lines - 12-09-2005 , 07:10 PM



David Fetter <david (AT) fetter (DOT) org> writes:
Quote:
Please apply the following patch that removes an unneeded (and broken)
counter increment.
Done.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.