php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62551 oci_bind_by_name() : maxlength and memory usage
Submitted: 2012-07-13 12:54 UTC Modified: 2013-02-18 00:35 UTC
From: tbrillaud at meti dot fr Assigned: sixd (profile)
Status: No Feedback Package: OCI8 related
PHP Version: 5.3.14 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
45 + 11 = ?
Subscribe to this entry?

 
 [2012-07-13 12:54 UTC] tbrillaud at meti dot fr
Description:
------------
The variable maxlength has no effect in the memory usage for a bind variable OUT.

A bind variable OUT takes systematically 65536 bytes in memory.

Test script:
---------------
$sql = "CALL TEST.PROC_OUT(:OUT)";
$curseur = oci_parse($connexion, $sql);
$out="1";
$size=10;
oci_bind_by_name($curseur,":OUT", $out, $size);

var_dump(memory_get_usage());
$ok = oci_execute($curseur);
oci_free_statement($curseur);
var_dump(memory_get_usage());


Expected result:
----------------
Memory should be consistency with the maxlength parameter.

Actual result:
--------------
Playing with memory settings, we obtain :

PHP Fatal error:  Allowed memory size of 10752000 bytes exhausted (tried to allocate 65536 bytes) 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-10-03 02:37 UTC] sixd@php.net
-Status: Open +Status: Feedback
 [2012-10-03 02:37 UTC] sixd@php.net
Please give a complete testcase, including the DDL to create the procedure 
showing the datatype being using.
 [2012-11-05 00:15 UTC] sixd@php.net
-Assigned To: +Assigned To: sixd
 [2013-02-18 00:35 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 08:01:30 2024 UTC