php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41365 SQLSTATE[HY000]: General error: 2053 Source File
Submitted: 2007-05-11 14:40 UTC Modified: 2007-05-19 01:00 UTC
Votes:4
Avg. Score:4.0 ± 1.0
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:0 (0.0%)
From: jrags at jasrags dot net Assigned:
Status: No Feedback Package: PDO related
PHP Version: 5.2.2 OS: Fedora Core 5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jrags at jasrags dot net
New email:
PHP Version: OS:

 

 [2007-05-11 14:40 UTC] jrags at jasrags dot net
Description:
------------
getting a sql hydrate issue when attempting to retireive a result set
from MySQL 5.0.26 on PHP 5.2.0. Specificly when using PARAM_BOOL. When i
search for a specific 1 or 0 i can retrieve data. 

FROM PECL BUG:

[2007-01-24 14:25 UTC] mailing_lists at andersground dot net

The same is true for insert and update statements as well - even worse
is that in this case no error is produced, the statement just silently
fails. The same behaviour occurs when I bind a boolean variable
explicitly with PDO::PARAM_INT - I'd expect that at least in this case
typecasting happens:

$sth->bindValue(1, true, PDO::PARAM_INT);

fails in the same way.



Reproduce code:
---------------
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass);

$sql = 
'SELECT 
     * 
FROM 
     tbl_address 
WHERE 
     tbl_address.is_active = ?';

$sth = $dbh->prepare($sql);
$sth->bindValue(1, true, PDO::PARAM_BOOL);
$sth->execute();
while($row = $sth->fetch(PDO::FETCH_NUM)) {
   print_r($row);
}

Expected result:
----------------
I would expect data to be returned.

Actual result:
--------------
PDOException Description

SQLSTATE[HY000]: General error: 2053 Source File

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-11 15:22 UTC] tony2001@php.net
Cannot reproduce, your code works perfectly fine with MySQL 5.0.26 & PHP 5.2.2.
 [2007-05-11 15:29 UTC] jrags at jasrags dot net
Ill Re-test tonight, i had this bug sitting in PECL for quite some time before i put it in here, so let me check again and make sure it's still going on.
 [2007-05-19 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2015-12-15 18:59 UTC] cruxic at gmail dot com
This bug is probably the same as #38386 (https://bugs.php.net/bug.php?id=38386).  I have posted a complete test case there.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 19:01:28 2025 UTC