php.net |  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
Votes:2
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

 [2002-11-15 04:32 UTC] georg@php.net
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] jani@php.net
-Package: Feature/Change Request +Package: MySQL related
 [2011-01-06 17:22 UTC] uw@php.net
-Status: Assigned +Status: Wont fix -Assigned To: georg +Assigned To: mysql
 [2011-01-06 17:22 UTC] uw@php.net
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-2021 The PHP Group
All rights reserved.
Last updated: Tue Sep 28 05:03:38 2021 UTC