[freetds] Really long query

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

  trying to fix bug #1525782
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

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

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


More information about the FreeTDS mailing list