Skip to Content.
Sympa Menu

freetds - RE: [freetds] dropped connection, I think

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Kass, Sharon" <Sharon.Kass AT gs.com>
  • To: "Kass, Sharon" <Sharon.Kass AT gs.com>, 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Cc:
  • Subject: RE: [freetds] dropped connection, I think
  • Date: Mon, 1 Dec 2003 16:45:25 -0500

(sorry)

Some of my handles look like this:

my $sth=$db_cms_shadow->prepare("
SELECT * FROM gs_location WHERE
LOC_ID='$locationId$locationType'
");
$sth->execute();
my @row=$sth->fetchrow_array();

Is this considered complete processing?

My other handles are used like this:

$db_cms_shadow->do("
INSERT into gs_location
VALUES
('$new_loc_id','$name','$db_building','$db_floor','$db_room',0,0,'',user_nam
e(),getdate())
");

Since AutoCommit is set to 1 I assume that the processing is nearly
immediately. I also tried putting sleeps in there (yea I was sorta
grasping)...

Your thought about incomplete processing might explain why the problem took
longer to reach when I added $sth->finish() statements.

Hmm...
Not sure how to verify this or fix it..
Continuing thanks!
Sharon

-----Original Message-----
From: Kass, Sharon
Sent: Monday, December 01, 2003 4:43 PM
To: 'FreeTDS Development Group'
Subject: RE: [freetds] dropped connection, I think


> incompletely processing results from the prior query

Gee, I think you're on to something here. Maybe I'm not processing properly.
Some of my handles look like this:


-----Original Message-----
From: Lowden, James K [mailto:LowdenJK AT bernstein.com]
Sent: Monday, December 01, 2003 4:27 PM
To: 'FreeTDS Development Group'
Subject: RE: [freetds] dropped connection, I think


> From: Kass, Sharon [mailto:Sharon.Kass AT gs.com]
> Sent: December 1, 2003 3:53 PM
>
> Thank you for your reply. I also thought that looked
> suspicious but I see
> the same message in the trace for the times when the function
> works.

If you see that message on every iteration, it indicates you're incompletely
processing results from the prior query. Details follow.

> Maybe
> it's dropping the connection other places as well but remembering the
> credentials. (?)

It's not that DBD::Sybase is dropping the connection. AFAIK, It won't drop
and re-form a connection. It seems to be trying to create an extra
connection, which it will do if you issue a second query before processing
all the results of the prior query.

The log chunk you posted is too late in the game, best I can tell:

2003-12-01 15:07:12.755146 processing row. column is 3 varint size = 2
2003-12-01 15:07:12.755440 processing row. column size is 13
2003-12-01 15:07:12.757154 clearing column 3 NULL bit
2003-12-01 15:07:12.757428 swapping coltype 39

That's is result processing on a big-endian client. Definitely not
something you'd be doing between two insert statements.

There is a known ct-lib bug in 0.61.x: it doesn't always deal with empty
result sets correctly. That's bound to upset Perl, and IIRC the DBD::Sybase
release notes mention something about it.

> Maybe I should explicitly disconnect and
> re-connect every so often (?)

I wouldn't do that. At best, you'd mask the problem. I'd much prefer we
figure out what's wrong and fix it.

> As for upgrading, I am running the latest download from the
> website (.61)

At this point, I have to recommend you build and use our latest snapshot,
unless you know you're never going to try to process an empty result set
with DBD::Sybase. I suspect you're being bitten by that bug, and while the
snapshot may have its own problems, that particular one is fixed.

We've been promising a release for some time now, and it's getting closer.
I know that, because I'm working on the documentation, and the documentation
is the last big todo before the release. All to say, the snapshot you get
today will closely resemble the release you see down the road.

> Thank you for your interest in helping me!

My pleasure. Helping people is one way we improve the library, and one way
we garner new victims, er, users. And testers, and developers.

--jkl
-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders and/or
instructions by e-mail, and therefore will not be responsible for carrying
out such orders and/or instructions.


_______________________________________________
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