Bugzilla – Bug 4512
rls query returns incomplete result on 64bit system (patch available)
Last modified: 2009-12-07 16:24:54
You need to log in before you can comment on or make changes to this bug.
In query_ret2 function at db.c:2064 SQLFetch fills only first of 2 buffers bound using SQLBindCol Compilation warnings: db.c: In function `query_ret2': db.c:2078: warning: passing arg 6 of `SQLBindCol' from incompatible pointer type db.c:2080: warning: passing arg 6 of `SQLBindCol' from incompatible pointer type In /usr/include/sql.h SQLBindCol is declared with SQLLEN * argument but in rls SQLINTEGER * is given. On 64bit system SQLLEN and SQLINTEGER have 64 and 32 bits respectively. Provided patch fixes local variable declarations for len parameter. Similar problem with SQLRowCount fixed too. db.c:1557: warning: passing arg 2 of `SQLRowCount' from incompatible pointer type db.c:1578: warning: passing arg 2 of `SQLRowCount' from incompatible pointer type Output of globus-rls-client rls> clear rls> create lfile pfile rls> query lrc lfn lfile lfile: rls> on 32 bit systems (or with patch applied) rls> clear rls> create lfile pfile rls> query lrc lfn lfile lfile: pfile rls> arch: x86-64 iodbc: 3.52.2-3 (debian) SQL backend: postgre 7.4.7
Created an attachment (id=981) [details] SQLLEN fix
This is excellent! Thanks for identifying the problem AND proving a patch. I have tested it out myself with RLS using: -- libiodbc-3.52.4 -- unixODBC-2.2.11 I was hoping to get this committed and rolled into the GT 4.1 development release, unfortunately it may not get committed that quick. What I have found is that the older libiodbc-3.51.x does not define SQLLEN. So far we have been advising libiodbc users to use libiodbc-3.51.2 because psqlodbc will not build with their newer libs because of an API redefinition. So this may take us a while to sort things out and it may not make it into this month's 4.1 release. But we'll make sure users know about it until we can commit it.