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

 ID:                 61613
 Comment by:         jonwage at gmail dot com
 Reported by:        trebitzki at gmx dot net
 Summary:            No PDO error if first SQL statement of a group is
                     valid.
 Status:             Open
 Type:               Bug
 Package:            PDO related
 Operating System:   Mac OS X
 PHP Version:        5.3.10
 Block user comment: N
 Private report:     N

 New Comment:

I am experiencing the same issue. Tested on 5.3.5 and 5.3.10 currently.


Previous Comments:
------------------------------------------------------------------------
[2012-04-11 23:27:03] trebitzki at gmx dot net

I'm working on 1and1 server with PDO Driver for MySQL, client library version   
5.1.49; locally on Mac with PDO Driver for MySQL Client API version mysqlnd 
5.0.7-dev - 091210 - $Revision: 304625 $. Both environments show this issue.

------------------------------------------------------------------------
[2012-04-11 15:08:20] johan...@php.net

Which PDO driver are you using?

------------------------------------------------------------------------
[2012-04-03 22:57:20] trebitzki at gmx dot net

Description:
------------
I am submitting a group of two SQL statements to PDO. The first is valid, the 
second has a syntax error. PDO should throw an exception but doesn't. It only 
throws an exception when the first statement is invalid.

Test script:
---------------
//[symfony 1.4 environment]
$conn = Propel::getConnection();
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo_statement = $conn->prepare('SELECT 1; invalidstatement');
$pdo_statement->execute();


Expected result:
----------------
I expect to have an error thrown since the group of statements has a syntax 
error.

Actual result:
--------------
No error is thrown.


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



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

Reply via email to