freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Frediano Ziglio <freddyz77 AT tin.it>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] RE: textptr size in blob field
- Date: Thu, 25 Mar 2004 20:39:52 +0100
Il gio, 2004-03-25 alle 19:11, M C ha scritto:
> > > > I am playing with Query Analizer as a server emulator.
> > > For blobs, it will accept arbitrary lengths for textptr, less
> > > than 256 of coarse (my tests were with the MS odbc driver and
> > > oledb provider so far).
> > > Would you please check the hardcoding in token.cpp, function
> > > tds_get_data(), by the line
> > > if (len == 16) { /* Jeff's hack */
> > > tds_get_n(tds, blob_info->textptr, 16);
> > >
> > > and see if you can afford a dynamic size for that?
> > > I'm not sure if you want to go for the allocation overhead
> > > though, but some strategy with optimization for len <= 16 might work.
> > > Thanks,
> > > MC
> > >
> >
> > ??? how did you send length for textptr ???
> > textptr is not the content of text...
> >
> > freddy77
>
> The byte preceeding textptr in the blob is it's length. It is gotten in
> tds_get_data(),
> switch (curcol->column_varint_size) {
> case 4: /* Its a BLOB... */
> ----> len = tds_get_byte(tds);
> blob_info = (TDSBLOBINFO *) &
> (current_row[curcol->column_offset]);
> ----> if (len == 16) { /* Jeff's hack */
> tds_get_n(tds, blob_info->textptr, 16);
> tds_get_n(tds, blob_info->timestamp, 8);
>
> But tested only against 16 in the if (len == 16).
>
> I take it that textptr works like a bookmark, the server can send anything
> and the client will send back the same thing when asking for a chunk.
>
> MC
>
Simply we never see a field with length(textptr) different from 0 and
16. 0 means NULL, if text is not null textptr is always 16 byte long...
freddy77
-
[freetds] RE: textptr size in blob field,
M C, 03/25/2004
- Re: [freetds] RE: textptr size in blob field, Frediano Ziglio, 03/25/2004
- <Possible follow-up(s)>
- RE: [freetds] RE: textptr size in blob field, Lowden, James K, 03/25/2004
-
[freetds] RE: textptr size in blob field,
M C, 03/26/2004
- Re: [freetds] RE: textptr size in blob field, James K. Lowden, 03/27/2004
- [freetds] RE: textptr size in blob field, Mike C., 03/29/2004
- RE: [freetds] RE: textptr size in blob field, Lowden, James K, 03/29/2004
Archive powered by MHonArc 2.6.24.