ID:               42978
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ahawthorne at rook dot ca
-Status:           Open
+Status:           Assigned
 Bug Type:         PDO related
 Operating System: Fedora 6
 PHP Version:      5.2.4
-Assigned To:      
+Assigned To:      iliaa


Previous Comments:
------------------------------------------------------------------------

[2007-10-15 22:21:33] ahawthorne at rook dot ca

I compiled and installed the latest CVS snapshot but the problem still
persists. The Same code returns the same error.

------------------------------------------------------------------------

[2007-10-15 19:35:27] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

------------------------------------------------------------------------

[2007-10-15 17:21:25] ahawthorne at rook dot ca

Description:
------------
Having a prepared statement with a given number of parameters (ie. ?,?)
and binding two more parameters than required causes zend_mm_heap
corruption where an error is expected.



Reproduce code:
---------------
// NOTE: I'm running PostgreSQL 8.2.3

$db = new e4_PDO($db_connect_string);

$item = array(112,113,114);

$sql = "SELECT * FROM item_table WHERE item_id IN (?)";
$stmt = $db->prepare($sql);

$stmt->bindValue(1,$item[0]);
$stmt->bindValue(2,$item[1]);
$stmt->bindValue(3,$item[2]);

$stmt->execute();



Expected result:
----------------
something like:
ERROR:  bind message supplies 3 parameters, but prepared statement
"pdo_pgsql_stmt_XXXXXXXX" requires 1

Actual result:
--------------
zend_mm_heap corrupted


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42978&edit=1

Reply via email to