Skip to Content.
Sympa Menu

freetds - Re: [freetds] snapshot dumps core on RHEL ES release 3

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Glenn, Chris" <Glenn AT addsys.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] snapshot dumps core on RHEL ES release 3
  • Date: Thu, 30 Nov 2006 08:31:39 -0500

Sorry for the confusion; I see the "-1 rows affected" in two DIFFERENT
places - my internal CT-Lib application and in your 'bcp' function.

The code snippet I attempted to provide below replaced the call to
'dbperror' with a printf of tds->rows_affected in the bcp.c routine.
After a bcp batch insert, this value was a -1 when it should have been
1,000 (my bcp batch size).

As for the enhancement request, the latest Sybase bcp routine provides
output like;

Starting copy...
1000 rows sent to SQL Server.
2000 rows sent to SQL Server.
3000 rows sent to SQL Server.
4000 rows sent to SQL Server.
5000 rows sent to SQL Server.
6000 rows sent to SQL Server.
7000 rows sent to SQL Server.
8000 rows sent to SQL Server.
9000 rows sent to SQL Server.
10000 rows sent to SQL Server.
11000 rows sent to SQL Server.
12000 rows sent to SQL Server.
13000 rows sent to SQL Server.
14000 rows sent to SQL Server.
15000 rows sent to SQL Server.
16000 rows sent to SQL Server.
17000 rows sent to SQL Server.
...


Thanks-
Chris


PS-
I'm not sure how to not 'top post'? I'm just replying to your emails.
I'd be more than happy to change, just tell me what I'm doing wrong.


-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of James K. Lowden
Sent: Wednesday, November 29, 2006 11:56 PM
To: FreeTDS Development Group
Subject: Re: [freetds] snapshot dumps core on RHEL ES release 3

Glenn, Chris wrote:
> The patch works great - thanks!

You're welcome. Thanks for raising the issue and sticking with the
program.

> I assume this will be in tonight's build?

Absolutely.

> Could the 'bcp' function be enhanced to show the actual number
> of rows copied in/out in each batch like Sybase's bcp? And don't show
> blank lines between each batch?

Hmm. I don't see why not. I think most of the work would be done in
the
freebcp message handler. Good suggestion.

> The "rows affected" value always seems to be returned as -1.
...
> I've noticed this in my CT-Lib application which attempts to validate
> this value after executing an insert statement and expects to get 1.
> While attempting to hack in my own adjustment for the bcp enhancement
> request above, I changed the bcp.c routine to print out this value.
> My changes looked like;
> ...
> *rows_copied += tds->rows_affected;
> /* dbperror(dbproc, SYBEBBCI, 0); -- batch copied to server --
> */

I'm very confused. Your ct-lib application that uses src/dblib/bpc.c?
sqsh is a ct-lib application that reflects rows affected correctly.

I think you're telling me bcp.c seems not to be updating/returning the
rowcount properly when it's loading a file. That's worth looking into.


Regards,

--jkl

P.S. Chris, this is good feedback. I would like to make just one
netiquette request, though. I would ask you please not to top post,
because it lessens the value of your participation. Our discussion will
be archived for as long as there's an Internet, and anyone trying to
follow the thread will have a much easier time if they can read from top
to bottom. (http://tools.ietf.org/html/rfc1855,
http://home.in.tum.de/~jain/software/outlook-quotefix/ )

_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page