note 114788 added to pdo.begintransaction
| From: | arth dot inbox at mail dot ru | Date: | Mon, 07 Apr 2014 08:53:21 +0000 |
| Subject: | note 114788 added to pdo.begintransaction | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199203@lists.php.net to get a copy of this message | ||
Strange behavior with pdo_firebird driver:
<?php
$dbh = new PDO ('','','',array( PDO :: ATTR_PERSISTENT=>true));
$dbh->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION );
$dbh -> exec ( "select 1;" ); //should be autocommitted
try
{
//$dbh->commit/rollback here fixes the issue;
$dbh -> beginTransaction (); // <- fails "with there is already an active
transaction"
$dbh -> exec ( "select 1;" );
$dbh -> commit ();
}
catch ( Exception $e )
{
$dbh -> rollBack ();
}
?>
----
Server IP: 72.52.91.14
Probable Submitter: 80.89.198.186
----
Manual Page -- http://php.net/manual/en/pdo.begintransaction.php
Edit -- https://master.php.net/note/edit/114788
Del: integrated -- https://master.php.net/note/delete/114788/integrated
Del: useless -- https://master.php.net/note/delete/114788/useless
Del: bad code -- https://master.php.net/note/delete/114788/bad+code
Del: spam -- https://master.php.net/note/delete/114788/spam
Del: non-english -- https://master.php.net/note/delete/114788/non-english
Del: in docs -- https://master.php.net/note/delete/114788/in+docs
Del: other reasons-- https://master.php.net/note/delete/114788
Reject -- https://master.php.net/note/reject/114788
Search -- https://master.php.net/manage/user-notes.php