Skip to Content.
Sympa Menu

freetds - Re: trailing null on strings

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: trailing null on strings
  • Date: Thu, 19 Oct 2000 08:02:49 -0400 (EDT)



2000-10-19 10:49:11 converting string dlen = 21 dtype = 47 string = hello

2000-10-19 10:49:11 inside _ct_bind_data() conversion done len = 6 bindfmt =
66
2000-10-19 10:49:11 inside _ct_bind_data() length binding len = 6

Here is the problem. The bindfmt is 66! which is totally not valid, it
should be CS_FMT_UNUSED which is 0. That would cause the len to be
decremented and return correctly. Unfortunately, I don't have time to
track it further, but I would make sure that DBD::Sybase is picking up
recent copies of the header files when compiling and not ones from freetds
0.50 for instance.

The test.pl that gets sent to the server is the 'appname' field in the
login packet and will show up in the sysprocesses table on the server.
You have the option of changing it to anything you like.

Brian

On Thu, 19 Oct 2000, James Ponder wrote:

> (I'm dropping the 'int' part of the subject, since I can't reproduce it
> in a test program)
>
> On Wed, Oct 18, 2000 at 08:05:49PM -0400, Brian Bruns wrote:
> > Also do an 'export TDSDUMP=mydump.log' or some such and send the contents
> > of
> > that log file (please edit out passwords and such...)
>
> It seems to only store the last query or so, so I've included the relevant
> one by stopping the test program after the select. I note that my program
> name (test.pl) is sent to the remote server?! If this is true then from
> a security point of view this seems unexpected, and should be documented
> somewhere.
>
> > Also, provide info on what service pack the SQL Server is running.
>
> The SQL Server itself is running 7.00.694 and it's on an NT Server 4 SP6.
>
> > Michael, have any of the recent snapshots of DBD::Sybase changed the bind
> > types for char/varchar datatypes? James, you may want to grab the 0.23
> > release instead and give that a whirl.
>
> I am using DBD::Sybase 0.23 and freetds.snapshot dated Oct 18 11:13.
>
>
> Best wishes, James
> --
> James Ponder; www.squish.net
>





Archive powered by MHonArc 2.6.24.

Top of Page