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

 ID:                 53184
 Updated by:         johan...@php.net
 Reported by:        an0nym at narod dot ru
 Summary:            PDO_MySQL does not respect type of binded params
                     used more than once in query
 Status:             Open
 Type:               Bug
 Package:            PDO related
 Operating System:   Windows Server 2008 R2 x64
 PHP Version:        5.3.3
 Block user comment: N
 Private report:     N

 New Comment:

This either needs an API change with myslqnd or changes to PDO to use
the "new" error mode settings.


Previous Comments:
------------------------------------------------------------------------
[2010-10-27 17:02:52] an0nym at narod dot ru

Description:
------------
PDO_MySQL does not respect type of binded params that are used more than
once in query. 

Test script:
---------------
<?php

$DB = new PDO("mysql:host=localhost", "root", "");

$statement = $DB->prepare("SELECT SLEEP(50), :bind, :bind");

$bind = 1;

$statement->bindParam(":bind", $bind, PDO::PARAM_INT);

$statement->execute();

Expected result:
----------------
SELECT SLEEP(50), 1, 1

Actual result:
--------------
If you review SHOW PROCESSLIST while test script is waiting for
response, you'll see SELECT SLEEP(50), 1, '1' instead of expected
result. 


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



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

Reply via email to