php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #57081 Silent failure with malformed SQL
Submitted: 2006-06-12 15:35 UTC Modified: 2006-10-30 06:34 UTC
From: simonslaws at googlemail dot com Assigned: slaws (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.1.2 OS: Windows XP
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: simonslaws at googlemail dot com
New email:
PHP Version: OS:

 

 [2006-06-12 15:35 UTC] simonslaws at googlemail dot com
Description:
------------
Malformed SQL passed into executeQuery does not cause an exception to be thrown. The package here is marked as SDO. It may be that the actual issue lies in PDO so we need to do some investigation here and possibly address is to PDO if we can't resolve. 

Reproduce code:
---------------
For example, 

$stmt = "fsdfsf";
$root = $das->executeQuery($dbh, $stmt);

Does not apparently throw an exception

Expected result:
----------------
Would expect this to raise an exception. Probably and exception containing SQLSTATE 42703 in this case

Actual result:
--------------
Execution follows to the next line. 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-28 13:14 UTC] simonslaws at googlemail dot com
Have implemented a fix for this. It is successful for both MySQL and DB2 but in the case when and error is reported for DB2 PHP crashes after the error has been reported. Needs a little more investigation. In the PDO_ODBC driver clen up code possibly.
 [2006-08-09 07:14 UTC] simonslaws at googlemail dot com
Fixed in 1.0.3. The crash inidcated in the previous comment seems to be related to reporting two exceptions in quick succession and required further investication. I'll raise a separate bug for it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 11:01:30 2024 UTC