Easysoft Data AccessWhy do I get error "Can't change param 1 maxlen (51->50) after first bind" when running make test in DBD::ODBC? |
|
This applies to DBD::ODBC 1.14 (and earlier versions) and Perl 5.8.8 and later versions. It may apply to versions of DBD::ODBC later than 1.14 is our patch for the fix is not implemented by the maintainer (see the DBD::ODBC changes file).
Perl's internal SvGROW function changed in Perl 5.8.8 so that it grows a scalar up to the next longword boundary instead of up to the size specified in the SvGROW call (although they can obviously be the same).
This affects DBD::ODBC which uses SvGROW to grow a scalar because it tests the length the scalar is grown to against the length it asked for and produces the error:
Can't change param 1 maxlen (51->50) after first bind at t/20sqlserver.t line 180
if the scalar is not equal to what was requested.
The solution is a simple change to the dbdimp.c module. Look for the line:
else if (maxlen && maxlen != phs->maxlen) {
at around line 2931 and change it to:
else if (maxlen && maxlen > phs->maxlen) {