Bug #53184 [Fbk->NoF]: PDO_MySQL does not respect type of binded params used more than once in query
Edit report at https://bugs.php.net/bug.php?id=53184&edit=1
ID: 53184
Updated by: php-bugs@lists.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: Feedback
+Status: No Feedback
Type: Bug
Package: PDO MySQL
Operating System: Windows Server 2008 R2 x64
PHP Version: 5.3.3
Private report: N
New Comment:
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 "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2021-04-08 21:04:13] dharman@php.net
Unfortunately, I can't reproduce it with any of the currently available PHP versions. If you
are still encountering this issue with PHP 8 or even PHP 7.4 could you provide more details, please?
------------------------------------------------------------------------
[2011-09-23 18:24:04] morrison dot levi at gmail dot com
I meant bug https://bugs.php.net/bug.php?id=48856. My
apologies.
------------------------------------------------------------------------
[2011-09-23 18:18:53] morrison dot levi at gmail dot com
See bug https://bugs.php.net/bug.php?id=47615 .
You shouldn't* be using a
parameter more than once.
------------------------------------------------------------------------
[2010-11-26 13:22:26] johannes@php.net
This either needs an API change with myslqnd or changes to PDO to use the "new" error mode
settings.
------------------------------------------------------------------------
[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 https://bugs.php.net/bug.php?id=53184&edit=1
Thread (6 messages)