tds icon indicating copy to clipboard operation
tds copied to clipboard

Failure handling some "real" columns on Sybase 11

Open gsstark opened this issue 3 years ago • 2 comments

I'm not sure what's happening and I'm not sure how to debug this. I'm open to suggestions on how to gather the right data.

I'm connecting to Sybase 11.0.3.3 and thda/tds seems to handle the TDS protocol this server version is using just fine normally. However I have one particular query that causes it to behave oddly, sometimes returning no data and sometimes entering an infinite loop or crashing.

I've simplified the failing query to select convert(real, @@timeticks) x. It does not fail if I do convert(real, 1) or just do select @@timeticks. It does fail with converting other @@ variables to real though. It also doesn't fail if I do convert(float(5), @@timeticks) but does fail if I do convert(float(4) @@timeticks)

I noted "real" is handled as a single precision float, I wonder if the TDS protocol isn't actually sending a double-width float though? Or perhaps the single precision parsing is just not quite right?

gsstark avatar Jun 24 '21 03:06 gsstark

Here's a simple test program I've been using to test this issue though it does require a connection string to Sybase 11 to test it :)

tdsbug.tar.gz

gsstark avatar Jun 24 '21 03:06 gsstark

Thanks for reporting. Could you please try to run the tests ? It might help to pinpoint the issue. As mentionned in the readme this library is only tested on 12.5 or later versions.

thda avatar Jun 28 '21 09:06 thda