|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #12513 Automatic Rollback of open transactions in persistent links
Submitted: 2001-08-01 09:06 UTC Modified: 2011-01-06 17:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: t dot stinner at billiton dot de Assigned: mysql (profile)
Status: Wont fix Package: MySQL related
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: t dot stinner at billiton dot de
New email:
PHP Version: OS:


 [2001-08-01 09:06 UTC] t dot stinner at billiton dot de
When using mysql_pconnect() the connection to the database (abviously) persists.

This has the site-effect that open transactions at the end of the page request remain open if you do not explicitly commit/rollback the transaction.

This can happen very easily if you have an error in your script.

The Postgres driver does an automatic rollback at request shutdown, the mysql driver should do the same.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-01 09:07 UTC]
 [2002-04-27 15:52 UTC]
this is a bug, not a feature request.
 [2002-05-26 13:43 UTC]
Looks like something for Zak to check...
 [2002-07-10 09:19 UTC]
Its fixed now in the current CVS-release

 [2002-11-15 04:32 UTC]
Fix revoked.

We have to wait until the libmysql-function 
mysql_restore_connection is available.

Changed Status to Open
Changed Category to Feature request

 [2010-12-14 11:52 UTC]
-Package: Feature/Change Request +Package: MySQL related
 [2011-01-06 17:22 UTC]
-Status: Assigned +Status: Wont fix -Assigned To: georg +Assigned To: mysql
 [2011-01-06 17:22 UTC]
Let's not touch mysql pconnects after so many years. There's mysqli, it calls mysql_change_user (the magic new function Georg speaks about) by default, let people move forward to use mysqli over ext/mysql.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 22 02:01:29 2024 UTC