Easysoft Data Access

Why do I get error "Can't change param 1 maxlen (51->50) after first bind" when running make test in DBD::ODBC?

Article:
00955
Last Reviewed:
29th April 2010
Revision:
3

This applies to DBD::ODBC 1.13 (and earlier versions) and Perl 5.8.8 (and later versions). Although fixed in 1.14, this issue may apply to versions of DBD::ODBC later than 1.13 if the 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) {

Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)


Oracle is a registered trademark of Oracle Corporation and/or its affiliates.