|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
50 + 23 = ?
Subscribe to this entry?

 [2006-06-12 15:35 UTC] simonslaws at googlemail dot com
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. 


Add a Patch

Pull Requests

Add a Pull Request


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-2020 The PHP Group
All rights reserved.
Last updated: Wed Sep 23 23:01:23 2020 UTC