Edit report at https://bugs.php.net/bug.php?id=61613&edit=1
ID: 61613
Comment by: verger dot antoine 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: Assigned
Type: Bug
Package: PDO related
Operating System: Mac OS X
PHP Version: 5.3.10
Assigned To: mysql
Block user comment: N
Private report: N
New Comment:
Hi,
I have the same issue on 5.4.6 on Ubuntu 12.04 and PDO_MYSQL 5.5.24.
Di you have any idea where it comes from ? I had a look at the source from PDO
and also from MySQL C API but no clue and above all too hard to find the origin.
I saw that the issue has been assigned to mysql by [email protected] but I don't
why exactly. Could you explain me ?
Antoine
Previous Comments:
------------------------------------------------------------------------
[2012-08-28 22:09:08] angel dot koilov at gmail dot com
Same issue debian wheezy, php 5.4.4-4
------------------------------------------------------------------------
[2012-08-01 19:40:01] jonwage at gmail dot com
I am experiencing the same issue. Tested on 5.3.5 and 5.3.10 currently.
------------------------------------------------------------------------
[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] [email protected]
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