Morning,
I found an issue this week that exists in both odbc and pdo_odbc with
SQL Server. The ODBC implemention of Windows returns 0 as the length
for for varchar(max) nad nvarchar(max). This makes the allocation of
the strings incorrect and you get back garbage pointers for the
contents.
This was a pretty easy fix for pdo_odbc, simply check if the colsize
is returned as 0 and the type is one of the varchar types, if so
always treat it as a column with "long" data. This works perfectly
without breaking things. Attached is a patch that works for both 5.3
and trunk, includes an additional test for the issue.
The odbc extension is turning out to be more of a pain, each function
is doing it's own fetching so it either has to be fixed for each
function, or change odbc to use a single function for all fetching,
which might break bc.
Thanks,
Elizabeth M Smith
Attached is a patch that works for both 5.3
and trunk, includes an additional test for the issue.
Hi Elizabeth,
Can you log a bug and attach the patch?
Thanks
Chris
--
Email: christopher.jones@oracle.com
Tel: +1 650 506 8630
Blog: http://blogs.oracle.com/opal/
Attached is a patch that works for both 5.3
and trunk, includes an additional test for the issue.Hi Elizabeth,
Can you log a bug and attach the patch?
Thanks
Chris
Bug filed, patch attached (any reason it doesn't let you attach with
@php.net email? that's rather silly) - http://bugs.php.net/bug.php?id=54169
AFAIk pdo_odbc doesn't have an active maintainer right now - does odbc
either?
Thanks,
Elizabeth
On Sat, Mar 5, 2011 at 5:12 PM, Elizabeth M Smith
auroraeosrose@gmail.com wrote:
Attached is a patch that works for both 5.3
and trunk, includes an additional test for the issue.Hi Elizabeth,
Can you log a bug and attach the patch?
Thanks
Chris
Bug filed, patch attached (any reason it doesn't let you attach with
@php.net email? that's rather silly) - http://bugs.php.net/bug.php?id=54169
Not sure what you meant here, but using @php.net works just fine as
in: first login then report bugs and add patches. I do that all the
time.
AFAIk pdo_odbc doesn't have an active maintainer right now - does odbc
either?
ODBC has maintainers, iODBC guys afair. In any case, reporting issues
to bugs.php.net is good practice anyway :)
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org