Date: 04/07/00
- Next message: c.schmidt-koester <email protected>: "[PHP-DEV] PHP 4.0 Bug #4071: PHP crashes sometimes if there are multiple functions with "global" in a script"
- Previous message: Andi Gutmans: "Re: [PHP-DEV] PHP 4.0 Bug #4069: Form submission times out if form data length exceeds 3994 bytes"
- In reply to: Kees van Veen: "[PHP-DEV] patch: odbc_execute with output parameters"
- Next in thread: Kees van Veen: "Re: [PHP-DEV] patch: odbc_execute with output parameters"
- Reply: Kees van Veen: "Re: [PHP-DEV] patch: odbc_execute with output parameters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Kees van Veen wrote:
>
> Hi,
>
> Here's the description of the attached patch:
> if odbc_execute() is called with an array by reference then the output
> parameters are
> copied back into the array, if not, the old (current) situation applies.
>
> Currently the way the array parameter is specified (by value of by reference) is
> not tested and odbc_execute() works both ways. The patch tests how
> odbc_execute() is called, and after execution copies the temporary array back
> into the parameter array.
>
> I've tested it both on Linux and MS-Windows and it seems to work, although I'm
> not too sure about the call to 'pval_copy_constructor' and memory allocation,
> etc. It seems to copy the entire array, but I don't know anything about PHP
> internals, so maybe one of you gurus could enlighten me on this.
>
Thanks for your patch, but are you shure it works? I've set the
parameters to be input only in SQLBindParameter(), but it wouldn't
surprise me if some drivers silently ignore this flag. Aren't you
getting Segmentation violations when the driver tries to copy values
back, since you probably didn't allocate storage space?
Another potential problem would arise if any of the output parameters
are LOBs, as those would have to be fetched in chunks.
-Andreas
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: c.schmidt-koester <email protected>: "[PHP-DEV] PHP 4.0 Bug #4071: PHP crashes sometimes if there are multiple functions with "global" in a script"
- Previous message: Andi Gutmans: "Re: [PHP-DEV] PHP 4.0 Bug #4069: Form submission times out if form data length exceeds 3994 bytes"
- In reply to: Kees van Veen: "[PHP-DEV] patch: odbc_execute with output parameters"
- Next in thread: Kees van Veen: "Re: [PHP-DEV] patch: odbc_execute with output parameters"
- Reply: Kees van Veen: "Re: [PHP-DEV] patch: odbc_execute with output parameters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

