http://www.perlmonks.org?node_id=881765

andreas1234567 has asked for the wisdom of the Perl Monks concerning the following question:

DBD::mysql does not support bind_param_inout as is documented in this 4 year old bug. I am trying to understand how hard it would be to implement (and I am not an XS Monk by any standard). Is it more difficult to implement for MySQL than e.g. DB2?
if( is_inout ) { phs->sv = value; /* Make a reference to the input variable */ SvREFCNT_inc( value ); /* Increment reference to variable */ if( SQL_PARAM_INPUT != phs->paramType ) imp_sth->bHasOutput = 1; if( SQL_PARAM_OUTPUT != phs->paramType ) imp_sth->bHasInput = 1; if( maxlen > 0 ) { maxlen++; /* Add one for potential null terminator */ /* Allocate new buffer only if current buffer isn't big enough */ if( maxlen > phs->bufferSize ) { if( 0 == phs->bufferSize ) /* new buffer */ Newc( 1, phs->buffer, maxlen, SQLCHAR, void* ); else Renewc( phs->buffer, maxlen, SQLCHAR, void* ); phs->bufferSize = maxlen; } } }
Update: I got feedback from Patrick saying he would look into the matter.
--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]