[freetds] Really long query

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Wed Sep 13 05:49:41 EDT 2006


Hi,
  trying to fix bug #1525782
(http://sourceforge.net/tracker/index.php?func=detail&aid=1525782&group_
id=33106&atid=407808) I discovered that our implementation do not enable
wide table for sybase. After some try I tried this query on a 12.5
server

perl -e 'print "select name as prova"; for $i (1..4000) { print ",$i as
column_name$i"; } print " from sysobjects where name='\''sysusers'\''
for browse\ngo\n";' | TDSVER=5.0 ./src/apps/tsql -Sserver -Utestuser
-Ptestpwd

first time server reply that it cannot return more that 65536 bytes for
result. I enable wide tables (see CAPABILITY token) and that
tds5_process_result get executed however is fails... first of all it
skip a lot of field losing sync with server (see comment in token.c)
than it do not set column_type with tds_set_column_type causing some an
assert to hit. 

Code has to be fixed even on 0.64 trunk however a question raise for
capability. Should I enable wide tables even for 0.64 changing default
capability?

freddy77




More information about the FreeTDS mailing list