Skip to Content.
Sympa Menu

freetds - Re: Crash in tsql (fixed, but still has problems!)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Varley, David(CBorn at Alcoa)" <David.Varley AT alcoa.com.au>
  • To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Crash in tsql (fixed, but still has problems!)
  • Date: Tue, 13 Aug 2002 07:54:09 +0800



Brian,

I've now tested your quick-fix on Tru64, and that works too :)

Looking at the sqsh problem, I think the same fix needs to be
applied to ctlib/cs.c to get it working, and Freddy's fix for
the 'bit' type as well.

I can send you the freetds.log if that would help ?

David

-----Original Message-----
From: Brian Bruns [mailto:camber AT ais.org]
Sent: Monday, 12 August 2002 10:16 PM
To: TDS Development Group
Subject: [freetds] Re: Crash in tsql (fixed, but still has problems!)


tsql may just be broken wrt text columns atm. Keep in mind it's fairly
new and mostly designed as a diagnosistic tool, which is not to say we
won't fix it, just that there may be gotchas with it.

I am a bit more concerned with the problems surrounding sqsh however. Can
you describe the behaviour there? It's very possible that text columns
got broken there as well during the conversion fixes.

Background: Because of it's variability wrt to size, text column data is
not stored in the row buffer (resinfo->current_row) like normal columns
(we'd have to allocate the maxium potential size or 2 gig....obviously not
doable) but are instead stored by a per column pointer (column_textvalue).

ctlib appears to be calling with the right pointer so again info on what
sqsh is doing would be helpful.

quick fix for tsql. inside do_query add

unsigned char *src;
int srclen;

...
now above the tds_convert() call do like this:

if (is_blob_type(ctype)) {
src = (unsigned char *)col->column_textvalue;
srclen = col->column_textsize;
} else {
src = &(tds->res_info->current_row[col->column_offset]);
srclen = col->column_size;
}

and fix the call to tds_convert() to use src and srclen. I'll check in a
proper fix tonight when i get home.

Brian




Archive powered by MHonArc 2.6.24.

Top of Page