[freetds] select bug...

Frediano Ziglio freddyz77 at tin.it
Tue May 6 14:23:37 EDT 2003


Il mar, 2003-05-06 alle 15:06, Spyros Ioakim ha scritto:
> Yes Enterprise manager does reply correctly...
> 2 results for compid 186 and 1 result for 258 with the new date format.
> 
> Unfortunately freetds has the same behaviour (1 and 0 results)
> 
> I have attached the new log file.
> 
> Thanks,
> Spyros
> 

This is very strange...
>From dump
2003-05-06 16:03:35.380833 inside tds_process_result_tokens() state is
COMPLETED
2003-05-06 16:03:48.320304 tds_put_string converting 552 bytes of "use
office
SELECT Company.CompId FROM COMPANY, INSTALLS WHERE Company.CompId = 186
and (NoDownloads is null OR NoDownloads=0) AND Installs.CompID =
Company.CompID AND Installs.ProdId IN (SELECT ProdId FROM Products WHERE
Products.Code LIKE 'N%3%') AND ( (Installs.InstDate >= '2002-11-06') OR
(Installs.CompId IN (SELECT Installs.CompId FROM Installs, Products
WHERE Installs.ProdId = Products.ProdId AND ( (Products.Code LIKE
'N%3%') ) AND Installs.InstlId IN (SELECT InstlId FROM Cntrcts WHERE
CntrctType LIKE 'ðÓ%' AND ToDate >= '2003-05-06') ) ) )
"
                 ^^  where came this buffer corruption ??

It seem near byte 512... 

Below

2003-05-06 16:03:48.321326 tds_put_string wrote 80 bytes
Sending packet @ 2003-05-06 16:03:48.321342
0000 01 01 00 68 00 00 01 00-70 00 65 00 20 00 4c 00 |...h.... p.e. .L.|
0010 49 00 4b 00 45 00 20 00-27 00 f0 00 d3 00 25 00 |I.K.E. . '.ð.Ó.%.|
                                   ^^^   ^^^ same ...
0020 27 00 20 00 41 00 4e 00-44 00 20 00 54 00 6f 00 |'. .A.N. D. .T.o.|
0030 44 00 61 00 74 00 65 00-20 00 3e 00 3d 00 20 00 |D.a.t.e.  .>.=. .|
0040 27 00 32 00 30 00 30 00-33 00 2d 00 30 00 35 00 |'.2.0.0. 3.-.0.5.|
0050 2d 00 30 00 36 00 27 00-29 00 20 00 29 00 20 00 |-.0.6.'. ). .). .|
0060 29 00 20 00 29 00 0a 00-                        |). .)...|

Somewhere a buffer corruption occur...
What library are you using ? dblib ctlib or odbc ? What client ? PHP,
other ?

What platform are you using ?

freddy77





More information about the FreeTDS mailing list